diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2016-09-08 18:05:45 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-09-23 15:47:59 +0200 |
commit | a0d0c6216afad4b2b1704a72bd76bea259e07655 (patch) | |
tree | 434154729ad4dd19f38e58ae71afc968be6ecde7 /kernel/trace/trace_events_trigger.c | |
parent | ftrace/scripts: Add helper script to bisect function tracing problem functions (diff) | |
download | linux-a0d0c6216afad4b2b1704a72bd76bea259e07655.tar.xz linux-a0d0c6216afad4b2b1704a72bd76bea259e07655.zip |
tracing: Call traceoff trigger after event is recorded
Call traceoff trigger after the event is recorded.
Since current traceoff trigger is called before recording
the event, we can not know what event stopped tracing.
Typical usecase of traceoff/traceon trigger is tracing
function calls and trace events between a pair of events.
For example, trace function calls between syscall entry/exit.
In that case, it is useful if we can see the return code
of the target syscall.
Link: http://lkml.kernel.org/r/147335074530.12462.4526186083406015005.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events_trigger.c')
-rw-r--r-- | kernel/trace/trace_events_trigger.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index a975571cde24..6721a1e89f39 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c @@ -1028,6 +1028,7 @@ static struct event_command trigger_traceon_cmd = { static struct event_command trigger_traceoff_cmd = { .name = "traceoff", .trigger_type = ETT_TRACE_ONOFF, + .flags = EVENT_CMD_FL_POST_TRIGGER, .func = event_trigger_callback, .reg = register_trigger, .unreg = unregister_trigger, |