From: Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fweisbec@gmail.com, rostedt@goodmis.org, peterz@infradead.org,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:tracing/function-graph-tracer] tracing/function-graph-tracer: use the more lightweight local clock
Date: Thu, 5 Mar 2009 11:03:33 GMT [thread overview]
Message-ID: <tip-bf467399b5f6301e7a6dc21460e66b1f40e16c7e@git.kernel.org> (raw)
In-Reply-To: <49af243d.06e9300a.53ad.ffff840c@mx.google.com>
Commit-ID: bf467399b5f6301e7a6dc21460e66b1f40e16c7e
Gitweb: http://git.kernel.org/tip/bf467399b5f6301e7a6dc21460e66b1f40e16c7e
Author: "Frederic Weisbecker" <fweisbec@gmail.com>
AuthorDate: Thu, 5 Mar 2009 01:49:22 +0100
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 5 Mar 2009 12:01:52 +0100
tracing/function-graph-tracer: use the more lightweight local clock
Impact: decrease hangs risks with the graph tracer on slow systems
Since the function graph tracer can spend too much time on timer
interrupts, it's better now to use the more lightweight local
clock. Anyway, the function graph traces are more reliable on a
per cpu trace.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <49af243d.06e9300a.53ad.ffff840c@mx.google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/ftrace.c | 2 +-
kernel/trace/trace_functions_graph.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 3925ec0..a85da17 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -436,7 +436,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
return;
}
- calltime = cpu_clock(raw_smp_processor_id());
+ calltime = trace_clock_local();
if (ftrace_push_return_trace(old, calltime,
self_addr, &trace.depth) == -EBUSY) {
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index c009553..e527f2f 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -112,7 +112,7 @@ unsigned long ftrace_return_to_handler(void)
unsigned long ret;
ftrace_pop_return_trace(&trace, &ret);
- trace.rettime = cpu_clock(raw_smp_processor_id());
+ trace.rettime = trace_clock_local();
ftrace_graph_return(&trace);
if (unlikely(!ret)) {
next prev parent reply other threads:[~2009-03-05 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 0:49 [PATCH 2/2] " Frederic Weisbecker
2009-03-05 1:19 ` Frederic Weisbecker
2009-03-05 7:30 ` Peter Zijlstra
2009-03-05 8:46 ` Frederic Weisbecker
2009-03-05 10:56 ` Ingo Molnar
2009-03-05 11:16 ` Frederic Weisbecker
2009-03-05 11:56 ` Ingo Molnar
2009-03-05 14:01 ` Frederic Weisbecker
2009-03-05 14:22 ` Ingo Molnar
2009-03-05 11:03 ` Frederic Weisbecker [this message]
2009-03-05 11:04 ` Ingo Molnar
2009-03-05 11:23 ` Frederic Weisbecker
2009-03-05 11:38 ` Ingo Molnar
2009-03-05 11:18 ` [tip:tracing/function-graph-tracer] " Frederic Weisbecker
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=tip-bf467399b5f6301e7a6dc21460e66b1f40e16c7e@git.kernel.org \
--to=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome