kernel-hacking-2024-linux-s.../arch/mips
Wu Zhangjin d2bb076299 MIPS: Tracing: Add static function tracer support for MIPS
If -pg of gcc is enabled with CONFIG_FUNCTION_TRACER=y. a calling to
_mcount will be inserted into each kernel function. so, there is a
possibility to trace the kernel functions in _mcount.

This patch add the MIPS specific _mcount support for static function
tracing. by default, ftrace_trace_function is initialized as
ftrace_stub(an empty function), so, the default _mcount will introduce
very little overhead. after enabling ftrace in user-space, it will jump
to a real tracing function and do static function tracing for us.

and -ffunction-sections is incompatible with -pg, so, disable it when
ftracer is enabled.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Nicholas Mc Guire <der.herr@hofr.at>
Cc: zhangfx@lemote.com
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/672/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-12-17 01:57:21 +00:00
..
alchemy MIPS: Alchemy: Fix hang with high-frequency edge interrupts 2009-11-02 12:00:08 +01:00
ar7 MIPS: AR7: register watchdog device only if enabled in hw configuration 2009-11-02 12:00:03 +01:00
basler/excite MIPS: Excite: Get rid of BKL. 2009-09-30 21:47:01 +02:00
bcm47xx MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
bcm63xx MIPS: bcm63xx: Set the correct BCM3302 CPU name 2009-11-02 12:00:07 +01:00
boot MIPS: Remove addinitrd and CONFIG_PROBE_INITRD_HEADER 2009-12-17 01:57:07 +00:00
cavium-octeon MIPS: Octeon: Add platform devices MGMT Ethernet ports. 2009-12-17 01:56:59 +00:00
cobalt
configs MIPS: PowerTV: Base files for Cisco PowerTV platform 2009-12-17 01:57:17 +00:00
dec
emma
fw MIPS: IP22: Remove an unused function 2009-12-17 01:56:56 +00:00
gt64120/wrppmc
include/asm MIPS: Tracing: Add static function tracer support for MIPS 2009-12-17 01:57:21 +00:00
jazz MIPS: Add IRQF_TIMER flag for timer interrupts 2009-11-02 12:00:02 +01:00
kernel MIPS: Tracing: Add static function tracer support for MIPS 2009-12-17 01:57:21 +00:00
lasat MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
lib
loongson MIPS: Loongson 2F: Add CPU frequency scaling support 2009-12-17 01:57:20 +00:00
math-emu MIPS: Collect FPU emulator statistics per-CPU. 2009-12-17 01:57:08 +00:00
mipssim MIPS: MIPSsim: Remove unused code 2009-12-17 01:57:01 +00:00
mm MIPS: Sibyte: Use hweight8 instead of counting bits 2009-12-17 01:57:16 +00:00
mti-malta MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
nxp MIPS: Fixup last users of irq_chip->typename 2009-12-17 01:57:21 +00:00
oprofile MIPS: oprofile: Only do performance counter handling for counter interrupts 2009-12-17 01:57:10 +00:00
pci MIPS: Lemote 2F: Add PCI support 2009-12-17 01:57:12 +00:00
pmc-sierra
power
powertv MIPS: PowerTV: Base files for Cisco PowerTV platform 2009-12-17 01:57:17 +00:00
rb532 MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
sgi-ip22
sgi-ip27 MIPS: Add IRQF_TIMER flag for timer interrupts 2009-11-02 12:00:02 +01:00
sgi-ip32
sibyte MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
sni MIPS: Fixup last users of irq_chip->typename 2009-12-17 01:57:21 +00:00
txx9 MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE 2009-12-17 01:56:56 +00:00
vr41xx genirq: Convert irq_desc.lock to raw_spinlock 2009-12-14 23:55:33 +01:00
Kconfig MIPS: Tracing: Add static function tracer support for MIPS 2009-12-17 01:57:21 +00:00
Kconfig.debug
Makefile MIPS: Tracing: Add static function tracer support for MIPS 2009-12-17 01:57:21 +00:00