[libvirt] [PATCH 1/8] perf: add new public APIs for perf event
Ren, Qiaowei
qiaowei.ren at intel.com
Tue Nov 24 01:24:14 UTC 2015
> -----Original Message-----
> From: Jiri Denemark [mailto:jdenemar at redhat.com]
> Sent: Monday, November 23, 2015 11:26 PM
> To: Ren, Qiaowei
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH 1/8] perf: add new public APIs for perf event
>
> On Tue, Nov 17, 2015 at 16:00:41 +0800, Qiaowei Ren wrote:
> > API agreed on in
> > https://www.redhat.com/archives/libvir-list/2015-October/msg00872.html
> >
> > * include/libvirt/libvirt-domain.h (virDomainGetPerfEvents,
> > virDomainSetPerfEvents): New declarations.
> > * src/libvirt_public.syms: Export new symbols.
> >
> > Signed-off-by: Qiaowei Ren <qiaowei.ren at intel.com>
> > ---
> > include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++
> > src/libvirt_public.syms | 6 ++++++
> > 2 files changed, 24 insertions(+)
> >
> > diff --git a/include/libvirt/libvirt-domain.h
> > b/include/libvirt/libvirt-domain.h
> > index a1ea6a5..69965e6 100644
> > --- a/include/libvirt/libvirt-domain.h
> > +++ b/include/libvirt/libvirt-domain.h
> > @@ -1802,6 +1802,24 @@ int virDomainListGetStats(virDomainPtr *doms,
> > void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats);
> >
> > /*
> > + * Perf Event API
> > + */
> > +
> > +/**
> > + * VIR_DOMAIN_PERF_CMT:
> > + *
> > + * Macro for typed parameter name that represents CMT perf event.
> > + */
> > +# define VIR_DOMAIN_PERF_CMT "cmt"
> > +
> > +int virDomainGetPerfEvents(virDomainPtr dom,
> > + virTypedParameterPtr params,
> > + int * nparams);
>
> We don't put a space between * and the name.
>
> > +int virDomainSetPerfEvents(virDomainPtr dom,
> > + virTypedParameterPtr params,
> > + int nparams);
> > +
> > +/*
> > * BlockJob API
> > */
> >
> > diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index
> > dd94191..03206e7 100644
> > --- a/src/libvirt_public.syms
> > +++ b/src/libvirt_public.syms
> > @@ -725,4 +725,10 @@ LIBVIRT_1.2.19 {
> > virDomainRename;
> > } LIBVIRT_1.2.17;
> >
> > +LIBVIRT_1.2.23 {
> > + global:
> > + virDomainGetPerfEvents;
> > + virDomainSetPerfEvents;
> > +} LIBVIRT_1.2.19;
> > +
> > # .... define new API here using predicted next version number ....
>
> This patch does not compile, you should squash patches 1, 2, and 3 together,
> since 'make all check syntax-check' should pass after each patch in the series.
>
Ok. This is just from the sample about "Implementing a new API in Libvirt" (https://libvirt.org/api_extension.html ). ^-^
I will make these 3 patches together in next version.
Thanks,
Qiaowei
More information about the libvir-list
mailing list