Messages in this thread | | | Date | Tue, 29 Jun 2010 17:37:56 +0200 | From | Frederic Weisbecker <> | Subject | Re: [RFC][PATCH 11/11] perf: Rework the PMU methods |
| |
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@chello.nl>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
| |