aboutsummaryrefslogtreecommitdiffstats
path: root/samples/trace_events/trace-events-sample.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-02-09 16:05:55 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-02-09 16:05:55 -0500
commitc4c7eb29382c456b9be9858c357a490ae0ccd0f6 (patch)
tree96116b672ee0fa5a2347828b33c31fb8dbed6434 /samples/trace_events/trace-events-sample.c
parenttracing: Update the TRACE_EVENT fields available in the sample code (diff)
downloadlinux-dev-c4c7eb29382c456b9be9858c357a490ae0ccd0f6.tar.xz
linux-dev-c4c7eb29382c456b9be9858c357a490ae0ccd0f6.zip
tracing: Add TRACE_EVENT_CONDITION sample
The sample code lacks an example of TRACE_EVENT_CONDITION, and it has been expressed to me that this feature for TRACE_EVENT is not well known and not used when it could be. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'samples/trace_events/trace-events-sample.c')
-rw-r--r--samples/trace_events/trace-events-sample.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_events/trace-events-sample.c
index 16c15c08ed38..c396a49b5d78 100644
--- a/samples/trace_events/trace-events-sample.c
+++ b/samples/trace_events/trace-events-sample.c
@@ -31,8 +31,11 @@ static void simple_thread_func(int cnt)
array[i] = i + 1;
array[i] = 0;
+ /* Silly tracepoints */
trace_foo_bar("hello", cnt, array, random_strings[len],
tsk_cpus_allowed(current));
+
+ trace_foo_bar_with_cond("Some times print", cnt);
}
static int simple_thread(void *arg)