* [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
@ 2015-09-16 16:19 Minfei Huang
2015-10-16 2:25 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Minfei Huang @ 2015-09-16 16:19 UTC (permalink / raw)
To: rostedt, mingo, tglx, hpa; +Cc: x86, linux-kernel, mhuang, 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 <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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
2015-09-16 16:19 [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Minfei Huang
@ 2015-10-16 2:25 ` Steven Rostedt
2015-10-22 5:14 ` Minfei Huang
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2015-10-16 2:25 UTC (permalink / raw)
To: Minfei Huang; +Cc: mingo, tglx, hpa, x86, linux-kernel, mhuang, rostedt
On Thu, 17 Sep 2015 00:19:42 +0800
Minfei Huang <mnfhuang@gmail.com> wrote:
> 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.
>
Bah, your emails got lost in my Inbox. Sorry about that.
I'll make an effort to look at this first thing tomorrow.
[ Cc'ing myself to remind me ]
-- Steve
> 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();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
2015-10-16 2:25 ` Steven Rostedt
@ 2015-10-22 5:14 ` Minfei Huang
2015-10-22 17:08 ` Steven Rostedt
2015-10-22 19:44 ` Steven Rostedt
0 siblings, 2 replies; 5+ messages in thread
From: Minfei Huang @ 2015-10-22 5:14 UTC (permalink / raw)
To: Steven Rostedt; +Cc: mingo, tglx, hpa, x86, linux-kernel, mhuang
On 10/15/15 at 10:25pm, Steven Rostedt wrote:
> On Thu, 17 Sep 2015 00:19:42 +0800
> Minfei Huang <mnfhuang@gmail.com> wrote:
>
> > 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.
> >
>
> Bah, your emails got lost in my Inbox. Sorry about that.
>
> I'll make an effort to look at this first thing tomorrow.
Ping. Any comment is appreciate.
Thanks
Minfei
>
> [ Cc'ing myself to remind me ]
>
> -- Steve
>
> > 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();
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
2015-10-22 5:14 ` Minfei Huang
@ 2015-10-22 17:08 ` Steven Rostedt
2015-10-22 19:44 ` Steven Rostedt
1 sibling, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-10-22 17:08 UTC (permalink / raw)
To: Minfei Huang; +Cc: mingo, tglx, hpa, x86, linux-kernel, mhuang
On Thu, 22 Oct 2015 13:14:07 +0800
Minfei Huang <mnfhuang@gmail.com> wrote:
> On 10/15/15 at 10:25pm, Steven Rostedt wrote:
> > On Thu, 17 Sep 2015 00:19:42 +0800
> > Minfei Huang <mnfhuang@gmail.com> wrote:
> >
> > > 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.
> > >
> >
> > Bah, your emails got lost in my Inbox. Sorry about that.
> >
> > I'll make an effort to look at this first thing tomorrow.
>
> Ping. Any comment is appreciate.
>
> Thanks
> Minfei
>
> >
> > [ Cc'ing myself to remind me ]
> >
And I still forgot :-/
OK, I'm looking at it now.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
2015-10-22 5:14 ` Minfei Huang
2015-10-22 17:08 ` Steven Rostedt
@ 2015-10-22 19:44 ` Steven Rostedt
1 sibling, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-10-22 19:44 UTC (permalink / raw)
To: Minfei Huang; +Cc: mingo, tglx, hpa, x86, linux-kernel, mhuang
On Thu, 22 Oct 2015 13:14:07 +0800
Minfei Huang <mnfhuang@gmail.com> wrote:
> On 10/15/15 at 10:25pm, Steven Rostedt wrote:
> > On Thu, 17 Sep 2015 00:19:42 +0800
> > Minfei Huang <mnfhuang@gmail.com> wrote:
> >
> > > 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.
> > >
> >
> > Bah, your emails got lost in my Inbox. Sorry about that.
> >
> > I'll make an effort to look at this first thing tomorrow.
>
> Ping. Any comment is appreciate.
>
Looks fine. I'm pulling it into my queue and testing it.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-22 19:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 16:19 [REPOST PATCH] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Minfei Huang
2015-10-16 2:25 ` Steven Rostedt
2015-10-22 5:14 ` Minfei Huang
2015-10-22 17:08 ` Steven Rostedt
2015-10-22 19:44 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.