Skip to content

Commit 76f1191

Browse files
committed
tracing: Add "perf" trace_clock
The function trace_clock() calls "local_clock()" which is exactly the same clock that perf uses. I'm not sure why perf doesn't call trace_clock(), as trace_clock() doesn't have any users. But now it does. As trace_clock() calls local_clock() like perf does, I added the trace_clock "perf" option that uses trace_clock(). Now the ftrace buffers can use the same clock as perf uses. This will be useful when perf starts reading the ftrace buffers, and will be able to interleave them with the same clock data. Cc: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent 8aacf01 commit 76f1191

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ static struct {
648648
{ trace_clock_global, "global", 1 },
649649
{ trace_clock_counter, "counter", 0 },
650650
{ trace_clock_jiffies, "uptime", 1 },
651+
{ trace_clock, "perf", 1 },
651652
ARCH_TRACE_CLOCKS
652653
};
653654

0 commit comments

Comments
 (0)