> -----Original Message----- > From: libvir-list-bounces@xxxxxxxxxx [mailto:libvir-list-bounces@xxxxxxxxxx] > On Behalf Of Ren, Qiaowei > Sent: Sunday, June 12, 2016 10:14 AM > To: Peter Krempa <pkrempa@xxxxxxxxxx> > Cc: libvir-list@xxxxxxxxxx > Subject: Re: [PATCH 1/1] perf: add more perf events support > > > > diff --git a/include/libvirt/libvirt-domain.h > > > b/include/libvirt/libvirt-domain.h > > > index cba4fa5..99c4c48 100644 > > > --- a/include/libvirt/libvirt-domain.h > > > +++ b/include/libvirt/libvirt-domain.h > > > @@ -1928,6 +1928,45 @@ void > > virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); > > > */ > > > # define VIR_PERF_PARAM_MBML "mbml" > > > > [...] > > > > > +/** > > > + * VIR_PERF_PARAM_INSTRUCTIONS: > > > + * > > > + * Macro for typed parameter name that represents instructions perf > > > + * event which can be used to measure the amount of instructions > > > + * by applications running on the platform. It corresponds to the > > > + * "perf.instructions" field in the *Stats APIs. > > > > I'm not sure if I understand the implications and usability of this stat parameter. > > Could you elaborate on how this can be used? > > > > > + */ > > > +# define VIR_PERF_PARAM_INSTRUCTIONS "instructions" > > > + > > > +/** > > > + * VIR_PERF_PARAM_CPU_CYCLES: > > > + * > > > + * Macro for typed parameter name that represents cpu_cycles perf > > > +event > > > + * which can be used to measure how many cycles one instruction needs. > > > + * It corresponds to the "perf.cpu_cycles" field in the *Stats APIs. > > > > And same for this. I don't really see how this can be used. > > > > Peter, thanks for your feedback! > > Instructions and cycles can be used to gain IPC (Instructions Per Clock, = > Instructions/Cycles), and a low IPC ratio indicates the code of the process makes > poor use of the CPU. > Peter, do you have any other comments about this patch? Thanks, Qiaowei -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list