trace: Add an option for boot clock as trace clock
authorJoel Fernandes <joelaf@google.com>
Mon, 28 Nov 2016 22:35:23 +0000 (14:35 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 29 Nov 2016 17:02:59 +0000 (18:02 +0100)
Unlike monotonic clock, boot clock as a trace clock will account for
time spent in suspend useful for tracing suspend/resume. This uses
earlier introduced infrastructure for using the fast boot clock.

Signed-off-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Link: http://lkml.kernel.org/r/1480372524-15181-7-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c

index 8696ce6bf2f68838caefb8025ae3a6b133a2de64..f7b64db285dfec511dcf08d71f107e5a02457e84 100644 (file)
@@ -1125,6 +1125,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 },
        ARCH_TRACE_CLOCKS
 };