diff options
author | Omar Sandoval <osandov@fb.com> | 2015-06-24 11:36:54 -0700 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-07-13 14:41:47 -0400 |
commit | 19ece0a86eb08be7c84aea0aa3112b1dffe42556 (patch) | |
tree | d0b32c0d78ca76e77de0d2a19c8fd8c86ee4d65e | |
parent | 8ee345d844cfe45edd97b320c93353e365c79bb8 (diff) | |
download | trace-cmd-19ece0a86eb08be7c84aea0aa3112b1dffe42556.tar.gz |
trace-cmd: Annotate function durations like the kernel
Since kernel commit, 8e1e1df29d83 ("tracing: Add additional marks to
signal very large time deltas") the kernel annotates durations longer
than 1000 usecs with # and longer than 1 sec with $. Update trace-cmd
report to be consistent with it.
Link: http://lkml.kernel.org/r/05162f43fb6322f4c46722403449ffdab134e3d2.1435170824.git.osandov@fb.com
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-ftrace.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/trace-ftrace.c b/trace-ftrace.c index bdf11ce4..636b08b5 100644 --- a/trace-ftrace.c +++ b/trace-ftrace.c @@ -147,11 +147,19 @@ static void print_graph_overhead(struct trace_seq *s, if (duration == ~0ULL) return (void)trace_seq_printf(s, " "); - /* Duration exceeded 100 msecs */ + /* Duration exceeded 1 sec */ + if (duration > 1000000000ULL) + return (void)trace_seq_printf(s, "$ "); + + /* Duration exceeded 1000 usecs */ + if (duration > 1000000ULL) + return (void)trace_seq_printf(s, "# "); + + /* Duration exceeded 100 usecs */ if (duration > 100000ULL) return (void)trace_seq_printf(s, "! "); - /* Duration exceeded 10 msecs */ + /* Duration exceeded 10 usecs */ if (duration > 10000ULL) return (void)trace_seq_printf(s, "+ "); |