linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] mips-specific ftrace support
@ 2009-05-29 14:58 wuzhangjin
  2009-05-29 15:02 ` [PATCH v2 1/6] mips static function tracer support wuzhangjin
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: wuzhangjin @ 2009-05-29 14:58 UTC (permalink / raw)
  To: linux-mips, linux-kernel
  Cc: Wu Zhangjin, Steven Rostedt, Ralf Baechle, Ingo Molnar,
	Andrew Morton, Frederic Weisbecker, Thomas Gleixner,
	Nicholas Mc Guire

From: Wu Zhangjin <wuzj@lemote.com>

ftrace is a mcount based kernel tracing tool/framework, which is originally
from RT_PREEMPT(http://rt.wiki.kernel.org).

ftrace is short for function tracer, this is its original name, but now, it
becomes a kernel tracing framework, lots of kernel tracers are built on it,
such as irqoff tracer, wakeup tracer and so forth.  these tracers are
arch-independent(?), but some of them are arch-dependent, such as the original
ftrace: function tracer, and dynamic function tracer, function graph tracer,
and also, system call tracer.

here is the mips porting of these four arch-dependent tracers, it will enable
the following new kernel config options in linux-mips system.

kernel hacking --->
           Tracers -->
                [*] Kernel Function Tracer
                [*]   Kernel Function Graph Tracer
                ...
                [*] Trace syscalls
                                ...
                [*] enable/disable ftrace tracepoints dynamically

in reality, because the timestamp getting function are arch-dependent, lots of
the tracers are arch-dependent. the arch-dependent part is that: sched_clock.
the original sched_clock in mips is jiffes based, only give 10ms precision in
1000HZ, which is not enough for ftrace. to get high-precise timestamp, we must
implement a new native_sched_clock via reading the MIPS clock counter, but
since it is only 32bit long, so, overflow should be handled carefully.

this -v2 patch series is based on the -v1 patch series and incorporates the
feedback from Steven Rostedt and Thomas Gleixner.

read the following document, and play with it:
        Documentation/trace/ftrace.txt

Wu Zhangjin (6):
  mips static function tracer support
  mips dynamic function tracer support
  add an endian argument to scripts/recordmcount.pl
  mips function graph tracer support
  mips specific clock function to get precise timestamp
  mips specific system call tracer

 arch/mips/Kconfig                   |    7 +
 arch/mips/Makefile                  |    2 +
 arch/mips/include/asm/ftrace.h      |   35 ++++-
 arch/mips/include/asm/ptrace.h      |    2 +
 arch/mips/include/asm/reg.h         |    5 +
 arch/mips/include/asm/syscall.h     |   84 +++++++++
 arch/mips/include/asm/thread_info.h |    5 +-
 arch/mips/kernel/Makefile           |   12 ++
 arch/mips/kernel/csrc-r4k.c         |    2 +-
 arch/mips/kernel/entry.S            |    2 +-
 arch/mips/kernel/ftrace.c           |  350 +++++++++++++++++++++++++++++++++++
 arch/mips/kernel/ftrace_clock.c     |   71 +++++++
 arch/mips/kernel/mcount.S           |  185 ++++++++++++++++++
 arch/mips/kernel/mips_ksyms.c       |    5 +
 arch/mips/kernel/ptrace.c           |   14 ++-
 arch/mips/kernel/scall64-o32.S      |    2 +-
 arch/mips/kernel/vmlinux.lds.S      |    1 +
 kernel/trace/trace_clock.c          |    2 +-
 scripts/Makefile.build              |    1 +
 scripts/recordmcount.pl             |   32 +++-
 20 files changed, 805 insertions(+), 14 deletions(-)
 create mode 100644 arch/mips/include/asm/syscall.h
 create mode 100644 arch/mips/kernel/ftrace.c
 create mode 100644 arch/mips/kernel/ftrace_clock.c
 create mode 100644 arch/mips/kernel/mcount.S

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-06-04 11:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-29 14:58 [PATCH v2 0/6] mips-specific ftrace support wuzhangjin
2009-05-29 15:02 ` [PATCH v2 1/6] mips static function tracer support wuzhangjin
2009-05-29 15:03 ` [PATCH v2 2/6] mips dynamic " wuzhangjin
2009-05-29 15:24   ` Steven Rostedt
2009-05-29 16:06     ` Wu Zhangjin
2009-05-29 17:22     ` Wu Zhangjin
2009-05-29 18:36       ` Wu Zhangjin
2009-05-31  6:47   ` Wang Liming
2009-06-02 16:15     ` wu zhangjin
2009-06-03  6:05       ` Wang Liming
2009-06-03 12:47         ` Steven Rostedt
2009-06-04 11:20           ` Wu Zhangjin
2009-05-29 15:04 ` [PATCH v2 3/6] add an endian argument to scripts/recordmcount.pl wuzhangjin
2009-05-29 15:21   ` Steven Rostedt
2009-05-29 15:05 ` [PATCH v2 4/6] mips function graph tracer support wuzhangjin
2009-05-29 15:05 ` [PATCH v2 5/6] mips specific clock function to get precise timestamp wuzhangjin
2009-05-29 15:06 ` [PATCH v2 6/6] mips specific system call tracer wuzhangjin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).