[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091123105156.GA14736@elte.hu>
Date: Mon, 23 Nov 2009 11:51:56 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8][RFC] perf: be paranoid about child times?
* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> Normally we flatten the inherited hierarchy by attaching all childs to
> the top parent, therefore a child's child_total_time_* should never
> get incremented, add it anyway?
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
> kernel/perf_event.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/kernel/perf_event.c
> ===================================================================
> --- linux-2.6.orig/kernel/perf_event.c
> +++ linux-2.6/kernel/perf_event.c
> @@ -1780,8 +1780,10 @@ u64 perf_event_read_value(struct perf_ev
>
> list_for_each_entry(child, &event->child_list, child_list) {
> total += perf_event_read(child);
> - *enabled += child->total_time_enabled;
> - *running += child->total_time_running;
> + *enabled += child->total_time_enabled +
> + atomic64_read(&child->child_total_time_enabled);
> + *running += child->total_time_running +
> + atomic64_read(&child->child_total_time_running);
Stick in a WARN_ON_ONCE() instead?
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists