mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
tracing: Unify the "boot" and "mono" tracing clocks
Unify the "boot" and "mono" tracing clocks and document the new behaviour. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: John Stultz <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Kevin Easton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mark Salyzyn <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Prarit Bhargava <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
1 parent
127bfa5f43
commit
92af4dcb4e
3 files changed
+4
-18
No files matched your search
@@ -449,17 +449,9 @@ of ftrace. Here is a list of some of the key files:
|
||||
which is montonic but is not subject to any rate adjustments
|
||||
and ticks at the same rate as the hardware clocksource.
|
||||
|
||||
boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the
|
||||
fast monotonic clock, but also accounts for time spent in
|
||||
suspend. Since the clock access is designed for use in
|
||||
tracing in the suspend path, some side effects are possible
|
||||
if clock is accessed after the suspend time is accounted before
|
||||
the fast mono clock is updated. In this case, the clock update
|
||||
appears to happen slightly sooner than it normally would have.
|
||||
Also on 32-bit systems, it's possible that the 64-bit boot offset
|
||||
sees a partial update. These effects are rare and post
|
||||
processing should be able to handle them. See comments in the
|
||||
ktime_get_boot_fast_ns() function for more information.
|
||||
boot: Same as mono. Used to be a separate clock which accounted
|
||||
for the time spent in suspend while CLOCK_MONOTONIC did
|
||||
not.
|
||||
|
||||
To set a clock, simply echo the clock name into this file.
|
||||
|
||||
|
||||
@@ -113,12 +113,6 @@ extern u64 ktime_get_mono_fast_ns(void);
|
||||
extern u64 ktime_get_raw_fast_ns(void);
|
||||
extern u64 ktime_get_real_fast_ns(void);
|
||||
|
||||
/* Clock BOOTTIME compatibility wrappers */
|
||||
static inline u64 ktime_get_boot_fast_ns(void)
|
||||
{
|
||||
return ktime_get_mono_fast_ns();
|
||||
}
|
||||
|
||||
/*
|
||||
* timespec64 interfaces utilizing the ktime based ones
|
||||
*/
|
||||
|
||||
@@ -1164,7 +1164,7 @@ static struct {
|
||||
{ trace_clock, "perf", 1 },
|
||||
{ ktime_get_mono_fast_ns, "mono", 1 },
|
||||
{ ktime_get_raw_fast_ns, "mono_raw", 1 },
|
||||
{ ktime_get_boot_fast_ns, "boot", 1 },
|
||||
{ ktime_get_mono_fast_ns, "boot", 1 },
|
||||
ARCH_TRACE_CLOCKS
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user