Re: [PATCH 1/1] perf: add more perf events support

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

 



> -----Original Message-----
> From: Peter Krempa [mailto:pkrempa@xxxxxxxxxx]
> Sent: Thursday, June 9, 2016 7:50 PM
> To: Ren, Qiaowei <qiaowei.ren@xxxxxxxxx>
> Cc: libvir-list@xxxxxxxxxx
> Subject: Re:  [PATCH 1/1] perf: add more perf events support
> 
> On Tue, May 31, 2016 at 10:48:15 +0800, Qiaowei Ren wrote:
> > With current perf framework, this patch adds support to more perf
> > events, including cache missing, cache peference, cpu cycles,
> > instrction, etc..
> >
> > Signed-off-by: Qiaowei Ren <qiaowei.ren@xxxxxxxxx>
> > ---
> >  include/libvirt/libvirt-domain.h | 39 ++++++++++++++++++++++++
> >  src/libvirt-domain.c             |  8 +++++
> >  src/qemu/qemu_driver.c           | 23 +++++++-------
> >  src/util/virperf.c               | 65 +++++++++++++++++++++++++++++++++++++++-
> >  src/util/virperf.h               |  4 +++
> >  5 files changed, 126 insertions(+), 13 deletions(-)
> >
> > 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.

Thanks,
Qiaowei

--
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]