diff options
author | Mandeep Singh Baines <mandeep.baines@gmail.com> | 2012-09-07 21:12:19 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-09-24 14:10:44 -0400 |
commit | 5224c3a31549f1c056039545b289e1b01ed02f12 (patch) | |
tree | 30750af387cad904c3935418b0c17384abce1de8 /kernel/trace/trace.c | |
parent | 50a011f6409e888d5f41343024d24885281f048c (diff) |
tracing: Add an option for disabling markers
In our application, we have trace markers spread through user-space.
We have markers in GL, X, etc. These are super handy for Chrome's
about:tracing feature (Chrome + system + kernel trace view), but
can be very distracting when you're trying to debug a kernel issue.
I normally, use "grep -v tracing_mark_write" but it would be nice
if I could just temporarily disable markers all together.
Link: http://lkml.kernel.org/r/1347066739-26285-1-git-send-email-msb@chromium.org
CC: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 08acf42e325b..1ec5c1dab629 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -328,7 +328,7 @@ static DECLARE_WAIT_QUEUE_HEAD(trace_wait); | |||
328 | unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK | | 328 | unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK | |
329 | TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME | | 329 | TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME | |
330 | TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE | | 330 | TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE | |
331 | TRACE_ITER_IRQ_INFO; | 331 | TRACE_ITER_IRQ_INFO | TRACE_ITER_MARKERS; |
332 | 332 | ||
333 | static int trace_stop_count; | 333 | static int trace_stop_count; |
334 | static DEFINE_RAW_SPINLOCK(tracing_start_lock); | 334 | static DEFINE_RAW_SPINLOCK(tracing_start_lock); |
@@ -470,6 +470,7 @@ static const char *trace_options[] = { | |||
470 | "overwrite", | 470 | "overwrite", |
471 | "disable_on_free", | 471 | "disable_on_free", |
472 | "irq-info", | 472 | "irq-info", |
473 | "markers", | ||
473 | NULL | 474 | NULL |
474 | }; | 475 | }; |
475 | 476 | ||
@@ -3886,6 +3887,9 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, | |||
3886 | if (tracing_disabled) | 3887 | if (tracing_disabled) |
3887 | return -EINVAL; | 3888 | return -EINVAL; |
3888 | 3889 | ||
3890 | if (!(trace_flags & TRACE_ITER_MARKERS)) | ||
3891 | return -EINVAL; | ||
3892 | |||
3889 | if (cnt > TRACE_BUF_SIZE) | 3893 | if (cnt > TRACE_BUF_SIZE) |
3890 | cnt = TRACE_BUF_SIZE; | 3894 | cnt = TRACE_BUF_SIZE; |
3891 | 3895 | ||