tracing: More updates for 4.4
Steven Rostedt
maintainercover tracing: More updates for 4.4
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: 883a1e867e0fe7c2dc2e5844ef692f80177631d5
Dmitry Safonov (1):
tracing: Remove {start,stop}_branch_trace
Minfei Huang (1):
ftrace: Calculate the correct dyn_ftrace number to report to the userspace
----
arch/x86/kernel/ftrace.c | 4 ++++ kernel/trace/trace_branch.c | 15 ++------------- 2 files changed, 6 insertions(+), 13 deletions(-)
Steven Rostedt
maintainerPATCH 1/2 tracing: Remove {start,stop}_branch_trace
From: Dmitry Safonov <[email protected]>
Both start_branch_trace() and stop_branch_trace() are used in only one location, and are both static. As they are small functions there is no need to keep them separated out.
--- kernel/trace/trace_branch.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
kernel/trace/trace_branch.c +2 -13
@@ -125,25 +125,14 @@ void disable_branch_tracing(void)mutex_unlock (&branch_tracing_mutex); } -static void start_branch_trace (struct trace_array *tr) -{ -enable_branch_tracing (tr); -} - -static void stop_branch_trace (struct trace_array *tr) -{ -disable_branch_tracing (); -} -static int branch_trace_init (struct trace_array *tr) { -start_branch_trace (tr); -return 0 ; +return enable_branch_tracing (tr); }static void branch_trace_reset (struct trace_array *tr) { -stop_branch_trace (tr); +disable_branch_tracing (); } static enum print_line_t trace_branch_print(struct trace_iterator *iter,
Signature · 1 line
2.6.1
Steven Rostedt
maintainerPATCH 2/2 ftrace: Calculate the correct dyn_ftrace number to report to the userspace
In reply to Steven RostedtFrom: Minfei Huang <[email protected]>
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.
--- arch/x86/kernel/ftrace.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/ftrace.c +4 -0
@@ -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 ();
Signature · 1 line
2.6.1