[PATCH 1/2] Drop virPerfGetEventFd

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

 



This function is not used anywhere. Moreover, the code that would
use lives in virperf.c and therefore has access to the FD anyway.
Well, for instance virPerfReadEvent is doing just that.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/libvirt_private.syms |  1 -
 src/util/virperf.c       | 19 -------------------
 src/util/virperf.h       |  3 ---
 3 files changed, 23 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index e325168..333bf7c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2083,7 +2083,6 @@ virPerfEventIsEnabled;
 virPerfEventTypeFromString;
 virPerfEventTypeToString;
 virPerfFree;
-virPerfGetEventFd;
 virPerfNew;
 virPerfReadEvent;
 
diff --git a/src/util/virperf.c b/src/util/virperf.c
index 450b3ba..a0997f9 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -241,16 +241,6 @@ bool virPerfEventIsEnabled(virPerfPtr perf,
     return event->enabled;
 }
 
-int virPerfGetEventFd(virPerfPtr perf,
-                      virPerfEventType type)
-{
-    virPerfEventPtr event = virPerfGetEvent(perf, type);
-    if (event == NULL)
-        return false;
-
-    return event->fd;
-}
-
 int
 virPerfReadEvent(virPerfPtr perf,
                  virPerfEventType type,
@@ -300,15 +290,6 @@ virPerfEventIsEnabled(virPerfPtr perf ATTRIBUTE_UNUSED,
 }
 
 int
-virPerfGetEventFd(virPerfPtr perf ATTRIBUTE_UNUSED,
-                  virPerfEventType type ATTRIBUTE_UNUSED)
-{
-    virReportSystemError(ENXIO, "%s",
-                         _("Perf not supported on this platform"));
-    return -1;
-}
-
-int
 virPerfReadEvent(virPerfPtr perf ATTRIBUTE_UNUSED,
                  virPerfEventType type ATTRIBUTE_UNUSED,
                  uint64_t *value ATTRIBUTE_UNUSED)
diff --git a/src/util/virperf.h b/src/util/virperf.h
index 769e85a..7163410 100644
--- a/src/util/virperf.h
+++ b/src/util/virperf.h
@@ -51,9 +51,6 @@ int virPerfEventDisable(virPerfPtr perf,
 bool virPerfEventIsEnabled(virPerfPtr perf,
                            virPerfEventType type);
 
-int virPerfGetEventFd(virPerfPtr perf,
-                      virPerfEventType type);
-
 int virPerfReadEvent(virPerfPtr perf,
                      virPerfEventType type,
                      uint64_t *value);
-- 
2.8.3

--
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]