diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-04-01 14:57:27 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-04-08 09:39:55 -0400 |
commit | 889204278ccf98c5c097b1d1ae69babc6a3222fd (patch) | |
tree | 53778b4af3b5ca401c57bc707f9f5ba838c394e7 /samples | |
parent | acd388fd3af350ab24c6ab6f19b83fc4a4f3aa60 (diff) |
tracing: Update trace-event-sample with TRACE_SYSTEM_VAR documentation
Add documentation about TRACE_SYSTEM needing to be alpha-numeric or with
underscores, and that if it is not, then the use of TRACE_SYSTEM_VAR is
required to make something that is.
An example of this is shown in samples/trace_events/trace-events-sample.h
Link: http://lkml.kernel.org/r/20150403013802.220157513@goodmis.org
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/trace_events/trace-events-sample.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index a2c8b02b6359..19405f18cc8a 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h | |||
@@ -22,7 +22,25 @@ | |||
22 | * protection, just like TRACE_INCLUDE_FILE. | 22 | * protection, just like TRACE_INCLUDE_FILE. |
23 | */ | 23 | */ |
24 | #undef TRACE_SYSTEM | 24 | #undef TRACE_SYSTEM |
25 | #define TRACE_SYSTEM sample | 25 | #define TRACE_SYSTEM sample-trace |
26 | |||
27 | /* | ||
28 | * TRACE_SYSTEM is expected to be a C valid variable (alpha-numeric | ||
29 | * and underscore), although it may start with numbers. If for some | ||
30 | * reason it is not, you need to add the following lines: | ||
31 | */ | ||
32 | #undef TRACE_SYSTEM_VAR | ||
33 | #define TRACE_SYSTEM_VAR sample_trace | ||
34 | /* | ||
35 | * But the above is only needed if TRACE_SYSTEM is not alpha-numeric | ||
36 | * and underscored. By default, TRACE_SYSTEM_VAR will be equal to | ||
37 | * TRACE_SYSTEM. As TRACE_SYSTEM_VAR must be alpha-numeric, if | ||
38 | * TRACE_SYSTEM is not, then TRACE_SYSTEM_VAR must be defined with | ||
39 | * only alpha-numeric and underscores. | ||
40 | * | ||
41 | * The TRACE_SYSTEM_VAR is only used internally and not visible to | ||
42 | * user space. | ||
43 | */ | ||
26 | 44 | ||
27 | /* | 45 | /* |
28 | * Notice that this file is not protected like a normal header. | 46 | * Notice that this file is not protected like a normal header. |