]> xenbits.xensource.com Git - libvirt.git/commitdiff
perf: Remove the switch from qemuDomainGetStatsPerf
authorQiaowei Ren <qiaowei.ren@intel.com>
Sat, 30 Jul 2016 13:57:31 +0000 (09:57 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 2 Sep 2016 21:00:58 +0000 (17:00 -0400)
Remove the unnecessary switch since all VIR_PERF_EVENT* values are fetched

src/qemu/qemu_driver.c

index f5794ec759cd6ac8a8e75f6c422c62e9d13ea693..e0fad1b2df7ae6cba1e26c7d15670b15f694e0ee 100644 (file)
@@ -19295,15 +19295,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 (qemuDomainGetStatsPerfOneEvent(priv->perf, i, record,
-                                               maxparams) < 0)
-                goto cleanup;
-            break;
-        }
+        if (qemuDomainGetStatsPerfOneEvent(priv->perf, i,
+                                           record, maxparams) < 0)
+            goto cleanup;
     }
 
     ret = 0;