[PATCH] powerpc: Enable jump label support

Anton Blanchard anton at samba.org
Wed May 23 13:58:41 EST 2012


When looking through some instruction traces I noticed our tracepoint
checks were inline. It turns out we don't have CONFIG_JUMP_LABEL
enabled.

By enabling CONFIG_JUMP_LABEL we replace a load/compare/branch with
a nop at every tracepoint call. For example in do_IRQ:

CONFIG_JUMP_LABEL disabled:
        stdx 3,11,9
        lwz 0,8(29)
        cmpwi 7,0,0
        bne- 7,.L124
        bl .irq_enter

CONFIG_JUMP_LABEL enabled:
        stdx 3,11,9     
        nop
        bl .irq_enter  

Signed-off-by: Anton Blanchard <anton at samba.org>
---

Index: linux-build/arch/powerpc/configs/ppc64_defconfig
===================================================================
--- linux-build.orig/arch/powerpc/configs/ppc64_defconfig	2012-04-05 13:47:45.691857096 +1000
+++ linux-build/arch/powerpc/configs/ppc64_defconfig	2012-05-23 13:14:04.254270594 +1000
@@ -16,6 +16,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
 CONFIG_KPROBES=y
+CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
Index: linux-build/arch/powerpc/configs/pseries_defconfig
===================================================================
--- linux-build.orig/arch/powerpc/configs/pseries_defconfig	2012-04-05 13:47:45.691857096 +1000
+++ linux-build/arch/powerpc/configs/pseries_defconfig	2012-05-23 13:14:59.783222304 +1000
@@ -24,6 +24,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
 CONFIG_KPROBES=y
+CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y


More information about the Linuxppc-dev mailing list