mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: rostedt@goodmis.org, Ralf Baechle <ralf@linux-mips.org>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Nicholas Mc Guire <der.herr@hofr.at>,
	David Daney <ddaney@caviumnetworks.com>,
	Richard Sandiford <rdsandiford@googlemail.com>,
	Patrik Kluba <kpajko79@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Michal Simek <monstr@monstr.eu>,
	"Maciej W . Rozycki" <macro@linux-mips.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	zhangfx@lemote.com, zhouqg@gmail.com
Subject: [PATCH v8 10/16] tracing: not trace the timecounter_read* in kernel/time/clocksource.c
Date: Sat, 14 Nov 2009 14:33:25 +0800	[thread overview]
Message-ID: <f3a54cef2de00885ee75a930b243083a716370bd.1258177321.git.wuzhangjin@gmail.com> (raw)
In-Reply-To: <c1fe0d6822e98bc0ffd2dfee7a579fbbe21430e0.1258177321.git.wuzhangjin@gmail.com>
In-Reply-To: <cover.1258177321.git.wuzhangjin@gmail.com>

From: Wu Zhangjin <wuzhangjin@gmail.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@gmail.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


  parent reply	other threads:[~2009-11-14  6:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14  6:30 [PATCH v8 00/16] ftrace for MIPS Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 01/16] tracing: convert trace_clock_local() as weak function Wu Zhangjin
2009-11-16 15:01   ` Steven Rostedt
2009-11-16 15:07   ` Thomas Gleixner
2009-11-16 15:21     ` Wu Zhangjin
2009-11-16 15:47     ` Michal Simek
2009-11-14  6:33 ` [PATCH v8 02/16] tracing: add mips_timecounter_read() for MIPS Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 03/16] tracing: add MIPS specific trace_clock_local() Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 04/16] tracing: add static function tracer support for MIPS Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 05/16] tracing: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST " Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 06/16] tracing: add an endian argument to scripts/recordmcount.pl Wu Zhangjin
2009-11-16 14:21   ` Thomas Gleixner
2009-11-16 14:29     ` Wu Zhangjin
2009-11-16 15:10       ` Steven Rostedt
2009-11-16 15:32       ` Thomas Gleixner
2009-11-14  6:33 ` [PATCH v8 07/16] tracing: add dynamic function tracer support for MIPS Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 08/16] tracing: add IRQENTRY_EXIT section " Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 09/16] tracing: define a new __time_notrace annotation flag Wu Zhangjin
2009-11-14  6:33 ` Wu Zhangjin [this message]
2009-11-14  6:33 ` [PATCH v8 11/16] tracing: not trace mips_timecounter_read() for MIPS Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 12/16] tracing: add function graph tracer support " Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 13/16] tracing: add dynamic function graph tracer " Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 14/16] tracing: make ftrace for MIPS work without -fno-omit-frame-pointer Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 15/16] tracing: reserve $12(t0) for mcount-ra-address of gcc 4.5 Wu Zhangjin
2009-11-14  6:33 ` [PATCH v8 16/16] tracing: make function graph tracer work with -mmcount-ra-address Wu Zhangjin
2009-11-16 13:48 ` [PATCH v8 00/16] ftrace for MIPS Ralf Baechle
2009-11-16 14:19   ` Thomas Gleixner

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=f3a54cef2de00885ee75a930b243083a716370bd.1258177321.git.wuzhangjin@gmail.com \
    --to=wuzhangjin@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=der.herr@hofr.at \
    --cc=fweisbec@gmail.com \
    --cc=kpajko79@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=monstr@monstr.eu \
    --cc=ralf@linux-mips.org \
    --cc=rdsandiford@googlemail.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=zhangfx@lemote.com \
    --cc=zhouqg@gmail.com \
    /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

all inboxes | Powered by JetHome®