1
0

tracing: Add samples of DECLARE_EVENT_CLASS() and DEFINE_EVENT()

Add to samples/trace_events/ the macros DECLARE_EVENT_CLASS() and
DEFINE_EVENT() and recommend using them over multiple TRACE_EVENT()
macros if the multiple events have the same format.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Este cometimento está contido em:
Steven Rostedt (Red Hat)
2015-02-09 17:14:04 -05:00
cometido por Steven Rostedt
ascendente 6adc13f8c0
cometimento 7496946a88
2 ficheiros modificados com 88 adições e 0 eliminações

Ver ficheiro

@@ -35,7 +35,13 @@ static void simple_thread_func(int cnt)
trace_foo_bar("hello", cnt, array, random_strings[len],
tsk_cpus_allowed(current));
trace_foo_with_template_simple("HELLO", cnt);
trace_foo_bar_with_cond("Some times print", cnt);
trace_foo_with_template_cond("prints other times", cnt);
trace_foo_with_template_print("I have to be different", cnt);
}
static int simple_thread(void *arg)
@@ -58,6 +64,7 @@ static void simple_thread_func_fn(int cnt)
/* More silly tracepoints */
trace_foo_bar_with_fn("Look at me", cnt);
trace_foo_with_template_fn("Look at me too", cnt);
}
static int simple_thread_fn(void *arg)