From patchwork Wed May 30 00:04:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10437421 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 3AA73601E9 for ; Wed, 30 May 2018 00:06:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2879D27FB0 for ; Wed, 30 May 2018 00:06:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C3412877B; Wed, 30 May 2018 00:06:24 +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=ham 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 AE42A27FB0 for ; Wed, 30 May 2018 00:06:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968365AbeE3AGX (ORCPT ); Tue, 29 May 2018 20:06:23 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:46429 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755378AbeE3AFR (ORCPT ); Tue, 29 May 2018 20:05:17 -0400 Received: by mail-pf0-f194.google.com with SMTP id p19-v6so3827333pff.13 for ; Tue, 29 May 2018 17:05:16 -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=ea1ofqUL9cwkDP75hVS6+yCJygbizoidkVMHfZtnioQ=; b=FuNtrwRGTDNhCUDkeF8/ygMU8rZBoR52lsDh1hEUiBcFfwQTPK+sV5snZaYGjCjDzP irXPDMghkeeUjMg/iHlxlpDSx5g0wg4tc6wPsBWexNlN135v6uyVO3PUwnNNDqfI1e5z EK8Ig5YWRGF4xfQ0cNZJoYTAF2XOwksE2kSvdPuylBvaB+DDiITN5duqdJVpNFvv+m2T dJDRnMg6RSAasCQ3VTraNR/6N8essLdAX/SpK0oQDMniNT4hpS1OlpEyntoAww2LoIGG /8h0xnMrUzkXpBcLD5TLdLpQqWwtqHo8CheJddWv/V6va0ZGFpppoIH0wrb+AaVMXCOu 3lDw== 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=ea1ofqUL9cwkDP75hVS6+yCJygbizoidkVMHfZtnioQ=; b=NKClaDyc6ndiYEJ0jYOSTKO9UHCKbw3L6+Jw5b+bBu6ZHu0LTgdMhrC9vYhwZc8RVy 4lsE6N31addrOfS3UMkIt52KKzLnxhyEOSjPd5G4PTEPljYglIix64zSjOCDh/RPg9IU rIZVos98ICoOBdt055rqvkzcOErnN7mkZKCM535umqQJEJtH0B6m0utUBnre0SeJtZA/ CJMu/gz6HejsVrUd78E0SiUAzPwsmCNtYnN7/dBiMc8Wi4OwtOAsDWVAGkpDCL45Q6mF pFH933WAJ1c8l7oanYAc0DrP8uZALUgeJ/6ztI5fQ/zZpaFR4bEHfH39waVuERj+ckAS H8rg== X-Gm-Message-State: ALKqPwc6ZzvcTJ3qKs02DDI1sSlbKHj5IJPne5eedRtFj2LCSUGiR1K3 VU3TYR9wZbesAS+jt9P0hU8wbw== X-Google-Smtp-Source: ADUXVKLhrGmr4hya1oobBnJ/OpFtLblHevUjkzhzzHQauzUSNxYT3Q/NqpMC9APIG6+4I44MB0KNXg== X-Received: by 2002:a62:4c04:: with SMTP id z4-v6mr334077pfa.205.1527638715980; Tue, 29 May 2018 17:05:15 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id w12-v6sm86979211pfi.158.2018.05.29.17.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 17:05:15 -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 v8 4/8] trace/irqsoff: Split reset into separate functions Date: Tue, 29 May 2018 17:04:56 -0700 Message-Id: <20180530000500.257225-5-joel@joelfernandes.org> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: <20180530000500.257225-1-joel@joelfernandes.org> References: <20180530000500.257225-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,