[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f3a54cef2de00885ee75a930b243083a716370bd.1258177321.git.wuzhangjin@gmail.com>
Date: Sat, 14 Nov 2009 14:33:25 +0800
From: Wu Zhangjin <wuzhangjin@...il.com>
To: rostedt@...dmis.org, Ralf Baechle <ralf@...ux-mips.org>
Cc: Wu Zhangjin <wuzhangjin@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Nicholas Mc Guire <der.herr@...r.at>,
David Daney <ddaney@...iumnetworks.com>,
Richard Sandiford <rdsandiford@...glemail.com>,
Patrik Kluba <kpajko79@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Michal Simek <monstr@...str.eu>,
"Maciej W . Rozycki" <macro@...ux-mips.org>,
linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
zhangfx@...ote.com, zhouqg@...il.com
Subject: [PATCH v8 10/16] tracing: not trace the timecounter_read* in kernel/time/clocksource.c
From: Wu Zhangjin <wuzhangjin@...il.com>
Some platforms(i.e. MIPS) need these two functions to get the precise
timestamp, we use __time_notrace(added in the last patch) to annotate
it. By default, __time_notrace is empty, so, this patch have no
influence to the original functions, but if you really not need to trace
them, just add the following line into the arch specific ftrace.h:
#define __time_notrace notrace
If you only need it for function graph tracer, wrap it:
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#define __time_notrace notrace
#endif
please get more information from include/linux/ftrace.h
Signed-off-by: Wu Zhangjin <wuzhangjin@...il.com>
---
kernel/time/clocksource.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 5e18c6a..b00476a 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -30,6 +30,7 @@
#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
#include <linux/tick.h>
#include <linux/kthread.h>
+#include <linux/ftrace.h>
void timecounter_init(struct timecounter *tc,
const struct cyclecounter *cc,
@@ -52,7 +53,7 @@ EXPORT_SYMBOL(timecounter_init);
* The first call to this function for a new time counter initializes
* the time tracking and returns an undefined result.
*/
-static u64 timecounter_read_delta(struct timecounter *tc)
+static u64 __time_notrace timecounter_read_delta(struct timecounter *tc)
{
cycle_t cycle_now, cycle_delta;
u64 ns_offset;
@@ -72,7 +73,7 @@ static u64 timecounter_read_delta(struct timecounter *tc)
return ns_offset;
}
-u64 timecounter_read(struct timecounter *tc)
+u64 __time_notrace timecounter_read(struct timecounter *tc)
{
u64 nsec;
--
1.6.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists