Song Liu baf1b12a67 perf: fix perf_event_context->time
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")
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20230313171608.298734-1-song@kernel.org
2023-03-15 21:49:46 +01:00
..
2023-03-06 20:28:00 -08:00
2023-02-21 18:24:12 -08:00
2022-12-02 11:25:00 +01:00
2023-03-15 21:49:46 +01:00
2022-12-21 14:31:52 -08:00
2023-02-23 14:00:10 -08:00
2023-02-21 10:45:51 -08:00
2023-02-23 14:05:08 -08:00
2023-02-23 13:49:45 -08:00
2023-03-03 10:21:39 -08:00
2022-08-29 19:47:03 -04:00
2022-01-11 13:08:21 -08:00
2022-09-26 10:13:13 -07:00
2023-02-21 15:27:48 -08:00
2022-11-15 00:42:02 -08:00
2022-12-23 12:00:24 -08:00
2023-02-02 16:26:06 -08:00
2022-12-19 12:33:32 -06:00
2022-06-29 13:07:16 +02:00
2022-12-27 12:52:10 +01:00
2022-10-10 12:49:34 -07:00
2022-02-25 09:36:06 +01:00
2023-02-21 13:34:07 -08:00
2022-08-06 16:38:17 -07:00