On Tue, Nov 24, 2015 at 13:23:49 +0100, Jiri Denemark wrote:
> On Tue, Nov 17, 2015 at 16:00:45 +0800, Qiaowei Ren wrote:
> > This patch implement a set of interfaces for perf event. Based on
> > these interfaces, we can implement internal driver API for perf,
> > and get the results of perf conuter you care about.
> > 
> > Signed-off-by: Qiaowei Ren <qiaowei....@intel.com>
...
> > diff --git a/src/util/virperf.c b/src/util/virperf.c
> > new file mode 100644
> > index 0000000..9c71858
> > --- /dev/null
> > +++ b/src/util/virperf.c
...
> > +
> > +int
> > +virPerfCmtEnable(pid_t pid,
> > +                 virPerfPtr perf)
> 
> I think 'perf' should always be the first parameter of all virPerf
> functions, since it is the object all the functions operate on.
> 
> >From a caller perspective, I think it would be a bit better to create a
> generic int virPerfEventEnable(perf, type, pid) entry point, and make
> virPerfCmtEnable static. Unless each type requires different input data.

Actually, you can just pass vm to virPerfEventEnable, that should given
enough input data to any perf event.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to