Received: by 10.192.165.148 with SMTP id m20csp4417106imm; Mon, 30 Apr 2018 18:44:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqx5sDB4RfEQ+GjXhmBWD3WRUagx2/CoL+t7+dJ1I57Qe13Oo4RHFlJTqv8gFyp+DJCpLtT X-Received: by 2002:a17:902:7601:: with SMTP id k1-v6mr14236764pll.1.1525139041877; Mon, 30 Apr 2018 18:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525139041; cv=none; d=google.com; s=arc-20160816; b=kUkwDAuJ9mY+R5RKCRZqlaxsH59UYlD+llXbuzoPFqxpiQjJ9NQRhE7QUucAo56NoO 9HmgElzAXEcUGn4q+fvsfld8rS4Kt2YvReFKC+/OSA/EEF8N8DdCkCE8P1Hzlm64RyGI 3h/kF+KlLAOpxyW0PK6J9FiQrqjsUGx28pnLdOfVhO9x4Y2AYqFInGAdAkqFV/b8mS46 DYyMd9oeBet6Rfz0R5iyc64OUxTm5a4hQWGDDKTYOZVhcj5WzewvcugLq4DrQSKR4EVf Cf2V1GyD4HbiKuqb9vM5PnNyxv+Ey0Uv1ZwgFhsOXZmRseRg95HuVARrCMTB9BheKu62 ha9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=A5WblE6OL+SNOHokpyDg2OfMJXSKhB1EL1huCD2+P5g=; b=f787SXdgVPUwk9fd4Qd6d7k6V/m0cnE81z0289dlCPOZUqVUAI/esw/En+5tYSiFAE mrIoB4YevBGRNnU3QGFVE7u4j64Fc80Y5v5PMEaVvZCpVc5lceFSpl65wd+UI0CkVm7O hERtvYzf3sWMltd7B9d7lcNwT87Z+Va/lzMY7A6NhXo0J0wo75Wj3oIgp/sTXxBtMk/V 9ClGqGgt69JAHH9QWP0zpN2PY4UphC2GzfL1/W8fpcsUcRzMO+W9ROhdA75/7HXlav05 v6+tDHKIVCxRTtSQUwnJvp1QGoFCT5YfAXVM9/xOFDBNHbZL8M5dMgfCOVAfshitMHDO O7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MLI8Knm3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k82si3123861pfj.302.2018.04.30.18.43.47; Mon, 30 Apr 2018 18:44:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MLI8Knm3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756112AbeEABnK (ORCPT + 99 others); Mon, 30 Apr 2018 21:43:10 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:45359 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbeEABm0 (ORCPT ); Mon, 30 Apr 2018 21:42:26 -0400 Received: by mail-pf0-f196.google.com with SMTP id c10so8128226pfi.12 for ; Mon, 30 Apr 2018 18:42:26 -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=A5WblE6OL+SNOHokpyDg2OfMJXSKhB1EL1huCD2+P5g=; b=MLI8Knm3eA24zpAIQzl4Hk9xv/Xg1JQMM0AS4C7EbDOkrO6uk52WUetDHsWAJjJu40 UZ14CRN1pYxrZA2DnQ4/fvQqDf574jv1wIyk4ZDxsz6dLMIALZPcNAmf17THRtfpuFuJ HasEVWCl8IW/2lefEuyQmr8Cgw14lIW/gS4JFeI0EAIHQq8BhZFQKmdymhNhAJTi1Iel fYAfN4kldfdfX83Ezd0Vr8iwfZOMrtBrfX66zhc5o6MB+o0d0zleM4VP7kIOG6vwILfB CHBToq+NHVI8Jr0HINI4LVhTrBwb3uRLiguKiTI4UMHTyEFmGO5pr8IT5x2fuYN50fZj H6fw== 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=A5WblE6OL+SNOHokpyDg2OfMJXSKhB1EL1huCD2+P5g=; b=Nui2K5FXQpEQBm9e+01HsY9OEmQDf634LhndtTcnKNSe/fA2x+cZhMiaTnHNt3VNWS F6FcQ1Wcn0FbNkfADT1FV8BACYnVWBbGNle2f5a4FS/UM5EBEr9hNObIjN9qP/ZrXZ+t BkS7ndiEBIprG0+ViQTUpBI0nihY/cyu6CaIsdhH325cD5BcbtE3FxpMtiXN2HcK7WI9 JWVz3RvBzdHLkytjAL9unOGZ4yM1zRojk9eu2xH9CEKs10xotq99cdKLy8xLsIRYvnLg aIxDerOHq9b3PZ+CUwAQIP0y2OKDEJXQM0Qp+nLN/4DJH4MccdtrRSIbAWSb67pW8730 rS5Q== X-Gm-Message-State: ALQs6tDb86aoS4z8V8jdgmUWSRovtfPcdGtCm1cElCcRB/R4w/DtxhiG k74CgHDmCQxMRagGknxJsfAa9YgnNb0= X-Received: by 2002:a17:902:6c4b:: with SMTP id h11-v6mr14829924pln.33.1525138945290; Mon, 30 Apr 2018 18:42:25 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id f21sm15149490pfa.106.2018.04.30.18.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 18:42:24 -0700 (PDT) From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: Joel Fernandes , Steven Rostedt , Peter Zilstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Glexiner , Boqun Feng , Paul McKenney , Frederic Weisbecker , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , Baohong Liu , Vedang Patel , kernel-team@android.com Subject: [PATCH RFC v5 4/6] trace/irqsoff: Split reset into seperate functions Date: Mon, 30 Apr 2018 18:42:02 -0700 Message-Id: <20180501014204.67548-5-joelaf@google.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180501014204.67548-1-joelaf@google.com> References: <20180501014204.67548-1-joelaf@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Split reset functions into seperate functions in preparation of future patches that need to do tracer specific reset. Cc: Steven Rostedt Cc: Peter Zilstra Cc: Ingo Molnar Cc: Mathieu Desnoyers Cc: Tom Zanussi Cc: Namhyung Kim Cc: Thomas Glexiner Cc: Boqun Feng Cc: Paul McKenney Cc: Frederic Weisbecker Cc: Randy Dunlap Cc: Masami Hiramatsu Cc: Fenguang Wu Cc: Baohong Liu Cc: Vedang Patel Cc: kernel-team@android.com Signed-off-by: Joel Fernandes --- 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, -- 2.17.0.441.gb46fe60e1d-goog