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 00/16] ftrace for MIPS
Date: Sat, 14 Nov 2009 14:30:31 +0800 [thread overview]
Message-ID: <cover.1258177321.git.wuzhangjin@gmail.com> (raw)
From: Wu Zhangjin <wuzhangjin@gmail.com>
This patchset adds ftrace support for MIPS, including static ftracer, dynamic
ftracer and function graph tracer, and also, a MIPS specific
trace_clock_local() function is added to get high precision timestamp.
Differ from the v7, This v8 revision incoporates the feedbacks from David, Ralf
and Maciej. thanks goes to them.
o Remove the needless -mlong-calls introduced in the old "tracing: add static
function tracer support for MIPS"
static ftracer already support module tracing for there is an existing
-mlong-calls for modules in arch/mips/Makefile:
MODFLAGS += -mlong-calls
o Make dynamic ftracer work without -mlong-calls.
Now, we need to consider the kernel and module respectively, the kernel part
is without -mlong-calls, the module part is with -mlong-calls.
In scripts/recordmcount.pl, we need to get the right offset, and in
arch/mips/kernel/ftrace.c, we need to replace the right instruction in
ftrace_make_nop() & ftrace_make_call().
And what I must mention here:
I. we will not really get the offset of calling to _mcount in
scripts/recordmcount.pl for the modules with -mlong-calls, we get the
offset of "lui,v1,hi16_mcount".
II. and in the ftrace_make_nop(), we not really replace the instruction by a
nop, but by a "b 1f" instead. so, ftrace_make_nop not mean its original
meaning.
o Make function graph tracer work without -mlong-calls
'Cause -pg with and without -mlong-calls generate different number of
instructions, we need to consider this and move the searching pointer to
the right position in ftrace_get_parent_addr().
All of the updates have been tested with gcc-4.4/binutils-2.19.1 and
gcc-4.5(including David's mcount-ra-address)/binutils-2.20 on a YeeLoong
netbook. and the source code have been pushed into:
git://dev.lemote.com/rt4ls.git linux-mips/dev/ftrace-upstream
BTW: What about this revision? Hope it is the last revision from me, but I can
not promise for the kernel developers are always "rigorous": they need the best
solution ;) So, more feedbacks are welcome!
Thanks & Regards,
Wu Zhangjin
Wu Zhangjin (16):
tracing: convert trace_clock_local() as weak function
tracing: add mips_timecounter_read() for MIPS
tracing: add MIPS specific trace_clock_local()
tracing: add static function tracer support for MIPS
tracing: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST for MIPS
tracing: add an endian argument to scripts/recordmcount.pl
tracing: add dynamic function tracer support for MIPS
tracing: add IRQENTRY_EXIT section for MIPS
tracing: define a new __time_notrace annotation flag
tracing: not trace the timecounter_read* in kernel/time/clocksource.c
tracing: not trace mips_timecounter_read() for MIPS
tracing: add function graph tracer support for MIPS
tracing: add dynamic function graph tracer for MIPS
tracing: make ftrace for MIPS work without -fno-omit-frame-pointer
tracing: reserve $12(t0) for mcount-ra-address of gcc 4.5
tracing: make function graph tracer work with -mmcount-ra-address
arch/mips/Kconfig | 5 +
arch/mips/Makefile | 9 ++
arch/mips/include/asm/ftrace.h | 97 ++++++++++++++-
arch/mips/include/asm/irq.h | 29 +----
arch/mips/include/asm/time.h | 20 +++
arch/mips/kernel/Makefile | 9 ++
arch/mips/kernel/csrc-r4k.c | 42 ++++++
arch/mips/kernel/ftrace.c | 275 ++++++++++++++++++++++++++++++++++++++++
arch/mips/kernel/irq.c | 30 +++++
arch/mips/kernel/mcount.S | 189 +++++++++++++++++++++++++++
arch/mips/kernel/mips_ksyms.c | 5 +
arch/mips/kernel/smp.c | 3 +-
arch/mips/kernel/smtc.c | 21 ++-
arch/mips/kernel/time.c | 2 +
arch/mips/kernel/trace_clock.c | 33 +++++
arch/mips/kernel/vmlinux.lds.S | 1 +
arch/mips/sgi-ip22/ip22-int.c | 3 +-
arch/mips/sgi-ip22/ip22-time.c | 3 +-
include/linux/ftrace.h | 12 ++
kernel/time/clocksource.c | 5 +-
kernel/trace/trace_clock.c | 2 +-
scripts/Makefile.build | 1 +
scripts/recordmcount.pl | 60 ++++++++-
23 files changed, 812 insertions(+), 44 deletions(-)
create mode 100644 arch/mips/kernel/ftrace.c
create mode 100644 arch/mips/kernel/mcount.S
create mode 100644 arch/mips/kernel/trace_clock.c
next reply other threads:[~2009-11-14 6:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 6:30 Wu Zhangjin [this message]
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 ` [PATCH v8 10/16] tracing: not trace the timecounter_read* in kernel/time/clocksource.c Wu Zhangjin
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=cover.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 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.