diff options
author | Tzvetomir Stoyanov <tstoyanov@vmware.com> | 2019-03-11 10:33:38 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-03-12 21:16:56 -0400 |
commit | 0844cff1cef446a65848c8f1b47d2eafa36e78aa (patch) | |
tree | b3a6e3d6a36797693d25c1670e39d0676ab5856a | |
parent | cd5a23168280917774094eeb77b5a359e4f4a292 (diff) | |
download | trace-cmd-0844cff1cef446a65848c8f1b47d2eafa36e78aa.tar.gz |
trace-cmd: Fix "trace-cmd reset" command to restore the default value of set_event_pid
The "trace-cmd reset" command should restore ftrace to its default state.
This patch sets "tracing/set_event_pid" to an empty string,
when the "trace-cmd reset" command is executed.
Link: http://lore.kernel.org/linux-trace-devel/20190311083339.21581-6-tstoyanov@vmware.com
Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com>
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | tracecmd/trace-record.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c index 801dad24..fe22ad08 100644 --- a/tracecmd/trace-record.c +++ b/tracecmd/trace-record.c @@ -3797,6 +3797,12 @@ static void reset_clock(void) write_instance_file(instance, "trace_clock", "local", "clock"); } +static void reset_event_pid(void) +{ + add_event_pid(""); +} + + static void clear_triggers(void) { struct buffer_instance *instance; @@ -4500,6 +4506,7 @@ void trace_reset(int argc, char **argv) clear_triggers(); /* set clock to "local" */ reset_clock(); + reset_event_pid(); tracecmd_remove_instances(); clear_func_filters(); /* restore tracing_on to 1 */ |