[libvirt] [PATCH] perf: Consider all perf events mentioned in commandline

Nitesh Konkar niteshkonkar.libvirt at gmail.com
Fri Dec 16 17:42:11 UTC 2016


Currently 'virsh perf domainName --enable a,b' command
fails to enable/disable perf event b if perf event a has
failed to get enabled/disabled. This patch fixes this
issue.

Signed-off-by: Nitesh Konkar <nitkon12 at linux.vnet.ibm.com>
---
 src/qemu/qemu_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0bf1856..365af37 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9884,9 +9884,9 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
             type = virPerfEventTypeFromString(param->field);
 
             if (!enabled && virPerfEventDisable(priv->perf, type) < 0)
-                goto endjob;
+                continue;
             if (enabled && virPerfEventEnable(priv->perf, type, vm->pid) < 0)
-                goto endjob;
+                continue;
 
             def->perf.events[type] = enabled ?
                 VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO;
-- 
1.9.3




More information about the libvir-list mailing list