UPSTREAM: 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)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 1 Dec 2016 09:48:44 +0000 (15:18 +0530)
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.

Bug: b/33184060

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c

index bff7d4c69274b3e6755b26bc39d6717dca02517e..293af3346c8c96a8672a83ac622092325db430ab 100644 (file)
@@ -890,6 +890,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
 };