[PATCH v4 1/4] perf: rename qemuDomainGetStatsPerfRdt()

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

 



This patch rename qemuDomainGetStatsPerfRdt() to
qemuDomainGetStatsPerfOneEvent() and update qemuDomainGetStatsPerf()
based on this change for multiple/general purpose.

Signed-off-by: Qiaowei Ren <qiaowei.ren@xxxxxxxxx>
---
 src/qemu/qemu_driver.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cda85f6..1fdb7b8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18938,10 +18938,10 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver,
 #undef QEMU_ADD_COUNT_PARAM
 
 static int
-qemuDomainGetStatsPerfRdt(virPerfPtr perf,
-                          virPerfEventType type,
-                          virDomainStatsRecordPtr record,
-                          int *maxparams)
+qemuDomainGetStatsPerfOneEvent(virPerfPtr perf,
+                               virPerfEventType type,
+                               virDomainStatsRecordPtr record,
+                               int *maxparams)
 {
     char param_name[VIR_TYPED_PARAM_FIELD_LENGTH];
     uint64_t value = 0;
@@ -18977,14 +18977,9 @@ qemuDomainGetStatsPerf(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
         if (!virPerfEventIsEnabled(priv->perf, i))
              continue;
 
-        switch (i) {
-        case VIR_PERF_EVENT_CMT:
-        case VIR_PERF_EVENT_MBMT:
-        case VIR_PERF_EVENT_MBML:
-            if (qemuDomainGetStatsPerfRdt(priv->perf, i, record, maxparams) < 0)
-                goto cleanup;
-            break;
-        }
+        if (qemuDomainGetStatsPerfOneEvent(priv->perf, i,
+                                           record, maxparams) < 0)
+            goto cleanup;
     }
 
     ret = 0;
-- 
1.9.1

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