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

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

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

--
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]
  Powered by Linux