[PATCH 2/3] util: Clear up some perf error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make it clearer that the perf event is based/for the host cpu and
use the virPerfEventTypeToString to convert the type to a string

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/util/virperf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/util/virperf.c b/src/util/virperf.c
index a65a4bf..6387430 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -175,7 +175,7 @@ virPerfEventEnable(virPerfPtr perf,
                                        type == VIR_PERF_EVENT_MBMT ||
                                        type == VIR_PERF_EVENT_MBML)) {
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                       _("unable to enable perf event for %s"),
+                       _("unable to enable host cpu perf event for %s"),
                        virPerfEventTypeToString(event->type));
         return -1;
     }
@@ -205,14 +205,14 @@ virPerfEventEnable(virPerfPtr perf,
     event->fd = syscall(__NR_perf_event_open, &attr, pid, -1, -1, 0);
     if (event->fd < 0) {
         virReportSystemError(errno,
-                             _("Unable to open perf event for %s"),
+                             _("unable to open host cpu perf event for %s"),
                              virPerfEventTypeToString(event->type));
         goto error;
     }
 
     if (ioctl(event->fd, PERF_EVENT_IOC_ENABLE) < 0) {
         virReportSystemError(errno,
-                             _("Unable to enable perf event for %s"),
+                             _("unable to enable host cpu perf event for %s"),
                              virPerfEventTypeToString(event->type));
         goto error;
     }
@@ -236,8 +236,8 @@ virPerfEventDisable(virPerfPtr perf,
 
     if (ioctl(event->fd, PERF_EVENT_IOC_DISABLE) < 0) {
         virReportSystemError(errno,
-                             _("Unable to disable perf event type=%d"),
-                             event->type);
+                             _("unable to disable host cpu perf event for %s"),
+                             virPerfEventTypeToString(event->type));
         return -1;
     }
 
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]