From patchwork Thu Dec 13 14:21:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzvetomir Stoyanov X-Patchwork-Id: 10760163 Return-Path: Received: from mail-eopbgr720078.outbound.protection.outlook.com ([40.107.72.78]:1332 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727978AbeLMOVl (ORCPT ); Thu, 13 Dec 2018 09:21:41 -0500 From: Tzvetomir Stoyanov To: "rostedt@goodmis.org" CC: "linux-trace-devel@vger.kernel.org" Subject: [PATCH 1/5] fix "trace-cmd reset" command to restore "tracng_on" Date: Thu, 13 Dec 2018 14:21:38 +0000 Message-ID: <20181213142125.12149-2-tstoyanov@vmware.com> References: <20181213142125.12149-1-tstoyanov@vmware.com> In-Reply-To: <20181213142125.12149-1-tstoyanov@vmware.com> Content-Language: en-US MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org List-ID: 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 --- tracecmd/trace-record.c | 2 ++ 1 file changed, 2 insertions(+) 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); }