Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

From: Avi Kivity
Date: Tue Jan 24 2012 - 07:50:32 EST


On 01/17/2012 04:30 AM, Xiao Guangrong wrote:
> On 01/16/2012 06:04 PM, Avi Kivity wrote:
>
> > On 01/16/2012 11:32 AM, Xiao Guangrong wrote:
> >> Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly
> >>
> >> Usage:
> >> perf kvm-events record
> >
> > Why not 'perf record -e kvm'?
>
>
> It works, many perf tools have this style, like:
> perf lock record,
> perf sched record,
> perf kmem record,
>
> I think the reason is that only enable the tracepoints we need to avoid
> unnecessary overload so that the result is more exacter.

Maybe a virtual event list:

perf record -e kvm-pio

This allows us to combine the event list with other events:

perf record -e kvm-pio -e timer


> >> +
> >> + while (table_size--) {
> >> + if (table->exit_code == exit_code)
> >> + return table->reason;
> >
> > ... table[exit_code] ...
> >
>
>
> Actually, this array is not indexed by exit_code, it means:
> table[exit_code].exit_code != exit_code.

So make it indexed by exit code.



--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/