From patchwork Thu Jun 28 18:21:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10494683 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 349596022E for ; Thu, 28 Jun 2018 18:24:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 373DB2A18C for ; Thu, 28 Jun 2018 18:24:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AAF42A19F; Thu, 28 Jun 2018 18:24:06 +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 CC4132A18C for ; Thu, 28 Jun 2018 18:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966281AbeF1SXW (ORCPT ); Thu, 28 Jun 2018 14:23:22 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:45081 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030429AbeF1SWA (ORCPT ); Thu, 28 Jun 2018 14:22:00 -0400 Received: by mail-pf0-f195.google.com with SMTP id n18-v6so931434pff.12 for ; Thu, 28 Jun 2018 11:22:00 -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=lbFAAtt9lxy6qZ8E1cmASmXGEfq/LDFJBe0Zn03fLYes/IA96tcIrs6azafa/pXiAK sj5Rk2UrFNkJhmYksVLs3l3UWNXvrTGtcFI19kwAGAGk3kX12Y3rSWh6EcorPP1ff2Xf +gZYJINquYrot8254gdA/5RaVxKACsp5pVER0= 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=gCnjDPWwQmq/8YaSAMRvqThwaV3rjBidr6qU8rNeO3u4iWlpxBX+7j36rXHif+og77 4unyeIh0TgnKhKVTTq33iTMZzhOznaRqoawE29N1TqtB0nabgPFBrzaDpCKbES9sOEK8 TA0FpzyOt5wrK2MsK3q0Hs9k4AFD3oMzwYwPxX7KuHPulmoo/eEZLwdJEQmQBlciVSiX +IHWvhrbX4fOxz06it675AauVF57NVZZUF9Fd0SyFRHl19q9XDJxj4hVXFHr8sQVEK65 knBR2uzPTHh99KZg5M0wlf0BbDfXaXlaTk0oEcpP23cR3+JCxa/sn/BVB5Oawl4zRPR+ xeVQ== X-Gm-Message-State: APt69E27B3tnj1G56jbJG8jSFcLuweaeRkOVriOq4MF1MO6EmeAyzJjV 97plWs7Yr1gdK87oOhordSIVlw== X-Google-Smtp-Source: AAOMgpc1V511PqC+mplOrn+EzX+DSRZDjN2ds2HIXnwcky0e+oifVMcmb3ggm24hi8zKlKWjhRMjPw== X-Received: by 2002:a65:5004:: with SMTP id f4-v6mr9786469pgo.54.1530210119879; Thu, 28 Jun 2018 11:21:59 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id q10-v6sm13686027pfj.7.2018.06.28.11.21.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 11:21:59 -0700 (PDT) From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Boqun Feng , Byungchul Park , Ingo Molnar , Julia Cartwright , linux-kselftest@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Peter Zijlstra , Steven Rostedt , Thomas Glexiner , Tom Zanussi Subject: [PATCH v9 3/7] trace/irqsoff: Split reset into separate functions Date: Thu, 28 Jun 2018 11:21:45 -0700 Message-Id: <20180628182149.226164-4-joel@joelfernandes.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180628182149.226164-1-joel@joelfernandes.org> References: <20180628182149.226164-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,