]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf: Clean up perf ctx time
authorKan Liang <kan.liang@linux.intel.com>
Sat, 6 Dec 2025 00:16:41 +0000 (16:16 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 12:31:04 +0000 (13:31 +0100)
commitf5c7de8f84a152d559256aa4d0fc953118b73ca4
tree811d4467bac90a238d4f7626118430a77e898950
parenteff95e170275d9e80b968f335cd03d0ac250d2d1
perf: Clean up perf ctx time

The current perf tracks two timestamps for the normal ctx and cgroup.
The same type of variables and similar codes are used to track the
timestamps. In the following patch, the third timestamp to track the
guest time will be introduced.
To avoid the code duplication, add a new struct perf_time_ctx and factor
out a generic function update_perf_time_ctx().

No functional change.

Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://patch.msgid.link/20251206001720.468579-6-seanjc@google.com
include/linux/perf_event.h
kernel/events/core.c