From patchwork Thu May 24 01:21:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10422603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 10ED56016C for ; Thu, 24 May 2018 01:24:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF1BF292EF for ; Thu, 24 May 2018 01:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3CBF292F8; Thu, 24 May 2018 01:24:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70A43292EF for ; Thu, 24 May 2018 01:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935427AbeEXBXp (ORCPT ); Wed, 23 May 2018 21:23:45 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33248 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935405AbeEXBWd (ORCPT ); Wed, 23 May 2018 21:22:33 -0400 Received: by mail-pg0-f68.google.com with SMTP id e21-v6so5282194pgv.0 for ; Wed, 23 May 2018 18:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EICYnCzOsDWIUpe1gRg9ujlxr53s9Eg6wFNXWTDf2E8=; b=gc71p/oCzxgjkZx0wFJlXweg5GkA3i3TZj/UOPAa9f5MuuTSpxn4qTSBYUTsNP+3H6 ajR83XxpFBMIZCxcp59YnREJOeX0SlAyQbwKQPf5Ljo+SDsYr0XF7xecrIZbJ6pW/YqA wf59GxEhaKIfOLeBxgYIA0DPsLp3K0KNHtN7rIxTpT8BNap7O2lq+leckb8rNblnWlQa o+vJUW0qohqqjGieQUS3la6nDLhDgCogf5ayNtRxiB1qOKvG0p7QQ4+YWPBjGHQFWkeh NT+4jmXgH6LReGDvXoGyKLZqkIxf2SGADqbAD8d+aP7QXM9Di/+PasVEQcpviCi1keEt 1UYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EICYnCzOsDWIUpe1gRg9ujlxr53s9Eg6wFNXWTDf2E8=; b=cRzNgB3JR31rrjBD+fQDQSo7aAwlwmNGphL6EvfH0ScpLSAw/GjXNn7zhb0LJGLCBg CoVr+vTwFNIlRTHcKpQWvS/Cz3WNLYDf8MoFbNd7cT2jhuK05M5Yg1L6JYeT6ih2qwko 7uC1m5oYLV7cWw1ARitwZtxSmZfsBVgFbV9LtDwHs+BNY6UQYz6Yt2LLfIRCtTp6X22y cuvddHYAvBJOgf3eMtp0m7+zW/su15+i1dZagG40ONLnyZdhYwCyyCQhyCOgYwSncdQI 8pSPuQ93KQDME9FcFSpPsQo+EzkAvyDb2sl3tybVgbjGOmctGFoMRWzf6f3M53221nVb AqLQ== X-Gm-Message-State: ALKqPwcoH1ncHBFgzsEZO/PkWn9ItzW6vMe5fY35GkXls504g3i/csea O8ZLVQf3PtzBlDfLuuhXY7YwnQ== X-Google-Smtp-Source: AB8JxZrnE/F+S6kaEyQOZh/p/zDvdl9cCbNZbLktijstAEps/fT5m0Onr4X6gvIL/kGOz6nqytBLPg== X-Received: by 2002:a63:6e84:: with SMTP id j126-v6mr4079151pgc.239.1527124952292; Wed, 23 May 2018 18:22:32 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id g15-v6sm26070996pgv.58.2018.05.23.18.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 18:22:31 -0700 (PDT) From: Joel Fernandes X-Google-Original-From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, "Joel Fernandes (Google)" , Boqun Feng , Byungchul Park , Erick Reyes , Ingo Molnar , Julia Cartwright , linux-kselftest@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Peter Zijlstra , Shuah Khan , Steven Rostedt , Thomas Glexiner , Todd Kjos , Tom Zanussi Subject: [PATCH v7 4/8] trace/irqsoff: Split reset into separate functions Date: Wed, 23 May 2018 18:21:53 -0700 Message-Id: <20180524012157.181277-5-joel@joelfernandes.org> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180524012157.181277-1-joel@joelfernandes.org> References: <20180524012157.181277-1-joel@joelfernandes.org> Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Joel Fernandes (Google)" Split reset functions into seperate functions in preparation of future patches that need to do tracer specific reset. Signed-off-by: Joel Fernandes (Google) --- kernel/trace/trace_irqsoff.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 03ecb4465ee4..f8daa754cce2 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c @@ -634,7 +634,7 @@ static int __irqsoff_tracer_init(struct trace_array *tr) return 0; } -static void irqsoff_tracer_reset(struct trace_array *tr) +static void __irqsoff_tracer_reset(struct trace_array *tr) { int lat_flag = save_flags & TRACE_ITER_LATENCY_FMT; int overwrite_flag = save_flags & TRACE_ITER_OVERWRITE; @@ -665,6 +665,12 @@ static int irqsoff_tracer_init(struct trace_array *tr) return __irqsoff_tracer_init(tr); } + +static void irqsoff_tracer_reset(struct trace_array *tr) +{ + __irqsoff_tracer_reset(tr); +} + static struct tracer irqsoff_tracer __read_mostly = { .name = "irqsoff", @@ -697,11 +703,16 @@ static int preemptoff_tracer_init(struct trace_array *tr) return __irqsoff_tracer_init(tr); } +static void preemptoff_tracer_reset(struct trace_array *tr) +{ + __irqsoff_tracer_reset(tr); +} + static struct tracer preemptoff_tracer __read_mostly = { .name = "preemptoff", .init = preemptoff_tracer_init, - .reset = irqsoff_tracer_reset, + .reset = preemptoff_tracer_reset, .start = irqsoff_tracer_start, .stop = irqsoff_tracer_stop, .print_max = true, @@ -731,11 +742,16 @@ static int preemptirqsoff_tracer_init(struct trace_array *tr) return __irqsoff_tracer_init(tr); } +static void preemptirqsoff_tracer_reset(struct trace_array *tr) +{ + __irqsoff_tracer_reset(tr); +} + static struct tracer preemptirqsoff_tracer __read_mostly = { .name = "preemptirqsoff", .init = preemptirqsoff_tracer_init, - .reset = irqsoff_tracer_reset, + .reset = preemptirqsoff_tracer_reset, .start = irqsoff_tracer_start, .stop = irqsoff_tracer_stop, .print_max = true,