lkml.org 
[lkml]   [2010]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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>



\
 
 \ /
  Last update: 2010-06-29 17:39    [W:0.220 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site