diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-02-15 09:51:49 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-02-21 11:08:24 -0500 |
commit | ceec0b6fc7cd43b38a40c2d40223f9cd0616f0cd (patch) | |
tree | 31e7deb76a5827883251dc578300bdc35ef62538 /include | |
parent | e248491ac283b516958ca9ab62c8e74b6718bca8 (diff) |
ftrace, perf: Add open/close tracepoint perf registration actions
Adding TRACE_REG_PERF_OPEN and TRACE_REG_PERF_CLOSE to differentiate
register/unregister from open/close actions.
The register/unregister actions are invoked for the first/last
tracepoint user when opening/closing the event.
The open/close actions are invoked for each tracepoint user when
opening/closing the event.
Link: http://lkml.kernel.org/r/1329317514-8131-3-git-send-email-jolsa@redhat.com
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace_event.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index c3da42dd22ba..195e3606ddd7 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -146,6 +146,8 @@ enum trace_reg { | |||
146 | TRACE_REG_UNREGISTER, | 146 | TRACE_REG_UNREGISTER, |
147 | TRACE_REG_PERF_REGISTER, | 147 | TRACE_REG_PERF_REGISTER, |
148 | TRACE_REG_PERF_UNREGISTER, | 148 | TRACE_REG_PERF_UNREGISTER, |
149 | TRACE_REG_PERF_OPEN, | ||
150 | TRACE_REG_PERF_CLOSE, | ||
149 | }; | 151 | }; |
150 | 152 | ||
151 | struct ftrace_event_call; | 153 | struct ftrace_event_call; |
@@ -157,7 +159,7 @@ struct ftrace_event_class { | |||
157 | void *perf_probe; | 159 | void *perf_probe; |
158 | #endif | 160 | #endif |
159 | int (*reg)(struct ftrace_event_call *event, | 161 | int (*reg)(struct ftrace_event_call *event, |
160 | enum trace_reg type); | 162 | enum trace_reg type, void *data); |
161 | int (*define_fields)(struct ftrace_event_call *); | 163 | int (*define_fields)(struct ftrace_event_call *); |
162 | struct list_head *(*get_fields)(struct ftrace_event_call *); | 164 | struct list_head *(*get_fields)(struct ftrace_event_call *); |
163 | struct list_head fields; | 165 | struct list_head fields; |
@@ -165,7 +167,7 @@ struct ftrace_event_class { | |||
165 | }; | 167 | }; |
166 | 168 | ||
167 | extern int ftrace_event_reg(struct ftrace_event_call *event, | 169 | extern int ftrace_event_reg(struct ftrace_event_call *event, |
168 | enum trace_reg type); | 170 | enum trace_reg type, void *data); |
169 | 171 | ||
170 | enum { | 172 | enum { |
171 | TRACE_EVENT_FL_ENABLED_BIT, | 173 | TRACE_EVENT_FL_ENABLED_BIT, |