From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mathieu Desnoyers <compudj@krystal.dyndns.org>
Subject: [PATCH 2/3][RFC] tracing: Make the trace_clock_local and trace_normalize_local weak
Date: Thu, 12 Nov 2009 00:43:56 -0500 [thread overview]
Message-ID: <20091112054845.801761406@goodmis.org> (raw)
In-Reply-To: 20091112054354.838746008@goodmis.org
[-- Attachment #1: 0002-tracing-Make-the-trace_clock_local-and-trace_normali.patch --]
[-- Type: text/plain, Size: 1727 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The function trace_clock_local uses sched_clock for taking the time
stamp. For some archs this is not the most efficient method.
Making the trace_clock_local and trace_normalize_local functions weak
allow for archs to override what they are defined as.
This patch also removes some "notrace" annotations from the trace_clock.c
file since the entire trace directory has the -pg option removed
from compiling.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_clock.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 168bf59..2b21f61 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -28,7 +28,7 @@
* Useful for tracing that does not cross to other CPUs nor
* does it go through idle events.
*/
-u64 notrace trace_clock_local(void)
+u64 __weak trace_clock_local(void)
{
u64 clock;
int resched;
@@ -52,7 +52,7 @@ u64 notrace trace_clock_local(void)
*
* Normalize the trace_clock_local value.
*/
-void notrace trace_normalize_local(int cpu, u64 *ts)
+void __weak trace_normalize_local(int cpu, u64 *ts)
{
/* nop */
}
@@ -65,7 +65,7 @@ void notrace trace_normalize_local(int cpu, u64 *ts)
* jitter between CPUs. So it's a pretty scalable clock, but there
* can be offsets in the trace data.
*/
-u64 notrace trace_clock(void)
+u64 trace_clock(void)
{
return cpu_clock(raw_smp_processor_id());
}
@@ -89,7 +89,7 @@ static struct {
.lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED,
};
-u64 notrace trace_clock_global(void)
+u64 trace_clock_global(void)
{
unsigned long flags;
int this_cpu;
--
1.6.5
next prev parent reply other threads:[~2009-11-12 5:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 5:43 [PATCH 0/3][RFC] tracing/x86: split sched_clock in recording trace time stamps Steven Rostedt
2009-11-12 5:43 ` [PATCH 1/3][RFC] tracing: Add time stamp normalize to ring buffer clock selection Steven Rostedt
2009-11-12 5:43 ` Steven Rostedt [this message]
2009-11-12 5:43 ` [PATCH 3/3][RFC] tracing: Separate out x86 time stamp reading and ns conversion Steven Rostedt
2009-11-12 8:53 ` Justin P. Mattock
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=20091112054845.801761406@goodmis.org \
--to=rostedt@goodmis.org \
--cc=compudj@krystal.dyndns.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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 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.