Received: by 10.192.165.148 with SMTP id m20csp5487165imm; Wed, 9 May 2018 05:57:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZotUtD1kCkVwxfR4azi1a1GQ/8ETWLfrhLGDs+gZNEU9mIPDWQtlUvP70av2SpFihgRb8KT X-Received: by 2002:a63:934f:: with SMTP id w15-v6mr5306044pgm.333.1525870679810; Wed, 09 May 2018 05:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525870679; cv=none; d=google.com; s=arc-20160816; b=avpcLgxdCujHydhHnWqw7CXYvgr0ixJSD7ZSAqa8Fc2ZEsUOMY3E0LdToMl5oE7+6v Qh6bc2Hp1CMp8khbZckGdlkfp3uAr2dED92Pe64kfMQSY+EZYSgw6P1IYqX6mVnsM7ZC dUQSYmT/1Ecv2QEPrceHsYigQouAKYe1rSC/mLWxY8WfMYeu1LHA4vAzODj9IvVnJXfj BTGV2/9hWVeot/bQ6udUgo7qweq7eb8yw1rVSPQL61reXcIBsP834Dnv7jLybdS3mvTJ tybK6XIeqZ48YOk5ZifDWpuAT6pXc1JbxzHH2WAMHD3xbAlgNI3loBWACRXMYZrMnMfV oXnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=AAJddQB5vbvw7hIUQbrcq0sdbNBxQsf5uQKnM6W9zec=; b=1LkduyaKotwD4IfATnniIg8fEJoFzZ/SL0VLPOYegQDdIsaDIIJQEMVPQtxyLB6c2N akOsfO4BJ+CFwSx/VlyUQejklWWlyq9DR6p2CSrovuR52bYQn9Da1JEcW/uI3kFY72YU i7vyYGxokoP+dxuUkbPs3KMRk2qHccBOWTUUDyOB/P8bdIXR/2CTJBBIwn3IsHoEfH6I M6h30goisi3uAI43RZDmc3f/F+302I4dofmP69LbiWPsY02EVNPsaR378Te3HCcqNATg WnYTF3SKH7MZ9oczRoraIsRLsIuQtdx8DQ+lucGkd0ZF+puRUkRAFdPbUpXJ1VDVVZNo lZog== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9-v6si5297594plk.587.2018.05.09.05.57.45; Wed, 09 May 2018 05:57:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934866AbeEIM4r (ORCPT + 99 others); Wed, 9 May 2018 08:56:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:40868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934328AbeEIM4q (ORCPT ); Wed, 9 May 2018 08:56:46 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83DD72183D; Wed, 9 May 2018 12:56:45 +0000 (UTC) Date: Wed, 9 May 2018 08:56:43 -0400 From: Steven Rostedt To: Yisheng Xie Cc: , Subject: Re: [PATCH resend v2] ftrace: nuke clear_ftrace_function Message-ID: <20180509085643.4001dc9c@gandalf.local.home> In-Reply-To: <1525858436-10900-1-git-send-email-xieyisheng1@huawei.com> References: <1525858436-10900-1-git-send-email-xieyisheng1@huawei.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 May 2018 17:33:56 +0800 Yisheng Xie wrote: > clear_ftrace_function is not used outside of ftrace.c and is not help to > use a function, so nuke it per Steve's suggestion. > > Suggested-by: Steven Rostedt > Signed-off-by: Yisheng Xie > --- > v2: > - nuke clear_ftrace_function instead of use it - per Steve > > v1: > - https://lkml.org/lkml/2018/1/29/944 > > include/linux/ftrace.h | 2 -- > kernel/trace/ftrace.c | 13 +------------ > 2 files changed, 1 insertion(+), 14 deletions(-) > > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h > index 9c3c9a3..15518b5 100644 > --- a/include/linux/ftrace.h > +++ b/include/linux/ftrace.h > @@ -223,7 +223,6 @@ enum ftrace_tracing_type_t { > */ > int register_ftrace_function(struct ftrace_ops *ops); > int unregister_ftrace_function(struct ftrace_ops *ops); > -void clear_ftrace_function(void); > > extern void ftrace_stub(unsigned long a0, unsigned long a1, > struct ftrace_ops *op, struct pt_regs *regs); > @@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void) > { > return 0; > } > -static inline void clear_ftrace_function(void) { } > static inline void ftrace_kill(void) { } > static inline void ftrace_free_init_mem(void) { } > static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 8d83bcf..d4984f4 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -192,17 +192,6 @@ static void ftrace_pid_func(unsigned long ip, unsigned long parent_ip, > op->saved_func(ip, parent_ip, op, regs); > } > > -/** > - * clear_ftrace_function - reset the ftrace function > - * > - * This NULLs the ftrace function and in essence stops > - * tracing. There may be lag > - */ I agree that the function should be removed, but the comment is still relevant. > -void clear_ftrace_function(void) > -{ > - ftrace_trace_function = ftrace_stub; > -} > - > static void ftrace_sync(struct work_struct *work) > { > /* > @@ -6689,7 +6678,7 @@ void ftrace_kill(void) > { > ftrace_disabled = 1; > ftrace_enabled = 0; > - clear_ftrace_function(); /* This will stop tracing, but there may be a lag */ -- Steve > + ftrace_trace_function = ftrace_stub; > } > > /**