Re: [Perfctr-devel] [patch] Performance Counters for Linux, v4

From: Andi Kleen
Date: Wed Dec 17 2008 - 09:54:50 EST


> OK, now I see where I got the understanding of this thread.
> PERF_COUNT_CACHE_REFERENCES did not refer to a PAPI event. My error.

Ok that makes sense.

> A suggested kernel/user API that obscures the underlying PMU hardware
> counters instead of exposing it to user level code should be dropped as

It doesn't really obscure it (although there are some doubts it can
express many of the more powerful/complicated features of modern PMUs),
but provides a set of generalized standard events in addition, plus
a "raw mode". The current list of events as of v4 is:

+ PERF_COUNT_CYCLES = 0,
+ PERF_COUNT_INSTRUCTIONS = 1,
+ PERF_COUNT_CACHE_REFERENCES = 2,
+ PERF_COUNT_CACHE_MISSES = 3,
+ PERF_COUNT_BRANCH_INSTRUCTIONS = 4,
+ PERF_COUNT_BRANCH_MISSES = 5,

I think cache_references/misses is not well defined enough to be useful.

The Intel architectural perfmon (which is a standard set of event
supported over a range of Intel x86 micro architectures) has similar
events defined as hitting the LLC (last level cache). With that
it makes some sense.

-Andi

--
ak@xxxxxxxxxxxxxxx
--
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/