summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2018-01-16 03:51:48 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-03-10 22:05:54 +0100
commit860f9f6b02e9e846c4cfb3505efed331a910d0b7 (patch)
tree2fc04be64e2ba47c05d7ce356bf0652012b43437 /kernel/trace/trace.h
parenttracing: Add hist_data member to hist_field (diff)
downloadlinux-860f9f6b02e9e846c4cfb3505efed331a910d0b7.tar.xz
linux-860f9f6b02e9e846c4cfb3505efed331a910d0b7.zip
tracing: Add usecs modifier for hist trigger timestamps
Appending .usecs onto a common_timestamp field will cause the timestamp value to be in microseconds instead of the default nanoseconds. A typical latency histogram using usecs would look like this: # echo 'hist:keys=pid,prio:ts0=common_timestamp.usecs ... # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 ... This also adds an external trace_clock_in_ns() to trace.c for the timestamp conversion. Link: http://lkml.kernel.org/r/4e813705a170b3e13e97dc3135047362fb1a39f3.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 99060f7eebbd..89771b4f16df 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -289,6 +289,8 @@ extern void trace_array_put(struct trace_array *tr);
extern int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs);
+extern bool trace_clock_in_ns(struct trace_array *tr);
+
/*
* The global tracer (top) should be the first trace array added,
* but we check the flag anyway.