mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Minfei Huang <mhuang@redhat.com>
To: rostedt@goodmis.org, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Minfei Huang <mnfhuang@gmail.com>
Subject: Re: [PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
Date: Tue, 11 Aug 2015 23:32:38 +0800	[thread overview]
Message-ID: <20150811153238.GA16783@dhcp-128-25.nay.redhat.com> (raw)
In-Reply-To: <1437534782-21737-1-git-send-email-mhuang@redhat.com>

Ping.

Could someone help to review this patch?

Thanks
Minfei

On 07/22/15 at 11:13am, Minfei Huang wrote:
> From: Minfei Huang <mnfhuang@gmail.com>
> 
> 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 <mnfhuang@gmail.com>
> ---
>  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/

  reply	other threads:[~2015-08-11 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22  3:13 Minfei Huang
2015-08-11 15:32 ` Minfei Huang [this message]
2015-08-11 15:50   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150811153238.GA16783@dhcp-128-25.nay.redhat.com \
    --to=mhuang@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mnfhuang@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®