Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1254555
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace |
| Date | 2015-10-23 14:40 +0200 |
| Message-ID | <qmJNx-1va-39@gated-at.bofh.it> (permalink) |
| References | <qmJNx-1va-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Link: http://lkml.kernel.org/r/1442420382-13130-1-git-send-email-mnfhuang@gmail.com
Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
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 8b7b0a51e742..311bcf338f07 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.6.1
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[for-next][PATCH 0/2] tracing: More updates for 4.4 Steven Rostedt <rostedt@goodmis.org> - 2015-10-23 14:40 +0200
[for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Steven Rostedt <rostedt@goodmis.org> - 2015-10-23 14:40 +0200
[for-next][PATCH 1/2] tracing: Remove {start,stop}_branch_trace Steven Rostedt <rostedt@goodmis.org> - 2015-10-23 14:40 +0200
csiph-web