Re: [RFC][PATCH 11/11] perf: Rework the PMU methods

From: Frederic Weisbecker
Date: Tue Jun 29 2010 - 11:37:52 EST

On Thu, Jun 24, 2010 at 04:28:15PM +0200, Peter Zijlstra wrote:
> Replace pmu::{enable,disable,start,stop,unthrottle} with
> pmu::{add,del,start,stop}, all of which take a flags argument.
> The new interface extends the capability to stop a counter while
> keeping it scheduled on the PMU. We replace the throttled state with
> the generic stopped state.
> This also allows us to efficiently stop/start counters over certain
> code paths (like IRQ handlers).
> It also allows scheduling a counter without it starting, allowing for
> a generic frozen state (useful for rotating stopped counters).
> The stopped state is implemented in two different ways, depending on
> how the architecture implemented the throttled state:
> 1) We disable the counter:
> a) the pmu has per-counter enable bits, we flip that
> b) we program a NOP event, preserving the counter state
> 2) We store the counter state and ignore all read/overflow events
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at