[1/5] fix "trace-cmd reset" command to restore "tracng_on"
diff mbox series

Message ID 20181213142125.12149-2-tstoyanov@vmware.com
State Superseded
Headers show
Series
  • trace-cmd reset fixes
Related show

Commit Message

Tzvetomir Stoyanov Dec. 13, 2018, 2:21 p.m. UTC
The "trace-cmd reset" command should restore ftrace to its default state.
By default, "tracing/current_tracer" is "nop" and "tracing/tracing_on" is "1".
This patch sets "tracing/tracing_on" to 1, when the command "trace-cmd reset"
is executed.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 tracecmd/trace-record.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index 7666a24..a044cf5 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -4456,6 +4456,8 @@  void trace_reset(int argc, char **argv)
 	clear_triggers();
 	tracecmd_remove_instances();
 	clear_func_filters();
+	/* restore tracing_on to 1 */
+	tracecmd_enable_tracing();
 	exit(0);
 }