From: byungchul.park@lge.com
To: rostedt@goodmis.org, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, seungho1.park@lge.com,
jolsa@redhat.com, Byungchul Park <byungchul.park@lge.com>
Subject: [PATCH v2 3/3] tracing: add additional marks to signal very large delay
Date: Wed, 5 Nov 2014 16:18:46 +0900 [thread overview]
Message-ID: <1415171926-9782-4-git-send-email-byungchul.park@lge.com> (raw)
In-Reply-To: <1415171926-9782-1-git-send-email-byungchul.park@lge.com>
From: Byungchul Park <byungchul.park@lge.com>
Currently, some tracers tracing latency print "!" or "+" just after time
to signal overhead, depending on the interval between events. Even it is
usually enough to do that, we sometimes need to be signaled for bigger
interval than 100 micro seconds.
Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
Documentation/trace/ftrace.txt | 8 +++++---
kernel/trace/trace_output.c | 15 ++++++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index f827e2f..64efb3e 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -680,9 +680,11 @@ The above is mostly meaningful for kernel developers.
needs to be fixed to be only relative to the same CPU.
The marks are determined by the difference between this
current trace and the next trace.
- '!' - greater than preempt_mark_thresh (default 100)
- '+' - greater than 1 microsecond
- ' ' - less than or equal to 1 microsecond.
+ '$' - greater than 1 second
+ '#' - greater than 1000 microsecond
+ '!' - greater than 100 microsecond
+ '+' - greater than 10 microsecond
+ ' ' - less than or equal to 10 microsecond.
The rest is the same as the 'trace' file.
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index c6977d5..e63fac3 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -124,7 +124,7 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
if (ret == (const char *)(trace_seq_buffer_ptr(p)))
trace_seq_printf(p, "0x%lx", val);
-
+
trace_seq_putc(p, 0);
return ret;
@@ -471,7 +471,13 @@ lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
return trace_print_lat_fmt(s, entry);
}
-static unsigned long preempt_mark_thresh_us = 100;
+DEFINE_MARK_STRUCT = {
+ DEFINE_MARK(0ULL , ' '), /* 0 usecs */
+ DEFINE_MARK(10000ULL , '+'), /* 10 usecs */
+ DEFINE_MARK(100000ULL , '!'), /* 100 usecs */
+ DEFINE_MARK(1000000ULL , '#'), /* 1000 usecs */
+ DEFINE_MARK(1000000000ULL , '$'), /* 1 sec */
+};
static int
lat_print_timestamp(struct trace_iterator *iter, u64 next_ts)
@@ -506,8 +512,7 @@ lat_print_timestamp(struct trace_iterator *iter, u64 next_ts)
return trace_seq_printf(
s, " %4lldus%c: ",
abs_ts,
- rel_ts > preempt_mark_thresh_us ? '!' :
- rel_ts > 1 ? '+' : ' ');
+ MARK(rel_ts * NSEC_PER_USEC));
} else { /* !verbose && !in_ns */
return trace_seq_printf(s, " %4lld: ", abs_ts);
}
@@ -692,7 +697,7 @@ int register_ftrace_event(struct trace_event *event)
goto out;
} else {
-
+
event->type = next_event_type++;
list = &ftrace_event_list;
}
--
1.7.9.5
next prev parent reply other threads:[~2014-11-05 7:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 7:18 [PATCH v2 0/3] tracing: signaling large duration and delay byungchul.park
2014-11-05 7:18 ` [PATCH v2 1/3] tracing, function_graph: fix micro seconds notation in comment byungchul.park
2014-11-14 3:32 ` Steven Rostedt
2014-11-05 7:18 ` [PATCH v2 2/3] tracing, function_graph: add additional marks to signal very large function execution time byungchul.park
2014-11-14 3:32 ` Steven Rostedt
2014-11-14 6:18 ` Byungchul Park
2014-11-05 7:18 ` byungchul.park [this message]
2014-11-14 3:38 ` [PATCH v2 3/3] tracing: add additional marks to signal very large delay Steven Rostedt
2014-11-14 6:22 ` Byungchul Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415171926-9782-4-git-send-email-byungchul.park@lge.com \
--to=byungchul.park@lge.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=seungho1.park@lge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®