* [PATCH] ftrace: trigger: Call traceoff trigger after event recorded
@ 2016-09-08 16:05 Masami Hiramatsu
2016-09-23 13:11 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2016-09-08 16:05 UTC (permalink / raw)
To: Steven Rostedt, Tom Zanussi
Cc: Masami Hiramatsu, linux-kernel, Ingo Molnar, Namhyung Kim
Call traceoff trigger after the event is recorded.
Since current traceoff trigger is called before recording
the event, we can not know when the trace is off by what event.
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.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
kernel/trace/trace_events_trigger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index a975571..6721a1e8 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,
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ftrace: trigger: Call traceoff trigger after event recorded
2016-09-08 16:05 [PATCH] ftrace: trigger: Call traceoff trigger after event recorded Masami Hiramatsu
@ 2016-09-23 13:11 ` Masami Hiramatsu
2016-09-23 13:34 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2016-09-23 13:11 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Steven Rostedt, Tom Zanussi, linux-kernel, Ingo Molnar,
Namhyung Kim
Ping?
On Fri, 9 Sep 2016 01:05:45 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> Call traceoff trigger after the event is recorded.
> Since current traceoff trigger is called before recording
> the event, we can not know when the trace is off by what event.
>
> 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.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> ---
> kernel/trace/trace_events_trigger.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
> index a975571..6721a1e8 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,
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ftrace: trigger: Call traceoff trigger after event recorded
2016-09-23 13:11 ` Masami Hiramatsu
@ 2016-09-23 13:34 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2016-09-23 13:34 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: Tom Zanussi, linux-kernel, Ingo Molnar, Namhyung Kim
On Fri, 23 Sep 2016 22:11:33 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> Ping?
Thanks for the ping. I've been hacking on other things lately that,
even though I marked this as "todo", it has falling in my INBOX abyss.
I'll take a look at this today.
-- Steve
>
> On Fri, 9 Sep 2016 01:05:45 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> > Call traceoff trigger after the event is recorded.
> > Since current traceoff trigger is called before recording
> > the event, we can not know when the trace is off by what event.
> >
> > 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.
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> > ---
> > kernel/trace/trace_events_trigger.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
> > index a975571..6721a1e8 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,
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-23 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-08 16:05 [PATCH] ftrace: trigger: Call traceoff trigger after event recorded Masami Hiramatsu
2016-09-23 13:11 ` Masami Hiramatsu
2016-09-23 13:34 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).