mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [for-next][PATCH 0/2] tracing: More updates for 4.4
@ 2015-10-23 12:33 Steven Rostedt
  2015-10-23 12:33 ` [for-next][PATCH 1/2] tracing: Remove {start,stop}_branch_trace Steven Rostedt
  2015-10-23 12:33 ` [for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2015-10-23 12:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton

  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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [for-next][PATCH 1/2] tracing: Remove {start,stop}_branch_trace
  2015-10-23 12:33 [for-next][PATCH 0/2] tracing: More updates for 4.4 Steven Rostedt
@ 2015-10-23 12:33 ` Steven Rostedt
  2015-10-23 12:33 ` [for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2015-10-23 12:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Dmitry Safonov

[-- Attachment #1: 0001-tracing-Remove-start-stop-_branch_trace.patch --]
[-- Type: text/plain, Size: 1320 bytes --]

From: Dmitry Safonov <0x7f454c46@gmail.com>

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.

Link: http://lkml.kernel.org/r/1445000689-32596-1-git-send-email-0x7f454c46@gmail.com

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_branch.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
index e2e12ad3186f..3a2a73716a5b 100644
--- a/kernel/trace/trace_branch.c
+++ b/kernel/trace/trace_branch.c
@@ -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,
-- 
2.6.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace
  2015-10-23 12:33 [for-next][PATCH 0/2] tracing: More updates for 4.4 Steven Rostedt
  2015-10-23 12:33 ` [for-next][PATCH 1/2] tracing: Remove {start,stop}_branch_trace Steven Rostedt
@ 2015-10-23 12:33 ` Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2015-10-23 12:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Minfei Huang

[-- Attachment #1: 0002-ftrace-Calculate-the-correct-dyn_ftrace-number-to-re.patch --]
[-- Type: text/plain, Size: 1337 bytes --]

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-23 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-23 12:33 [for-next][PATCH 0/2] tracing: More updates for 4.4 Steven Rostedt
2015-10-23 12:33 ` [for-next][PATCH 1/2] tracing: Remove {start,stop}_branch_trace Steven Rostedt
2015-10-23 12:33 ` [for-next][PATCH 2/2] ftrace: Calculate the correct dyn_ftrace number to report to the userspace Steven Rostedt

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®