On Thu, 2009-11-26 at 09:24 -0800, Stephane Eranian wrote:
>       When a pinned group cannot be scheduled it goes into error state.
>       Normally a group cannot go out of error state without being explicitly
>       re-enabled or disabled. There was a bug in per-thread mode, whereby
>       upon termination of the thread, the group would transition from error
>       to off leading to bogus counts and timing information returned by
>       read().

>       Signed-off-by: Stephane Eranian <eran...@google.com>

Right, good catch, totally forgot about error state :/

Acked-by: Peter Zijlstra <a.p.zijls...@chello.nl>
        
> ---
>  perf_event.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index 0b0d5f7..7a8bb5b 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -333,7 +333,16 @@ list_del_event(struct perf_event *event, struct 
> perf_event_context *ctx)
>               event->group_leader->nr_siblings--;
>  
>       update_event_times(event);
> -     event->state = PERF_EVENT_STATE_OFF;
> +
> +     /*
> +      * If event was in error state, then keep it
> +      * that way, otherwise bogus counts will be
> +      * returned on read(). The only way to get out
> +      * of error state is by explicit re-enabling
> +      * of the event
> +      */
> +     if (event->state > PERF_EVENT_STATE_OFF)
> +             event->state = PERF_EVENT_STATE_OFF;
>  
>       /*
>        * If this was a group event with sibling events then



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to