aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-22 19:35:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-22 19:35:21 -0500
commit60eaa0190f6b39dce18eb1975d9773ed8bc9a534 (patch)
treeaef5a45a59af0f493fe44a267fc6333fb245dc2e /include/trace
parentdf32e43a54d04eda35d2859beaf90e3864d53288 (diff)
parent92fdd98cf8bdec4d6b0c510e2f073ac4fd059be8 (diff)
Merge tag 'trace-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "This pull request has a new feature to ftrace, namely the trace event triggers by Tom Zanussi. A trigger is a way to enable an action when an event is hit. The actions are: o trace on/off - enable or disable tracing o snapshot - save the current trace buffer in the snapshot o stacktrace - dump the current stack trace to the ringbuffer o enable/disable events - enable or disable another event Namhyung Kim added updates to the tracing uprobes code. Having the uprobes add support for fetch methods. The rest are various bug fixes with the new code, and minor ones for the old code" * tag 'trace-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (38 commits) tracing: Fix buggered tee(2) on tracing_pipe tracing: Have trace buffer point back to trace_array ftrace: Fix synchronization location disabling and freeing ftrace_ops ftrace: Have function graph only trace based on global_ops filters ftrace: Synchronize setting function_trace_op with ftrace_trace_function tracing: Show available event triggers when no trigger is set tracing: Consolidate event trigger code tracing: Fix counter for traceon/off event triggers tracing: Remove double-underscore naming in syscall trigger invocations tracing/kprobes: Add trace event trigger invocations tracing/probes: Fix build break on !CONFIG_KPROBE_EVENT tracing/uprobes: Add @+file_offset fetch method uprobes: Allocate ->utask before handler_chain() for tracing handlers tracing/uprobes: Add support for full argument access methods tracing/uprobes: Fetch args before reserving a ring buffer tracing/uprobes: Pass 'is_return' to traceprobe_parse_probe_arg() tracing/probes: Implement 'memory' fetch method for uprobes tracing/probes: Add fetch{,_size} member into deref fetch method tracing/probes: Move 'symbol' fetch method to kprobes tracing/probes: Implement 'stack' fetch method for uprobes ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/ftrace.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 5c38606613d8..1a8b28db3775 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -418,6 +418,8 @@ static inline notrace int ftrace_get_offsets_##call( \
418 * struct ftrace_event_file *ftrace_file = __data; 418 * struct ftrace_event_file *ftrace_file = __data;
419 * struct ftrace_event_call *event_call = ftrace_file->event_call; 419 * struct ftrace_event_call *event_call = ftrace_file->event_call;
420 * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; 420 * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
421 * unsigned long eflags = ftrace_file->flags;
422 * enum event_trigger_type __tt = ETT_NONE;
421 * struct ring_buffer_event *event; 423 * struct ring_buffer_event *event;
422 * struct ftrace_raw_<call> *entry; <-- defined in stage 1 424 * struct ftrace_raw_<call> *entry; <-- defined in stage 1
423 * struct ring_buffer *buffer; 425 * struct ring_buffer *buffer;
@@ -425,9 +427,12 @@ static inline notrace int ftrace_get_offsets_##call( \
425 * int __data_size; 427 * int __data_size;
426 * int pc; 428 * int pc;
427 * 429 *
428 * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, 430 * if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
429 * &ftrace_file->flags)) 431 * if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
430 * return; 432 * event_triggers_call(ftrace_file, NULL);
433 * if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
434 * return;
435 * }
431 * 436 *
432 * local_save_flags(irq_flags); 437 * local_save_flags(irq_flags);
433 * pc = preempt_count(); 438 * pc = preempt_count();
@@ -445,8 +450,17 @@ static inline notrace int ftrace_get_offsets_##call( \
445 * { <assign>; } <-- Here we assign the entries by the __field and 450 * { <assign>; } <-- Here we assign the entries by the __field and
446 * __array macros. 451 * __array macros.
447 * 452 *
448 * if (!filter_check_discard(ftrace_file, entry, buffer, event)) 453 * if (eflags & FTRACE_EVENT_FL_TRIGGER_COND)
454 * __tt = event_triggers_call(ftrace_file, entry);
455 *
456 * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
457 * &ftrace_file->flags))
458 * ring_buffer_discard_commit(buffer, event);
459 * else if (!filter_check_discard(ftrace_file, entry, buffer, event))
449 * trace_buffer_unlock_commit(buffer, event, irq_flags, pc); 460 * trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
461 *
462 * if (__tt)
463 * event_triggers_post_call(ftrace_file, __tt);
450 * } 464 * }
451 * 465 *
452 * static struct trace_event ftrace_event_type_<call> = { 466 * static struct trace_event ftrace_event_type_<call> = {
@@ -539,8 +553,7 @@ ftrace_raw_event_##call(void *__data, proto) \
539 int __data_size; \ 553 int __data_size; \
540 int pc; \ 554 int pc; \
541 \ 555 \
542 if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, \ 556 if (ftrace_trigger_soft_disabled(ftrace_file)) \
543 &ftrace_file->flags)) \
544 return; \ 557 return; \
545 \ 558 \
546 local_save_flags(irq_flags); \ 559 local_save_flags(irq_flags); \
@@ -560,8 +573,8 @@ ftrace_raw_event_##call(void *__data, proto) \
560 \ 573 \
561 { assign; } \ 574 { assign; } \
562 \ 575 \
563 if (!filter_check_discard(ftrace_file, entry, buffer, event)) \ 576 event_trigger_unlock_commit(ftrace_file, buffer, event, entry, \
564 trace_buffer_unlock_commit(buffer, event, irq_flags, pc); \ 577 irq_flags, pc); \
565} 578}
566/* 579/*
567 * The ftrace_test_probe is compiled out, it is only here as a build time check 580 * The ftrace_test_probe is compiled out, it is only here as a build time check