aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorSong Liu <[email protected]>2023-03-13 17:16:08 +0000
committerPeter Zijlstra <[email protected]>2023-03-15 20:49:46 +0000
commitbaf1b12a67f5b24f395baca03e442ce27cab0c18 (patch)
treef9712ff14ca14f51daf9ec21bc3b534f55040fcc /tools/perf/util/trace-event-scripting.c
parentperf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_eve... (diff)
downloadkernel-baf1b12a67f5b24f395baca03e442ce27cab0c18.tar.gz
kernel-baf1b12a67f5b24f395baca03e442ce27cab0c18.zip
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions