diff options
author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2008-11-14 17:47:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-16 03:01:30 -0500 |
commit | a0bca6a59ebc052751eed6e3b182c153495672d8 (patch) | |
tree | 657ca4a1c63cb6303a28a7b512a99af592e45a20 /Documentation/markers.txt | |
parent | c1df1bd2c4d4b20c83755a0f41956b57aec4842a (diff) |
markers: create DEFINE_MARKER and GET_MARKER (new API)
Impact: new API.
Allow markers to be used only for declaration, without function call
associated. Useful to create specialized probes.
The problem we had is that two function calls were required when one
wanted to put a marker in a tracepoint probe. Now the marker can be used
simply for trace data type declaration, leaving the trace write work
within the tracepoint probe without any additional function call.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/markers.txt')
-rw-r--r-- | Documentation/markers.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/markers.txt b/Documentation/markers.txt index 089f6138fcd9..6d275e4ef385 100644 --- a/Documentation/markers.txt +++ b/Documentation/markers.txt | |||
@@ -70,6 +70,20 @@ a printk warning which identifies the inconsistency: | |||
70 | 70 | ||
71 | "Format mismatch for probe probe_name (format), marker (format)" | 71 | "Format mismatch for probe probe_name (format), marker (format)" |
72 | 72 | ||
73 | Another way to use markers is to simply define the marker without generating any | ||
74 | function call to actually call into the marker. This is useful in combination | ||
75 | with tracepoint probes in a scheme like this : | ||
76 | |||
77 | void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk); | ||
78 | |||
79 | DEFINE_MARKER_TP(marker_eventname, tracepoint_name, probe_tracepoint_name, | ||
80 | "arg1 %u pid %d"); | ||
81 | |||
82 | notrace void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk) | ||
83 | { | ||
84 | struct marker *marker = &GET_MARKER(kernel_irq_entry); | ||
85 | /* write data to trace buffers ... */ | ||
86 | } | ||
73 | 87 | ||
74 | * Probe / marker example | 88 | * Probe / marker example |
75 | 89 | ||