diff options
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r-- | include/linux/ftrace_event.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 8c9b7a1c4138..211e7ad2baf5 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -264,6 +264,7 @@ enum { | |||
264 | FTRACE_EVENT_FL_NO_SET_FILTER_BIT, | 264 | FTRACE_EVENT_FL_NO_SET_FILTER_BIT, |
265 | FTRACE_EVENT_FL_SOFT_MODE_BIT, | 265 | FTRACE_EVENT_FL_SOFT_MODE_BIT, |
266 | FTRACE_EVENT_FL_SOFT_DISABLED_BIT, | 266 | FTRACE_EVENT_FL_SOFT_DISABLED_BIT, |
267 | FTRACE_EVENT_FL_TRIGGER_MODE_BIT, | ||
267 | }; | 268 | }; |
268 | 269 | ||
269 | /* | 270 | /* |
@@ -275,6 +276,7 @@ enum { | |||
275 | * SOFT_MODE - The event is enabled/disabled by SOFT_DISABLED | 276 | * SOFT_MODE - The event is enabled/disabled by SOFT_DISABLED |
276 | * SOFT_DISABLED - When set, do not trace the event (even though its | 277 | * SOFT_DISABLED - When set, do not trace the event (even though its |
277 | * tracepoint may be enabled) | 278 | * tracepoint may be enabled) |
279 | * TRIGGER_MODE - When set, invoke the triggers associated with the event | ||
278 | */ | 280 | */ |
279 | enum { | 281 | enum { |
280 | FTRACE_EVENT_FL_ENABLED = (1 << FTRACE_EVENT_FL_ENABLED_BIT), | 282 | FTRACE_EVENT_FL_ENABLED = (1 << FTRACE_EVENT_FL_ENABLED_BIT), |
@@ -283,6 +285,7 @@ enum { | |||
283 | FTRACE_EVENT_FL_NO_SET_FILTER = (1 << FTRACE_EVENT_FL_NO_SET_FILTER_BIT), | 285 | FTRACE_EVENT_FL_NO_SET_FILTER = (1 << FTRACE_EVENT_FL_NO_SET_FILTER_BIT), |
284 | FTRACE_EVENT_FL_SOFT_MODE = (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT), | 286 | FTRACE_EVENT_FL_SOFT_MODE = (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT), |
285 | FTRACE_EVENT_FL_SOFT_DISABLED = (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT), | 287 | FTRACE_EVENT_FL_SOFT_DISABLED = (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT), |
288 | FTRACE_EVENT_FL_TRIGGER_MODE = (1 << FTRACE_EVENT_FL_TRIGGER_MODE_BIT), | ||
286 | }; | 289 | }; |
287 | 290 | ||
288 | struct ftrace_event_file { | 291 | struct ftrace_event_file { |
@@ -292,6 +295,7 @@ struct ftrace_event_file { | |||
292 | struct dentry *dir; | 295 | struct dentry *dir; |
293 | struct trace_array *tr; | 296 | struct trace_array *tr; |
294 | struct ftrace_subsystem_dir *system; | 297 | struct ftrace_subsystem_dir *system; |
298 | struct list_head triggers; | ||
295 | 299 | ||
296 | /* | 300 | /* |
297 | * 32 bit flags: | 301 | * 32 bit flags: |
@@ -299,6 +303,7 @@ struct ftrace_event_file { | |||
299 | * bit 1: enabled cmd record | 303 | * bit 1: enabled cmd record |
300 | * bit 2: enable/disable with the soft disable bit | 304 | * bit 2: enable/disable with the soft disable bit |
301 | * bit 3: soft disabled | 305 | * bit 3: soft disabled |
306 | * bit 4: trigger enabled | ||
302 | * | 307 | * |
303 | * Note: The bits must be set atomically to prevent races | 308 | * Note: The bits must be set atomically to prevent races |
304 | * from other writers. Reads of flags do not need to be in | 309 | * from other writers. Reads of flags do not need to be in |
@@ -310,6 +315,7 @@ struct ftrace_event_file { | |||
310 | */ | 315 | */ |
311 | unsigned long flags; | 316 | unsigned long flags; |
312 | atomic_t sm_ref; /* soft-mode reference counter */ | 317 | atomic_t sm_ref; /* soft-mode reference counter */ |
318 | atomic_t tm_ref; /* trigger-mode reference counter */ | ||
313 | }; | 319 | }; |
314 | 320 | ||
315 | #define __TRACE_EVENT_FLAGS(name, value) \ | 321 | #define __TRACE_EVENT_FLAGS(name, value) \ |
@@ -337,6 +343,10 @@ struct ftrace_event_file { | |||
337 | 343 | ||
338 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 344 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
339 | 345 | ||
346 | enum event_trigger_type { | ||
347 | ETT_NONE = (0), | ||
348 | }; | ||
349 | |||
340 | extern void destroy_preds(struct ftrace_event_file *file); | 350 | extern void destroy_preds(struct ftrace_event_file *file); |
341 | extern void destroy_call_preds(struct ftrace_event_call *call); | 351 | extern void destroy_call_preds(struct ftrace_event_call *call); |
342 | extern int filter_match_preds(struct event_filter *filter, void *rec); | 352 | extern int filter_match_preds(struct event_filter *filter, void *rec); |
@@ -347,6 +357,7 @@ extern int filter_check_discard(struct ftrace_event_file *file, void *rec, | |||
347 | extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec, | 357 | extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec, |
348 | struct ring_buffer *buffer, | 358 | struct ring_buffer *buffer, |
349 | struct ring_buffer_event *event); | 359 | struct ring_buffer_event *event); |
360 | extern void event_triggers_call(struct ftrace_event_file *file); | ||
350 | 361 | ||
351 | enum { | 362 | enum { |
352 | FILTER_OTHER = 0, | 363 | FILTER_OTHER = 0, |