Re: [PATCH 2/2] perf_counter: powerpc: Implement generalized cache events for POWER processors

Corey Ashford
2009-06-12T18:00:49Z

Paul Mackerras wrote:
> Ingo Molnar writes:
>

> Yeah.
>
> When thinking about having "composite" events, i.e. a counter whose
> value is computed from two or more hardware counters, I couldn't see
> how to do sampling in the general case. It's easy if we're just
> adding multiple counters, but sampling when subtracting counters is
> hard. For example, if you want to sample every N cache hits, and
> you're computing hits as accesses - misses, I couldn't see a decent
> way to know when to take the sample, not without having to take an
> interrupt on every access in some circumstances.

The PAPI equivalent of this, its preset aka standard events, do not allow
profiling or interrupt on overflow for "derived" events. "derived events" has
the same meaning as your composite events. So there is precedent for not
allowing sampling on them.

Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain