summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2018-03-01 17:33:38 +0100
committerIngo Molnar <mingo@kernel.org>2018-03-13 07:34:23 +0100
commit92af4dcb4e1c5f58dc337bc97bdffd4e853dbc93 (patch)
treec3ca7b44890beee561e7bf7d3c44d92a12fa5ce8
parent127bfa5f4342e63d83a0b07ece376c2e8878e4a5 (diff)
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 <tglx@linutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kevin Easton <kevin@guarana.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Salyzyn <salyzyn@android.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Petr Mladek <pmladek@suse.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20180301165150.489635255@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--Documentation/trace/ftrace.txt14
-rw-r--r--include/linux/timekeeping.h6
-rw-r--r--kernel/trace/trace.c2
3 files changed, 4 insertions, 18 deletions
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index d4601df6e72e..bf89f98bfdb9 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -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.
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index abb396731332..82c219dfd3bb 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -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
*/
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 20a2300ae4e8..300f4ea39646 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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
};