[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230314195818.GD273121@hirez.programming.kicks-ass.net>
Date: Tue, 14 Mar 2023 20:58:18 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Song Liu <song@...nel.org>
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH v2] perf: fix perf_event_context->time
On Mon, Mar 13, 2023 at 10:16:08AM -0700, Song Liu wrote:
> Time readers rely on perf_event_context->[time|timestamp|timeoffset] to get
> accurate time_enabled and time_running for an event. The difference between
> ctx->timestamp and ctx->time is the among of time when the context is not
> enabled. __update_context_time(ctx, false) is used to increase timestamp,
> but not time. Therefore, it should only be called in ctx_sched_in() when
> EVENT_TIME was not enabled.
>
> Fixes: 09f5e7dc7ad7 ("perf: Fix perf_event_read_local() time")
> Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Acked-by: Namhyung Kim <namhyung@...nel.org>
> Signed-off-by: Song Liu <song@...nel.org>
Looks like I'm wearing another brown paper bag tonight..
Thanks!
Powered by blists - more mailing lists