From: Jiri Olsa <jolsa@redhat.com>
To: mingo@elte.hu, rostedt@goodmis.org, fweisbec@gmail.com
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 1/2] tracing: adding lost-events option
Date: Wed, 14 Apr 2010 15:00:04 +0200 [thread overview]
Message-ID: <1271250005-11434-2-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1271250005-11434-1-git-send-email-jolsa@redhat.com>
hi,
adding option for control LOST EVENTS message output.
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
kernel/trace/trace.c | 7 +++++--
kernel/trace/trace.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 60f3b62..bf00438 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -332,7 +332,7 @@ static DECLARE_WAIT_QUEUE_HEAD(trace_wait);
/* trace_flags holds trace_options default values */
unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK |
TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME |
- TRACE_ITER_GRAPH_TIME;
+ TRACE_ITER_GRAPH_TIME | TRACE_ITER_LOST_EVENTS;
static int trace_stop_count;
static DEFINE_SPINLOCK(tracing_start_lock);
@@ -416,6 +416,7 @@ static const char *trace_options[] = {
"latency-format",
"sleep-time",
"graph-time",
+ "lost-events",
NULL
};
@@ -2040,9 +2041,11 @@ static enum print_line_t print_trace_line(struct trace_iterator *iter)
{
enum print_line_t ret;
- if (iter->lost_events)
+ if ((trace_flags & TRACE_ITER_LOST_EVENTS) &&
+ (iter->lost_events)) {
trace_seq_printf(&iter->seq, "CPU:%d [LOST %lu EVENTS]\n",
iter->cpu, iter->lost_events);
+ }
if (iter->trace && iter->trace->print_line) {
ret = iter->trace->print_line(iter);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index bec2c97..4607b43 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -606,6 +606,7 @@ enum trace_iterator_flags {
TRACE_ITER_LATENCY_FMT = 0x20000,
TRACE_ITER_SLEEP_TIME = 0x40000,
TRACE_ITER_GRAPH_TIME = 0x80000,
+ TRACE_ITER_LOST_EVENTS = 0x100000,
};
/*
--
1.6.6.1
next prev parent reply other threads:[~2010-04-14 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 13:00 [PATCH 0/2] tracing: lost events changes Jiri Olsa
2010-04-14 13:00 ` Jiri Olsa [this message]
2010-04-14 13:00 ` [PATCH 2/2] tracing: supress lost events message for iterator "trace" Jiri Olsa
2010-04-14 15:11 ` [PATCH 0/2] tracing: lost events changes Steven Rostedt
2010-04-14 16:00 ` Ingo Molnar
2010-04-14 16:15 ` Steven Rostedt
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=1271250005-11434-2-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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®