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

Peter Krempa pkrempa at redhat.com
Mon Dec 19 08:06:00 UTC 2016


On Fri, Dec 16, 2016 at 23:12:11 +0530, Nitesh Konkar wrote:
> 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;

With this you don't get any notification that some of the operations
failed. You also don't get any notification if all of the operations
fail.

I think the current semantics are ood as they are.

NACK

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161219/cf0e102c/attachment-0001.sig>


More information about the libvir-list mailing list