From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbbKPXoo (ORCPT ); Mon, 16 Nov 2015 18:44:44 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:54833 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbKPXon (ORCPT ); Mon, 16 Nov 2015 18:44:43 -0500 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 165.244.98.204 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Tue, 17 Nov 2015 08:44:40 +0900 From: Namhyung Kim To: Steven Rostedt CC: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , LKML Subject: Re: [PATCH] ftrace/x86: Fix missing ops arg on static function tracing Message-ID: <20151116234440.GB1865@sejong> References: <1447493548-31978-1-git-send-email-namhyung@kernel.org> <20151116105453.3de46887@gandalf.local.home> MIME-Version: 1.0 In-Reply-To: <20151116105453.3de46887@gandalf.local.home> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB05/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/11/17 08:44:40, Serialize by Router on LGEKRMHUB05/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2015/11/17 08:44:40, Serialize complete at 2015/11/17 08:44:40 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Mon, Nov 16, 2015 at 10:54:53AM -0500, Steven Rostedt wrote: > On Sat, 14 Nov 2015 18:32:28 +0900 > Namhyung Kim wrote: > > > The commit f1ab00af816e ("ftrace/x86: Get rid of ftrace_caller_setup") > > moved code that loads ftrace_ops into 3rd parameter but it missed to do > > for static tracing. > > > > Signed-off-by: Namhyung Kim > > --- > > arch/x86/kernel/mcount_64.S | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S > > index 94ea120fa21f..6c1ccf9e5427 100644 > > --- a/arch/x86/kernel/mcount_64.S > > +++ b/arch/x86/kernel/mcount_64.S > > @@ -278,6 +278,9 @@ trace: > > /* save_mcount_regs fills in first two parameters */ > > save_mcount_regs > > > > + /* Load the ftrace_ops into the 3rd parameter */ > > + movq function_trace_op(%rip), %rdx > > + > > call *ftrace_trace_function > > This isn't needed, nor will the parameter be used if added. A comment > should probably be added here instead. > > /* > * When DYNAMIC_FTRACE is not defined, ARCH_SUPPORTS_FTRACE_OPS is not > * set (see include/asm/ftrace.h). Only the ip and parent ip are used > * and the list function is called when function tracing is enabled. > */ Ah, ok. I sent this patch during reading update_ftrace_function(). I was wondering why function_trace_op is set but not passed to the trace function. It seems that the ops is not needed for x86 but s390 still needs it regardless of DYNAMIC_FTRACE. I'll send a patch with the above comment. Thanks, Namhyung