Re: [PATCH 1/2] perf, tools: Document event specifications better

From: Jiri Olsa
Date: Tue Mar 22 2016 - 03:57:49 EST

On Mon, Mar 21, 2016 at 08:56:32AM -0700, Andi Kleen wrote:


> +------------
> +
> +Perf supports time based multiplexing of events, when the number of events
> +active exceeds the number of hardware performance counters. Multiplexing
> +can cause measurement errors when the workload changes its execution
> +profile.
> +
> +When metrics are computed using formulas from event counts, it is useful to
> +ensure some events are always measured together as a group to minimize multiplexing
> +errors. Event groups can be specified using { }.
> +
> + perf stat -e '{instructions,cycles}' ...
> +
> +When too many events are specified in the group perf the event will not
maybe: 'none of them' will be meassured.

> +be measured. The number of available performance counters depend on the CPU.
> +For example Intel Core CPUs have typically four generic performance counters
> +for the core, plus a number of specialized fixed counters.
> +
> +Events from multiple different PMUs cannot be mixed in a group.

hum, but we allow that right?

only when there's mixture of SW and HW events we move
it all silently under HW event context