From patchwork Thu Jun 21 22:32:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10480817 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 E4D1A602CB for ; Thu, 21 Jun 2018 22:34:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4F8528E2B for ; Thu, 21 Jun 2018 22:34:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C810028F2F; Thu, 21 Jun 2018 22:34:57 +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_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 7ECEF28E2B for ; Thu, 21 Jun 2018 22:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933873AbeFUWeo (ORCPT ); Thu, 21 Jun 2018 18:34:44 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:39362 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933622AbeFUWd3 (ORCPT ); Thu, 21 Jun 2018 18:33:29 -0400 Received: by mail-pg0-f67.google.com with SMTP id w12-v6so2046212pgc.6 for ; Thu, 21 Jun 2018 15:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j6lPye0g1OOV0nGV5FlFez9sBig7U1uURpZjRjQnBJo=; b=ApmMCK731bMxyQFQDadi34zQPuyeFUY2dMwsb24ql22oMA6PAc6tPHScn9Su6cVXOC H6bdyRoi0dey52sIY5bxDNXfzFyRdJ6l3Bqg9nx2YsFGbJij5Trdx4+AL74UNVJN5pJi CJPfvpfTXScFHDs3aaufnfHmokx+u5L9T/XIs= 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=j6lPye0g1OOV0nGV5FlFez9sBig7U1uURpZjRjQnBJo=; b=qOocrKAf6yazGtPQndGLfX0CqX1PBrLiBwsj3RUsoQbyOtu+s7a8tOb1gqHv3INzk7 xtQ/C3ZQgqHjHTlRabDQFCA9rbkYOYB6JE3FITxv9YPKJfVYnQYFZIL3dj6iayPmDMGd YSsJKw9DB4EbGm6assbzsoyqosPkXfsl8TdJkPCjLz6zmgPeIwaA7LvM6Rh1LjrcKD/b MrlnPJeSAGEhv5jYM6qQg/GY4kxlMI6Q4io/+o9q9r3tEBVcE1B1AQFq4vkJiL+sLDvN FrIVJmqb/KRBOON9YpsRWQh80BrfYbTl6vyB+S2GdJEqW4jDgf8QqBsW1oCb5x0du6iu ekgg== X-Gm-Message-State: APt69E2MB2teuQTGz2LsRSUZLsasvR1XdNpTQVuEuC3d13b6u4qlS4CB rwv6vc6LZBgh+wuGjxLIBPgXIQ== X-Google-Smtp-Source: ADUXVKIfldjTlW9GqBtOak36gxJUpI5G3QnJpkE+ll3pfznvLL8WaJ35FschdJvMFYhChjrJAgR89Q== X-Received: by 2002:a62:8b9b:: with SMTP id e27-v6mr29225952pfl.82.1529620408643; Thu, 21 Jun 2018 15:33:28 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id x19-v6sm11060824pfi.5.2018.06.21.15.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 15:33:28 -0700 (PDT) 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 , Will Deacon Subject: [PATCH v9 3/7] trace/irqsoff: Split reset into separate functions Date: Thu, 21 Jun 2018 15:32:32 -0700 Message-Id: <20180621223236.211495-4-joel@joelfernandes.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180621223236.211495-1-joel@joelfernandes.org> References: <20180621223236.211495-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. Reviewed-by: Namhyung Kim 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,