From: Jiri Olsa on 14 Apr 2010 09:10 hi, adding option for control LOST EVENTS message output. wbr, jirka Signed-off-by: Jiri Olsa <jolsa(a)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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: [PATCH 1/7] ext2: Use ext2_clear_super_error() in ext2_sync_fs() Next: Irish 2010 Winner |