[libvirt] [PATCH 1/2] perf: Refactor perf code

Martin Kletzander mkletzan at redhat.com
Fri Dec 23 09:38:11 UTC 2016

On Thu, Dec 22, 2016 at 07:36:14PM +0530, Nitesh Konkar wrote:
>Avoid unnecessary calling of function vshCommandOptStringReq.
>In the current code the function vshCommandOptStringReq is
>called irrespective of whether --enable and/or --disable is
>present in the command line. Eg: 'virsh perf domainName'
>also results in calling this function twice. This patch
>fixes this.

With this patch you're now calling vshCommandOpt() anyway, which is the
biggest part of vshCommandOpt*() and in addition you call it multiple
times if the option is on the command line.  That feels stupid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161223/d397ecb8/attachment-0001.sig>

More information about the libvir-list mailing list