Re: [PATCH] perf_counter: Make software counters work as per-cpucounters

From: Ingo Molnar
Date: Tue Feb 10 2009 - 08:14:46 EST



* Zhang, Yanmin <yanmin_zhang@xxxxxxxxxxxxxxx> wrote:

> > > Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx>
> I tested it. The patch does fix the crash.

Great!

> > ok - i've applied your patch from email to allow Yanmin to test tip:master.
> Ingo,
>
> Here is the patch to add system-wide collection for perfstat.c.
>
> With the new parameter '-s', perfstat introduces very little overhead to benchmark
> testing. [...]

Very nice. I've applied your patch to perfstat.c and have uploaded the new version
to the usual place:

http://redhat.com/~mingo/perfcounters/perfstat.c

> [...] If tracking performance data without '-s', sometimes perfstat has too much
> impact on benchmark results, especially on netperf UDP-U-4k.

Yes - and we need to optimize that. It wont ever be zero-cost though, so -s makes
sense independently of any need for optimizations. -s can also be used to measure
the overhead of perfstat per task counters itself, via recursive inherited counters
like this:

perfstat -s perfstat ./workload

Thanks,

Ingo
--
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/