Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965332AbbHKP1s (ORCPT ); Tue, 11 Aug 2015 11:27:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36312 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965062AbbHKP1r (ORCPT ); Tue, 11 Aug 2015 11:27:47 -0400 Date: Tue, 11 Aug 2015 23:32:38 +0800 From: Minfei Huang To: rostedt@goodmis.org, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Minfei Huang Subject: Re: [PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Message-ID: <20150811153238.GA16783@dhcp-128-25.nay.redhat.com> References: <1437534782-21737-1-git-send-email-mhuang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437534782-21737-1-git-send-email-mhuang@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1897 Lines: 68 Ping. Could someone help to review this patch? Thanks Minfei On 07/22/15 at 11:13am, Minfei Huang wrote: > From: Minfei Huang > > Now, ftrace only calculate the dyn_ftrace number in the adding > breakpoint loop, not in adding update and finish update loop. > > Calculate the correct dyn_ftrace, once ftrace reports the failure message > to the userspace. > > Signed-off-by: Minfei Huang > --- > arch/x86/kernel/ftrace.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c > index 8b7b0a5..311bcf3 100644 > --- a/arch/x86/kernel/ftrace.c > +++ b/arch/x86/kernel/ftrace.c > @@ -556,6 +556,7 @@ void ftrace_replace_code(int enable) > run_sync(); > > report = "updating code"; > + count = 0; > > for_ftrace_rec_iter(iter) { > rec = ftrace_rec_iter_record(iter); > @@ -563,11 +564,13 @@ void ftrace_replace_code(int enable) > ret = add_update(rec, enable); > if (ret) > goto remove_breakpoints; > + count++; > } > > run_sync(); > > report = "removing breakpoints"; > + count = 0; > > for_ftrace_rec_iter(iter) { > rec = ftrace_rec_iter_record(iter); > @@ -575,6 +578,7 @@ void ftrace_replace_code(int enable) > ret = finish_update(rec, enable); > if (ret) > goto remove_breakpoints; > + count++; > } > > run_sync(); > -- > 2.4.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/