* [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC @ 2009-03-20 16:44 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg Hi all, Here is another approach to fixing tracers vs. CALLER_ADDR problem on PowerPC. Preface for those who don't know or forgot what the problem is: Gcc frame pointers do nothing useful on PowerPC (they're harmful, actually), and thus lib/Kconfig.debug makes CONFIG_FRAME_POINTER unselectable on PPC targets, but CALLER_ADDR macros are available only with CONFIG_FRAME_POINTER, therefore tracing is completely useless on PowerPC: [...] <idle>-0 0X.h3 2us+: 0:140:R + [000] 1733:120:S mvtsd <idle>-0 0X.h3 9us+: 0 (0) <idle>-0 0X..3 72us : 0 (0) <idle>-0 0X..3 73us : 0:140:R ==> [000] 1733:120:R mvtsd While it should look like this: [...] <idle>-0 0X.h3 2us+: 0:140:R + [000] 1740:120:S mvtsd <idle>-0 0X.h3 9us+: hrtimer_wakeup (__run_hrtimer) <idle>-0 0X..3 87us : cpu_idle (__got2_end) <idle>-0 0X..3 89us : 0:140:R ==> [000] 1740:120:R mvtsd I've tried to fix the issue via expanding the #ifdef in the ftrace.h: http://lkml.org/lkml/2009/1/31/141 Then Steven Rostedt suggested to implement something more generic, i.e. HAVE_NORMAL_FRAME_POINTERS Kconfig symbol. I found a way to solve the problem w/o additional symbols, but with some Makefile magic (http://lkml.org/lkml/2009/2/4/273). But because of top-level Makefile issues on other arches (http://lkml.org/lkml/2009/2/14/89) I had to abandon the approach. So, this patch set combines Steven Rostedt's idea and a small Makefile change, so that now only top-level Makefile has to know about the new symbol, and the rest of the kernel can stay with using CONFIG_FRAME_POINTER. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC @ 2009-03-20 16:44 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: Steven Rostedt, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel Hi all, Here is another approach to fixing tracers vs. CALLER_ADDR problem on PowerPC. Preface for those who don't know or forgot what the problem is: Gcc frame pointers do nothing useful on PowerPC (they're harmful, actually), and thus lib/Kconfig.debug makes CONFIG_FRAME_POINTER unselectable on PPC targets, but CALLER_ADDR macros are available only with CONFIG_FRAME_POINTER, therefore tracing is completely useless on PowerPC: [...] <idle>-0 0X.h3 2us+: 0:140:R + [000] 1733:120:S mvtsd <idle>-0 0X.h3 9us+: 0 (0) <idle>-0 0X..3 72us : 0 (0) <idle>-0 0X..3 73us : 0:140:R ==> [000] 1733:120:R mvtsd While it should look like this: [...] <idle>-0 0X.h3 2us+: 0:140:R + [000] 1740:120:S mvtsd <idle>-0 0X.h3 9us+: hrtimer_wakeup (__run_hrtimer) <idle>-0 0X..3 87us : cpu_idle (__got2_end) <idle>-0 0X..3 89us : 0:140:R ==> [000] 1740:120:R mvtsd I've tried to fix the issue via expanding the #ifdef in the ftrace.h: http://lkml.org/lkml/2009/1/31/141 Then Steven Rostedt suggested to implement something more generic, i.e. HAVE_NORMAL_FRAME_POINTERS Kconfig symbol. I found a way to solve the problem w/o additional symbols, but with some Makefile magic (http://lkml.org/lkml/2009/2/4/273). But because of top-level Makefile issues on other arches (http://lkml.org/lkml/2009/2/14/89) I had to abandon the approach. So, this patch set combines Steven Rostedt's idea and a small Makefile change, so that now only top-level Makefile has to know about the new symbol, and the rest of the kernel can stay with using CONFIG_FRAME_POINTER. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-20 16:44 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. When defined, the top level Makefile won't add -fno-omit-frame-pointer cflag (the flag is useless in PowerPC kernels, and also makes gcc generate wrong code). Also move ARCH_WANT_FRAME_POINTERS's help text. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- Makefile | 7 +++++-- arch/powerpc/Kconfig | 1 + lib/Kconfig.debug | 16 ++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 46c04c5..bf41b05 100644 --- a/Makefile +++ b/Makefile @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif ifdef CONFIG_FRAME_POINTER -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + KBUILD_CFLAGS += -fno-optimize-sibling-calls + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS + KBUILD_CFLAGS += -fno-omit-frame-pointer + endif else -KBUILD_CFLAGS += -fomit-frame-pointer + KBUILD_CFLAGS += -fomit-frame-pointer endif ifdef CONFIG_DEBUG_INFO diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 97f9a64..4587e66 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -113,6 +113,7 @@ config PPC select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_GRAPH_TRACER select ARCH_WANT_OPTIONAL_GPIOLIB + select ARCH_HAS_NORMAL_FRAME_POINTERS select HAVE_IDE select HAVE_IOREMAP_PROT select HAVE_EFFICIENT_UNALIGNED_ACCESS diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4b63b6b..fc8cd1f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS This is a relatively cheap check but if you care about maximum performance, say N. -# -# Select this config option from the architecture Kconfig, if it -# it is preferred to always offer frame pointers as a config -# option on the architecture (regardless of KERNEL_DEBUG): -# config ARCH_WANT_FRAME_POINTERS bool help + Select this config option from the architecture Kconfig, if it + it is preferred to always offer frame pointers as a config + option on the architecture (regardless of KERNEL_DEBUG). + +config ARCH_HAS_NORMAL_FRAME_POINTERS + bool + help + Architectures should select this symbol if their ABI implies + having a frame pointer. config FRAME_POINTER bool "Compile the kernel with frame pointers" depends on DEBUG_KERNEL && \ (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ - AVR32 || SUPERH || BLACKFIN || MN10300) || \ + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ ARCH_WANT_FRAME_POINTERS default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS help -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-03-20 16:44 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: Steven Rostedt, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. When defined, the top level Makefile won't add -fno-omit-frame-pointer cflag (the flag is useless in PowerPC kernels, and also makes gcc generate wrong code). Also move ARCH_WANT_FRAME_POINTERS's help text. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- Makefile | 7 +++++-- arch/powerpc/Kconfig | 1 + lib/Kconfig.debug | 16 ++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 46c04c5..bf41b05 100644 --- a/Makefile +++ b/Makefile @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif ifdef CONFIG_FRAME_POINTER -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + KBUILD_CFLAGS += -fno-optimize-sibling-calls + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS + KBUILD_CFLAGS += -fno-omit-frame-pointer + endif else -KBUILD_CFLAGS += -fomit-frame-pointer + KBUILD_CFLAGS += -fomit-frame-pointer endif ifdef CONFIG_DEBUG_INFO diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 97f9a64..4587e66 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -113,6 +113,7 @@ config PPC select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_GRAPH_TRACER select ARCH_WANT_OPTIONAL_GPIOLIB + select ARCH_HAS_NORMAL_FRAME_POINTERS select HAVE_IDE select HAVE_IOREMAP_PROT select HAVE_EFFICIENT_UNALIGNED_ACCESS diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4b63b6b..fc8cd1f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS This is a relatively cheap check but if you care about maximum performance, say N. -# -# Select this config option from the architecture Kconfig, if it -# it is preferred to always offer frame pointers as a config -# option on the architecture (regardless of KERNEL_DEBUG): -# config ARCH_WANT_FRAME_POINTERS bool help + Select this config option from the architecture Kconfig, if it + it is preferred to always offer frame pointers as a config + option on the architecture (regardless of KERNEL_DEBUG). + +config ARCH_HAS_NORMAL_FRAME_POINTERS + bool + help + Architectures should select this symbol if their ABI implies + having a frame pointer. config FRAME_POINTER bool "Compile the kernel with frame pointers" depends on DEBUG_KERNEL && \ (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ - AVR32 || SUPERH || BLACKFIN || MN10300) || \ + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ ARCH_WANT_FRAME_POINTERS default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS help -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-21 3:49 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-03-21 3:49 UTC (permalink / raw) To: Anton Vorontsov, Benjamin Herrenschmidt Cc: linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar, Sam Ravnborg Ben, Can you ACK this patch? Or even take it in your tree? Thanks, -- Steve On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > When defined, the top level Makefile won't add -fno-omit-frame-pointer > cflag (the flag is useless in PowerPC kernels, and also makes gcc > generate wrong code). > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > Makefile | 7 +++++-- > arch/powerpc/Kconfig | 1 + > lib/Kconfig.debug | 16 ++++++++++------ > 3 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 46c04c5..bf41b05 100644 > --- a/Makefile > +++ b/Makefile > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > endif > > ifdef CONFIG_FRAME_POINTER > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > + KBUILD_CFLAGS += -fno-omit-frame-pointer > + endif > else > -KBUILD_CFLAGS += -fomit-frame-pointer > + KBUILD_CFLAGS += -fomit-frame-pointer > endif > > ifdef CONFIG_DEBUG_INFO > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 97f9a64..4587e66 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -113,6 +113,7 @@ config PPC > select HAVE_FUNCTION_TRACER > select HAVE_FUNCTION_GRAPH_TRACER > select ARCH_WANT_OPTIONAL_GPIOLIB > + select ARCH_HAS_NORMAL_FRAME_POINTERS > select HAVE_IDE > select HAVE_IOREMAP_PROT > select HAVE_EFFICIENT_UNALIGNED_ACCESS > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 4b63b6b..fc8cd1f 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > This is a relatively cheap check but if you care about maximum > performance, say N. > > -# > -# Select this config option from the architecture Kconfig, if it > -# it is preferred to always offer frame pointers as a config > -# option on the architecture (regardless of KERNEL_DEBUG): > -# > config ARCH_WANT_FRAME_POINTERS > bool > help > + Select this config option from the architecture Kconfig, if it > + it is preferred to always offer frame pointers as a config > + option on the architecture (regardless of KERNEL_DEBUG). > + > +config ARCH_HAS_NORMAL_FRAME_POINTERS > + bool > + help > + Architectures should select this symbol if their ABI implies > + having a frame pointer. > > config FRAME_POINTER > bool "Compile the kernel with frame pointers" > depends on DEBUG_KERNEL && \ > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > ARCH_WANT_FRAME_POINTERS > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > help ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-03-21 3:49 ` Steven Rostedt 0 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-03-21 3:49 UTC (permalink / raw) To: Anton Vorontsov, Benjamin Herrenschmidt Cc: Ingo Molnar, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel Ben, Can you ACK this patch? Or even take it in your tree? Thanks, -- Steve On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > When defined, the top level Makefile won't add -fno-omit-frame-pointer > cflag (the flag is useless in PowerPC kernels, and also makes gcc > generate wrong code). > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > Makefile | 7 +++++-- > arch/powerpc/Kconfig | 1 + > lib/Kconfig.debug | 16 ++++++++++------ > 3 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 46c04c5..bf41b05 100644 > --- a/Makefile > +++ b/Makefile > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > endif > > ifdef CONFIG_FRAME_POINTER > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > + KBUILD_CFLAGS += -fno-omit-frame-pointer > + endif > else > -KBUILD_CFLAGS += -fomit-frame-pointer > + KBUILD_CFLAGS += -fomit-frame-pointer > endif > > ifdef CONFIG_DEBUG_INFO > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 97f9a64..4587e66 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -113,6 +113,7 @@ config PPC > select HAVE_FUNCTION_TRACER > select HAVE_FUNCTION_GRAPH_TRACER > select ARCH_WANT_OPTIONAL_GPIOLIB > + select ARCH_HAS_NORMAL_FRAME_POINTERS > select HAVE_IDE > select HAVE_IOREMAP_PROT > select HAVE_EFFICIENT_UNALIGNED_ACCESS > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 4b63b6b..fc8cd1f 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > This is a relatively cheap check but if you care about maximum > performance, say N. > > -# > -# Select this config option from the architecture Kconfig, if it > -# it is preferred to always offer frame pointers as a config > -# option on the architecture (regardless of KERNEL_DEBUG): > -# > config ARCH_WANT_FRAME_POINTERS > bool > help > + Select this config option from the architecture Kconfig, if it > + it is preferred to always offer frame pointers as a config > + option on the architecture (regardless of KERNEL_DEBUG). > + > +config ARCH_HAS_NORMAL_FRAME_POINTERS > + bool > + help > + Architectures should select this symbol if their ABI implies > + having a frame pointer. > > config FRAME_POINTER > bool "Compile the kernel with frame pointers" > depends on DEBUG_KERNEL && \ > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > ARCH_WANT_FRAME_POINTERS > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > help ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-21 3:49 ` Steven Rostedt @ 2009-03-28 10:48 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-28 10:48 UTC (permalink / raw) To: Steven Rostedt Cc: linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar, Sam Ravnborg On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > Ben, > > Can you ACK this patch? Or even take it in your tree? Benjamin, have you had a chance to look into this? Sam, could you also take a look? Thanks! > On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > generate wrong code). > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > Makefile | 7 +++++-- > > arch/powerpc/Kconfig | 1 + > > lib/Kconfig.debug | 16 ++++++++++------ > > 3 files changed, 16 insertions(+), 8 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 46c04c5..bf41b05 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > > endif > > > > ifdef CONFIG_FRAME_POINTER > > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > > + KBUILD_CFLAGS += -fno-omit-frame-pointer > > + endif > > else > > -KBUILD_CFLAGS += -fomit-frame-pointer > > + KBUILD_CFLAGS += -fomit-frame-pointer > > endif > > > > ifdef CONFIG_DEBUG_INFO > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > index 97f9a64..4587e66 100644 > > --- a/arch/powerpc/Kconfig > > +++ b/arch/powerpc/Kconfig > > @@ -113,6 +113,7 @@ config PPC > > select HAVE_FUNCTION_TRACER > > select HAVE_FUNCTION_GRAPH_TRACER > > select ARCH_WANT_OPTIONAL_GPIOLIB > > + select ARCH_HAS_NORMAL_FRAME_POINTERS > > select HAVE_IDE > > select HAVE_IOREMAP_PROT > > select HAVE_EFFICIENT_UNALIGNED_ACCESS > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index 4b63b6b..fc8cd1f 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > > This is a relatively cheap check but if you care about maximum > > performance, say N. > > > > -# > > -# Select this config option from the architecture Kconfig, if it > > -# it is preferred to always offer frame pointers as a config > > -# option on the architecture (regardless of KERNEL_DEBUG): > > -# > > config ARCH_WANT_FRAME_POINTERS > > bool > > help > > + Select this config option from the architecture Kconfig, if it > > + it is preferred to always offer frame pointers as a config > > + option on the architecture (regardless of KERNEL_DEBUG). > > + > > +config ARCH_HAS_NORMAL_FRAME_POINTERS > > + bool > > + help > > + Architectures should select this symbol if their ABI implies > > + having a frame pointer. > > > > config FRAME_POINTER > > bool "Compile the kernel with frame pointers" > > depends on DEBUG_KERNEL && \ > > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > > ARCH_WANT_FRAME_POINTERS > > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > > help > -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-03-28 10:48 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-28 10:48 UTC (permalink / raw) To: Steven Rostedt Cc: Benjamin Herrenschmidt, Ingo Molnar, Sam Ravnborg, Paul Mackerras, linuxppc-dev, linux-kernel On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > Ben, > > Can you ACK this patch? Or even take it in your tree? Benjamin, have you had a chance to look into this? Sam, could you also take a look? Thanks! > On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > generate wrong code). > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > Makefile | 7 +++++-- > > arch/powerpc/Kconfig | 1 + > > lib/Kconfig.debug | 16 ++++++++++------ > > 3 files changed, 16 insertions(+), 8 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 46c04c5..bf41b05 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > > endif > > > > ifdef CONFIG_FRAME_POINTER > > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > > + KBUILD_CFLAGS += -fno-omit-frame-pointer > > + endif > > else > > -KBUILD_CFLAGS += -fomit-frame-pointer > > + KBUILD_CFLAGS += -fomit-frame-pointer > > endif > > > > ifdef CONFIG_DEBUG_INFO > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > index 97f9a64..4587e66 100644 > > --- a/arch/powerpc/Kconfig > > +++ b/arch/powerpc/Kconfig > > @@ -113,6 +113,7 @@ config PPC > > select HAVE_FUNCTION_TRACER > > select HAVE_FUNCTION_GRAPH_TRACER > > select ARCH_WANT_OPTIONAL_GPIOLIB > > + select ARCH_HAS_NORMAL_FRAME_POINTERS > > select HAVE_IDE > > select HAVE_IOREMAP_PROT > > select HAVE_EFFICIENT_UNALIGNED_ACCESS > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index 4b63b6b..fc8cd1f 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > > This is a relatively cheap check but if you care about maximum > > performance, say N. > > > > -# > > -# Select this config option from the architecture Kconfig, if it > > -# it is preferred to always offer frame pointers as a config > > -# option on the architecture (regardless of KERNEL_DEBUG): > > -# > > config ARCH_WANT_FRAME_POINTERS > > bool > > help > > + Select this config option from the architecture Kconfig, if it > > + it is preferred to always offer frame pointers as a config > > + option on the architecture (regardless of KERNEL_DEBUG). > > + > > +config ARCH_HAS_NORMAL_FRAME_POINTERS > > + bool > > + help > > + Architectures should select this symbol if their ABI implies > > + having a frame pointer. > > > > config FRAME_POINTER > > bool "Compile the kernel with frame pointers" > > depends on DEBUG_KERNEL && \ > > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > > ARCH_WANT_FRAME_POINTERS > > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > > help > -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-28 10:48 ` Anton Vorontsov @ 2009-03-29 22:54 ` Benjamin Herrenschmidt -1 siblings, 0 replies; 45+ messages in thread From: Benjamin Herrenschmidt @ 2009-03-29 22:54 UTC (permalink / raw) To: avorontsov Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar, Sam Ravnborg On Sat, 2009-03-28 at 13:48 +0300, Anton Vorontsov wrote: > On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > > Ben, > > > > Can you ACK this patch? Or even take it in your tree? > > Benjamin, have you had a chance to look into this? Sam, could > you also take a look? Those patches look ok. I'm a little bit surprised that -mno-sched-epilog isn't needed, gcc weirdness never ceases to amaze me, but the Makefile/Kconfig churning isn't for me to judge. If Sam is happy, then let's merge it. Ben. > Thanks! > > > On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > > generate wrong code). > > > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > > --- > > > Makefile | 7 +++++-- > > > arch/powerpc/Kconfig | 1 + > > > lib/Kconfig.debug | 16 ++++++++++------ > > > 3 files changed, 16 insertions(+), 8 deletions(-) > > > > > > diff --git a/Makefile b/Makefile > > > index 46c04c5..bf41b05 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > > > endif > > > > > > ifdef CONFIG_FRAME_POINTER > > > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > > > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > > > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > > > + KBUILD_CFLAGS += -fno-omit-frame-pointer > > > + endif > > > else > > > -KBUILD_CFLAGS += -fomit-frame-pointer > > > + KBUILD_CFLAGS += -fomit-frame-pointer > > > endif > > > > > > ifdef CONFIG_DEBUG_INFO > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > index 97f9a64..4587e66 100644 > > > --- a/arch/powerpc/Kconfig > > > +++ b/arch/powerpc/Kconfig > > > @@ -113,6 +113,7 @@ config PPC > > > select HAVE_FUNCTION_TRACER > > > select HAVE_FUNCTION_GRAPH_TRACER > > > select ARCH_WANT_OPTIONAL_GPIOLIB > > > + select ARCH_HAS_NORMAL_FRAME_POINTERS > > > select HAVE_IDE > > > select HAVE_IOREMAP_PROT > > > select HAVE_EFFICIENT_UNALIGNED_ACCESS > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > > index 4b63b6b..fc8cd1f 100644 > > > --- a/lib/Kconfig.debug > > > +++ b/lib/Kconfig.debug > > > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > > > This is a relatively cheap check but if you care about maximum > > > performance, say N. > > > > > > -# > > > -# Select this config option from the architecture Kconfig, if it > > > -# it is preferred to always offer frame pointers as a config > > > -# option on the architecture (regardless of KERNEL_DEBUG): > > > -# > > > config ARCH_WANT_FRAME_POINTERS > > > bool > > > help > > > + Select this config option from the architecture Kconfig, if it > > > + it is preferred to always offer frame pointers as a config > > > + option on the architecture (regardless of KERNEL_DEBUG). > > > + > > > +config ARCH_HAS_NORMAL_FRAME_POINTERS > > > + bool > > > + help > > > + Architectures should select this symbol if their ABI implies > > > + having a frame pointer. > > > > > > config FRAME_POINTER > > > bool "Compile the kernel with frame pointers" > > > depends on DEBUG_KERNEL && \ > > > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > > > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > > > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > > > ARCH_WANT_FRAME_POINTERS > > > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > > > help > > > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-03-29 22:54 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 45+ messages in thread From: Benjamin Herrenschmidt @ 2009-03-29 22:54 UTC (permalink / raw) To: avorontsov Cc: Steven Rostedt, Ingo Molnar, Sam Ravnborg, Paul Mackerras, linuxppc-dev, linux-kernel On Sat, 2009-03-28 at 13:48 +0300, Anton Vorontsov wrote: > On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > > Ben, > > > > Can you ACK this patch? Or even take it in your tree? > > Benjamin, have you had a chance to look into this? Sam, could > you also take a look? Those patches look ok. I'm a little bit surprised that -mno-sched-epilog isn't needed, gcc weirdness never ceases to amaze me, but the Makefile/Kconfig churning isn't for me to judge. If Sam is happy, then let's merge it. Ben. > Thanks! > > > On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > > generate wrong code). > > > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > > --- > > > Makefile | 7 +++++-- > > > arch/powerpc/Kconfig | 1 + > > > lib/Kconfig.debug | 16 ++++++++++------ > > > 3 files changed, 16 insertions(+), 8 deletions(-) > > > > > > diff --git a/Makefile b/Makefile > > > index 46c04c5..bf41b05 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > > > endif > > > > > > ifdef CONFIG_FRAME_POINTER > > > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > > > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > > > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > > > + KBUILD_CFLAGS += -fno-omit-frame-pointer > > > + endif > > > else > > > -KBUILD_CFLAGS += -fomit-frame-pointer > > > + KBUILD_CFLAGS += -fomit-frame-pointer > > > endif > > > > > > ifdef CONFIG_DEBUG_INFO > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > index 97f9a64..4587e66 100644 > > > --- a/arch/powerpc/Kconfig > > > +++ b/arch/powerpc/Kconfig > > > @@ -113,6 +113,7 @@ config PPC > > > select HAVE_FUNCTION_TRACER > > > select HAVE_FUNCTION_GRAPH_TRACER > > > select ARCH_WANT_OPTIONAL_GPIOLIB > > > + select ARCH_HAS_NORMAL_FRAME_POINTERS > > > select HAVE_IDE > > > select HAVE_IOREMAP_PROT > > > select HAVE_EFFICIENT_UNALIGNED_ACCESS > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > > index 4b63b6b..fc8cd1f 100644 > > > --- a/lib/Kconfig.debug > > > +++ b/lib/Kconfig.debug > > > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > > > This is a relatively cheap check but if you care about maximum > > > performance, say N. > > > > > > -# > > > -# Select this config option from the architecture Kconfig, if it > > > -# it is preferred to always offer frame pointers as a config > > > -# option on the architecture (regardless of KERNEL_DEBUG): > > > -# > > > config ARCH_WANT_FRAME_POINTERS > > > bool > > > help > > > + Select this config option from the architecture Kconfig, if it > > > + it is preferred to always offer frame pointers as a config > > > + option on the architecture (regardless of KERNEL_DEBUG). > > > + > > > +config ARCH_HAS_NORMAL_FRAME_POINTERS > > > + bool > > > + help > > > + Architectures should select this symbol if their ABI implies > > > + having a frame pointer. > > > > > > config FRAME_POINTER > > > bool "Compile the kernel with frame pointers" > > > depends on DEBUG_KERNEL && \ > > > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > > > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > > > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > > > ARCH_WANT_FRAME_POINTERS > > > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > > > help > > > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-29 22:54 ` Benjamin Herrenschmidt @ 2009-03-30 4:36 ` Sam Ravnborg -1 siblings, 0 replies; 45+ messages in thread From: Sam Ravnborg @ 2009-03-30 4:36 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar On Mon, Mar 30, 2009 at 09:54:50AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2009-03-28 at 13:48 +0300, Anton Vorontsov wrote: > > On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > > > Ben, > > > > > > Can you ACK this patch? Or even take it in your tree? > > > > Benjamin, have you had a chance to look into this? Sam, could > > you also take a look? > > Those patches look ok. I'm a little bit surprised that -mno-sched-epilog > isn't needed, gcc weirdness never ceases to amaze me, but the > Makefile/Kconfig churning isn't for me to judge. If Sam is happy, then > let's merge it. I will take a closer look tonight or tomorrow - as day-time job permits. Sam ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-03-30 4:36 ` Sam Ravnborg 0 siblings, 0 replies; 45+ messages in thread From: Sam Ravnborg @ 2009-03-30 4:36 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: avorontsov, Steven Rostedt, Ingo Molnar, Paul Mackerras, linuxppc-dev, linux-kernel On Mon, Mar 30, 2009 at 09:54:50AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2009-03-28 at 13:48 +0300, Anton Vorontsov wrote: > > On Fri, Mar 20, 2009 at 11:49:29PM -0400, Steven Rostedt wrote: > > > Ben, > > > > > > Can you ACK this patch? Or even take it in your tree? > > > > Benjamin, have you had a chance to look into this? Sam, could > > you also take a look? > > Those patches look ok. I'm a little bit surprised that -mno-sched-epilog > isn't needed, gcc weirdness never ceases to amaze me, but the > Makefile/Kconfig churning isn't for me to judge. If Sam is happy, then > let's merge it. I will take a closer look tonight or tomorrow - as day-time job permits. Sam ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-03-20 16:44 ` Anton Vorontsov @ 2009-04-05 21:07 ` Sam Ravnborg -1 siblings, 0 replies; 45+ messages in thread From: Sam Ravnborg @ 2009-04-05 21:07 UTC (permalink / raw) To: Anton Vorontsov Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar On Fri, Mar 20, 2009 at 07:44:29PM +0300, Anton Vorontsov wrote: > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > When defined, the top level Makefile won't add -fno-omit-frame-pointer > cflag (the flag is useless in PowerPC kernels, and also makes gcc > generate wrong code). > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Hi Anton - sorry for the late feedback. 1) The preferred naming for variables that are supposed to be selcted are "HAVE_xxxx". So in this case it would be: HAVE_NORMAL_FRAME_POINTER 2) I do not really understand the interpretation of normal in this case, can it be more specific? Looking at your patch then if specified we use "-fomit-frame-pointer" in the case where it is set. So I read it like: If arch has normal framepointer then we omit them - strange? 3) Indent in top-level MAkefile for new stuff is generally 8 spaces. Do NOT use tabs as this would confuse make and rener assignmnet non-functional. 4) The individual "HAVE_* members should be sorted alphabetically in the arch Kconfig file (which they seldomly are :-( ) Sam > --- > Makefile | 7 +++++-- > arch/powerpc/Kconfig | 1 + > lib/Kconfig.debug | 16 ++++++++++------ > 3 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 46c04c5..bf41b05 100644 > --- a/Makefile > +++ b/Makefile > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > endif > > ifdef CONFIG_FRAME_POINTER > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > + KBUILD_CFLAGS += -fno-omit-frame-pointer > + endif > else > -KBUILD_CFLAGS += -fomit-frame-pointer > + KBUILD_CFLAGS += -fomit-frame-pointer > endif > > ifdef CONFIG_DEBUG_INFO > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 97f9a64..4587e66 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -113,6 +113,7 @@ config PPC > select HAVE_FUNCTION_TRACER > select HAVE_FUNCTION_GRAPH_TRACER > select ARCH_WANT_OPTIONAL_GPIOLIB > + select ARCH_HAS_NORMAL_FRAME_POINTERS > select HAVE_IDE > select HAVE_IOREMAP_PROT > select HAVE_EFFICIENT_UNALIGNED_ACCESS > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 4b63b6b..fc8cd1f 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > This is a relatively cheap check but if you care about maximum > performance, say N. > > -# > -# Select this config option from the architecture Kconfig, if it > -# it is preferred to always offer frame pointers as a config > -# option on the architecture (regardless of KERNEL_DEBUG): > -# > config ARCH_WANT_FRAME_POINTERS > bool > help > + Select this config option from the architecture Kconfig, if it > + it is preferred to always offer frame pointers as a config > + option on the architecture (regardless of KERNEL_DEBUG). > + > +config ARCH_HAS_NORMAL_FRAME_POINTERS > + bool > + help > + Architectures should select this symbol if their ABI implies > + having a frame pointer. > > config FRAME_POINTER > bool "Compile the kernel with frame pointers" > depends on DEBUG_KERNEL && \ > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > ARCH_WANT_FRAME_POINTERS > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > help > -- > 1.5.6.5 > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-04-05 21:07 ` Sam Ravnborg 0 siblings, 0 replies; 45+ messages in thread From: Sam Ravnborg @ 2009-04-05 21:07 UTC (permalink / raw) To: Anton Vorontsov Cc: Ingo Molnar, Steven Rostedt, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel On Fri, Mar 20, 2009 at 07:44:29PM +0300, Anton Vorontsov wrote: > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > When defined, the top level Makefile won't add -fno-omit-frame-pointer > cflag (the flag is useless in PowerPC kernels, and also makes gcc > generate wrong code). > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Hi Anton - sorry for the late feedback. 1) The preferred naming for variables that are supposed to be selcted are "HAVE_xxxx". So in this case it would be: HAVE_NORMAL_FRAME_POINTER 2) I do not really understand the interpretation of normal in this case, can it be more specific? Looking at your patch then if specified we use "-fomit-frame-pointer" in the case where it is set. So I read it like: If arch has normal framepointer then we omit them - strange? 3) Indent in top-level MAkefile for new stuff is generally 8 spaces. Do NOT use tabs as this would confuse make and rener assignmnet non-functional. 4) The individual "HAVE_* members should be sorted alphabetically in the arch Kconfig file (which they seldomly are :-( ) Sam > --- > Makefile | 7 +++++-- > arch/powerpc/Kconfig | 1 + > lib/Kconfig.debug | 16 ++++++++++------ > 3 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 46c04c5..bf41b05 100644 > --- a/Makefile > +++ b/Makefile > @@ -538,9 +538,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) > endif > > ifdef CONFIG_FRAME_POINTER > -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > + KBUILD_CFLAGS += -fno-optimize-sibling-calls > + ifndef ARCH_HAS_NORMAL_FRAME_POINTERS > + KBUILD_CFLAGS += -fno-omit-frame-pointer > + endif > else > -KBUILD_CFLAGS += -fomit-frame-pointer > + KBUILD_CFLAGS += -fomit-frame-pointer > endif > > ifdef CONFIG_DEBUG_INFO > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 97f9a64..4587e66 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -113,6 +113,7 @@ config PPC > select HAVE_FUNCTION_TRACER > select HAVE_FUNCTION_GRAPH_TRACER > select ARCH_WANT_OPTIONAL_GPIOLIB > + select ARCH_HAS_NORMAL_FRAME_POINTERS > select HAVE_IDE > select HAVE_IOREMAP_PROT > select HAVE_EFFICIENT_UNALIGNED_ACCESS > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 4b63b6b..fc8cd1f 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -661,20 +661,24 @@ config DEBUG_NOTIFIERS > This is a relatively cheap check but if you care about maximum > performance, say N. > > -# > -# Select this config option from the architecture Kconfig, if it > -# it is preferred to always offer frame pointers as a config > -# option on the architecture (regardless of KERNEL_DEBUG): > -# > config ARCH_WANT_FRAME_POINTERS > bool > help > + Select this config option from the architecture Kconfig, if it > + it is preferred to always offer frame pointers as a config > + option on the architecture (regardless of KERNEL_DEBUG). > + > +config ARCH_HAS_NORMAL_FRAME_POINTERS > + bool > + help > + Architectures should select this symbol if their ABI implies > + having a frame pointer. > > config FRAME_POINTER > bool "Compile the kernel with frame pointers" > depends on DEBUG_KERNEL && \ > (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ > - AVR32 || SUPERH || BLACKFIN || MN10300) || \ > + AVR32 || SUPERH || BLACKFIN || MN10300 || PPC) || \ > ARCH_WANT_FRAME_POINTERS > default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS > help > -- > 1.5.6.5 > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-04-05 21:07 ` Sam Ravnborg @ 2009-04-13 15:51 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-04-13 15:51 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar On Sun, 2009-04-05 at 23:07 +0200, Sam Ravnborg wrote: > 4) The individual "HAVE_* members should be sorted alphabetically in the arch > Kconfig file (which they seldomly are :-( ) Note, my first port of Ftrace to PPC sorted the Kconfig HAVE_* macros, which ended up being reverted :-/ http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21222.html As stated, I did the sort without reporting the change in the change-log, which I should have done. -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-04-13 15:51 ` Steven Rostedt 0 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-04-13 15:51 UTC (permalink / raw) To: Sam Ravnborg Cc: Anton Vorontsov, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel On Sun, 2009-04-05 at 23:07 +0200, Sam Ravnborg wrote: > 4) The individual "HAVE_* members should be sorted alphabetically in the arch > Kconfig file (which they seldomly are :-( ) Note, my first port of Ftrace to PPC sorted the Kconfig HAVE_* macros, which ended up being reverted :-/ http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21222.html As stated, I did the sort without reporting the change in the change-log, which I should have done. -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER 2009-04-05 21:07 ` Sam Ravnborg @ 2009-05-02 0:14 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-05-02 0:14 UTC (permalink / raw) To: Sam Ravnborg Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar On Sun, Apr 05, 2009 at 11:07:56PM +0200, Sam Ravnborg wrote: > On Fri, Mar 20, 2009 at 07:44:29PM +0300, Anton Vorontsov wrote: > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > generate wrong code). > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > Hi Anton - sorry for the late feedback. > > 1) The preferred naming for variables that are supposed to be selcted > are "HAVE_xxxx". > So in this case it would be: > HAVE_NORMAL_FRAME_POINTER OK, will rename. > 2) I do not really understand the interpretation of normal in this case, > can it be more specific? Normal means that architecture's ABI implies having a framepointer, we don't need any gcc flags. I'm not sure if we can name it any better, that is what was suggested by Steven and I don't have any better variant. ;-) > Looking at your patch then if specified we use "-fomit-frame-pointer" > in the case where it is set. No. We specify neither -fomit-frame-pointer, nor we specify -fno-omit-frame-pointer (because that flag causes gcc to generate wrong code). > So I read it like: > > If arch has normal framepointer then we omit them - strange? > > 3) Indent in top-level MAkefile for new stuff is generally 8 spaces. > Do NOT use tabs as this would confuse make and rener assignmnet non-functional. > > 4) The individual "HAVE_* members should be sorted alphabetically in the arch > Kconfig file (which they seldomly are :-( ) > > Sam Well, yes. So looking into the Kconfig, I'm quite unsure where to put it to make it alphabetically correct. Ok, let's put it after K. ;-) Thanks! -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER @ 2009-05-02 0:14 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-05-02 0:14 UTC (permalink / raw) To: Sam Ravnborg Cc: Ingo Molnar, Steven Rostedt, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel On Sun, Apr 05, 2009 at 11:07:56PM +0200, Sam Ravnborg wrote: > On Fri, Mar 20, 2009 at 07:44:29PM +0300, Anton Vorontsov wrote: > > This patch introduces ARCH_HAS_NORMAL_FRAME_POINTERS Kconfig symbol. > > When defined, the top level Makefile won't add -fno-omit-frame-pointer > > cflag (the flag is useless in PowerPC kernels, and also makes gcc > > generate wrong code). > > > > Also move ARCH_WANT_FRAME_POINTERS's help text. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > Hi Anton - sorry for the late feedback. > > 1) The preferred naming for variables that are supposed to be selcted > are "HAVE_xxxx". > So in this case it would be: > HAVE_NORMAL_FRAME_POINTER OK, will rename. > 2) I do not really understand the interpretation of normal in this case, > can it be more specific? Normal means that architecture's ABI implies having a framepointer, we don't need any gcc flags. I'm not sure if we can name it any better, that is what was suggested by Steven and I don't have any better variant. ;-) > Looking at your patch then if specified we use "-fomit-frame-pointer" > in the case where it is set. No. We specify neither -fomit-frame-pointer, nor we specify -fno-omit-frame-pointer (because that flag causes gcc to generate wrong code). > So I read it like: > > If arch has normal framepointer then we omit them - strange? > > 3) Indent in top-level MAkefile for new stuff is generally 8 spaces. > Do NOT use tabs as this would confuse make and rener assignmnet non-functional. > > 4) The individual "HAVE_* members should be sorted alphabetically in the arch > Kconfig file (which they seldomly are :-( ) > > Sam Well, yes. So looking into the Kconfig, I'm quite unsure where to put it to make it alphabetically correct. Ok, let's put it after K. ;-) Thanks! -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-20 16:44 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg The workarounds aren't needed any longer since the top level Makefile doesn't pass -fno-omit-frame-pointer cflag for PowerPC. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- arch/powerpc/Makefile | 5 ----- arch/powerpc/kernel/Makefile | 12 ++++++------ arch/powerpc/platforms/powermac/Makefile | 2 +- lib/Kconfig.debug | 6 +++--- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 551fc58..1dd7748 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -120,11 +120,6 @@ ifeq ($(CONFIG_6xx),y) KBUILD_CFLAGS += -mcpu=powerpc endif -# Work around a gcc code-gen bug with -fno-omit-frame-pointer. -ifeq ($(CONFIG_FUNCTION_TRACER),y) -KBUILD_CFLAGS += -mno-sched-epilog -endif - cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index dfec3d2..f86caeb 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -14,14 +14,14 @@ endif ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_cputable.o = -pg +CFLAGS_REMOVE_prom_init.o = -pg +CFLAGS_REMOVE_btext.o = -pg +CFLAGS_REMOVE_prom.o = -pg # do not trace tracer code -CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_ftrace.o = -pg # timers used by tracing -CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_time.o = -pg endif obj-y := cputable.o ptrace.o syscalls.o \ diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 50f1693..0eb8781 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile @@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_bootx_init.o = -pg endif obj-y += pic.o setup.o time.o feature.o pci.o \ diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index fc8cd1f..713620d 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -493,7 +493,7 @@ config LOCKDEP bool depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT select STACKTRACE - select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND + select FRAME_POINTER if !MIPS && !ARM_UNWIND select KALLSYMS select KALLSYMS_ALL @@ -866,13 +866,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !PPC + select FRAME_POINTER help Provide stacktrace filter for fault-injection capabilities config LATENCYTOP bool "Latency measuring infrastructure" - select FRAME_POINTER if !MIPS && !PPC + select FRAME_POINTER if !MIPS select KALLSYMS select KALLSYMS_ALL select STACKTRACE -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds @ 2009-03-20 16:44 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: Steven Rostedt, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel The workarounds aren't needed any longer since the top level Makefile doesn't pass -fno-omit-frame-pointer cflag for PowerPC. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- arch/powerpc/Makefile | 5 ----- arch/powerpc/kernel/Makefile | 12 ++++++------ arch/powerpc/platforms/powermac/Makefile | 2 +- lib/Kconfig.debug | 6 +++--- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 551fc58..1dd7748 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -120,11 +120,6 @@ ifeq ($(CONFIG_6xx),y) KBUILD_CFLAGS += -mcpu=powerpc endif -# Work around a gcc code-gen bug with -fno-omit-frame-pointer. -ifeq ($(CONFIG_FUNCTION_TRACER),y) -KBUILD_CFLAGS += -mno-sched-epilog -endif - cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index dfec3d2..f86caeb 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -14,14 +14,14 @@ endif ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog -CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_cputable.o = -pg +CFLAGS_REMOVE_prom_init.o = -pg +CFLAGS_REMOVE_btext.o = -pg +CFLAGS_REMOVE_prom.o = -pg # do not trace tracer code -CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_ftrace.o = -pg # timers used by tracing -CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_time.o = -pg endif obj-y := cputable.o ptrace.o syscalls.o \ diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 50f1693..0eb8781 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile @@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_bootx_init.o = -pg endif obj-y += pic.o setup.o time.o feature.o pci.o \ diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index fc8cd1f..713620d 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -493,7 +493,7 @@ config LOCKDEP bool depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT select STACKTRACE - select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND + select FRAME_POINTER if !MIPS && !ARM_UNWIND select KALLSYMS select KALLSYMS_ALL @@ -866,13 +866,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !PPC + select FRAME_POINTER help Provide stacktrace filter for fault-injection capabilities config LATENCYTOP bool "Latency measuring infrastructure" - select FRAME_POINTER if !MIPS && !PPC + select FRAME_POINTER if !MIPS select KALLSYMS select KALLSYMS_ALL select STACKTRACE -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-21 3:50 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-03-21 3:50 UTC (permalink / raw) To: Anton Vorontsov, Benjamin Herrenschmidt Cc: linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar, Sam Ravnborg Ben, Can you ACK or take this patch too. Thanks, -- Steve On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > The workarounds aren't needed any longer since the top level Makefile > doesn't pass -fno-omit-frame-pointer cflag for PowerPC. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > arch/powerpc/Makefile | 5 ----- > arch/powerpc/kernel/Makefile | 12 ++++++------ > arch/powerpc/platforms/powermac/Makefile | 2 +- > lib/Kconfig.debug | 6 +++--- > 4 files changed, 10 insertions(+), 15 deletions(-) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 551fc58..1dd7748 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -120,11 +120,6 @@ ifeq ($(CONFIG_6xx),y) > KBUILD_CFLAGS += -mcpu=powerpc > endif > > -# Work around a gcc code-gen bug with -fno-omit-frame-pointer. > -ifeq ($(CONFIG_FUNCTION_TRACER),y) > -KBUILD_CFLAGS += -mno-sched-epilog > -endif > - > cpu-as-$(CONFIG_4xx) += -Wa,-m405 > cpu-as-$(CONFIG_6xx) += -Wa,-maltivec > cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec > diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile > index dfec3d2..f86caeb 100644 > --- a/arch/powerpc/kernel/Makefile > +++ b/arch/powerpc/kernel/Makefile > @@ -14,14 +14,14 @@ endif > > ifdef CONFIG_FUNCTION_TRACER > # Do not trace early boot code > -CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_cputable.o = -pg > +CFLAGS_REMOVE_prom_init.o = -pg > +CFLAGS_REMOVE_btext.o = -pg > +CFLAGS_REMOVE_prom.o = -pg > # do not trace tracer code > -CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_ftrace.o = -pg > # timers used by tracing > -CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_time.o = -pg > endif > > obj-y := cputable.o ptrace.o syscalls.o \ > diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile > index 50f1693..0eb8781 100644 > --- a/arch/powerpc/platforms/powermac/Makefile > +++ b/arch/powerpc/platforms/powermac/Makefile > @@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC > > ifdef CONFIG_FUNCTION_TRACER > # Do not trace early boot code > -CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_bootx_init.o = -pg > endif > > obj-y += pic.o setup.o time.o feature.o pci.o \ > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index fc8cd1f..713620d 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -493,7 +493,7 @@ config LOCKDEP > bool > depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT > select STACKTRACE > - select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND > + select FRAME_POINTER if !MIPS && !ARM_UNWIND > select KALLSYMS > select KALLSYMS_ALL > > @@ -866,13 +866,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER > depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT > depends on !X86_64 > select STACKTRACE > - select FRAME_POINTER if !PPC > + select FRAME_POINTER > help > Provide stacktrace filter for fault-injection capabilities > > config LATENCYTOP > bool "Latency measuring infrastructure" > - select FRAME_POINTER if !MIPS && !PPC > + select FRAME_POINTER if !MIPS > select KALLSYMS > select KALLSYMS_ALL > select STACKTRACE ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds @ 2009-03-21 3:50 ` Steven Rostedt 0 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-03-21 3:50 UTC (permalink / raw) To: Anton Vorontsov, Benjamin Herrenschmidt Cc: Ingo Molnar, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel Ben, Can you ACK or take this patch too. Thanks, -- Steve On Fri, 2009-03-20 at 19:44 +0300, Anton Vorontsov wrote: > The workarounds aren't needed any longer since the top level Makefile > doesn't pass -fno-omit-frame-pointer cflag for PowerPC. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > arch/powerpc/Makefile | 5 ----- > arch/powerpc/kernel/Makefile | 12 ++++++------ > arch/powerpc/platforms/powermac/Makefile | 2 +- > lib/Kconfig.debug | 6 +++--- > 4 files changed, 10 insertions(+), 15 deletions(-) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 551fc58..1dd7748 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -120,11 +120,6 @@ ifeq ($(CONFIG_6xx),y) > KBUILD_CFLAGS += -mcpu=powerpc > endif > > -# Work around a gcc code-gen bug with -fno-omit-frame-pointer. > -ifeq ($(CONFIG_FUNCTION_TRACER),y) > -KBUILD_CFLAGS += -mno-sched-epilog > -endif > - > cpu-as-$(CONFIG_4xx) += -Wa,-m405 > cpu-as-$(CONFIG_6xx) += -Wa,-maltivec > cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec > diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile > index dfec3d2..f86caeb 100644 > --- a/arch/powerpc/kernel/Makefile > +++ b/arch/powerpc/kernel/Makefile > @@ -14,14 +14,14 @@ endif > > ifdef CONFIG_FUNCTION_TRACER > # Do not trace early boot code > -CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog > -CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_cputable.o = -pg > +CFLAGS_REMOVE_prom_init.o = -pg > +CFLAGS_REMOVE_btext.o = -pg > +CFLAGS_REMOVE_prom.o = -pg > # do not trace tracer code > -CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_ftrace.o = -pg > # timers used by tracing > -CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_time.o = -pg > endif > > obj-y := cputable.o ptrace.o syscalls.o \ > diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile > index 50f1693..0eb8781 100644 > --- a/arch/powerpc/platforms/powermac/Makefile > +++ b/arch/powerpc/platforms/powermac/Makefile > @@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC > > ifdef CONFIG_FUNCTION_TRACER > # Do not trace early boot code > -CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog > +CFLAGS_REMOVE_bootx_init.o = -pg > endif > > obj-y += pic.o setup.o time.o feature.o pci.o \ > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index fc8cd1f..713620d 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -493,7 +493,7 @@ config LOCKDEP > bool > depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT > select STACKTRACE > - select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND > + select FRAME_POINTER if !MIPS && !ARM_UNWIND > select KALLSYMS > select KALLSYMS_ALL > > @@ -866,13 +866,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER > depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT > depends on !X86_64 > select STACKTRACE > - select FRAME_POINTER if !PPC > + select FRAME_POINTER > help > Provide stacktrace filter for fault-injection capabilities > > config LATENCYTOP > bool "Latency measuring infrastructure" > - select FRAME_POINTER if !MIPS && !PPC > + select FRAME_POINTER if !MIPS > select KALLSYMS > select KALLSYMS_ALL > select STACKTRACE ^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-20 16:44 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 774aba7..9fc98a7 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -107,6 +107,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -128,6 +129,7 @@ config PREEMPT_TRACER depends on PREEMPT select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -156,6 +158,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-03-20 16:44 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:44 UTC (permalink / raw) To: Ingo Molnar Cc: Steven Rostedt, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 774aba7..9fc98a7 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -107,6 +107,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -128,6 +129,7 @@ config PREEMPT_TRACER depends on PREEMPT select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -156,6 +158,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC 2009-03-20 16:44 ` Anton Vorontsov @ 2009-03-20 16:52 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:52 UTC (permalink / raw) To: Ingo Molnar Cc: linuxppc-dev, Steven Rostedt, Paul Mackerras, linux-kernel, Sam Ravnborg On Fri, Mar 20, 2009 at 07:44:04PM +0300, Anton Vorontsov wrote: > Hi all, > > Here is another approach to fixing tracers vs. CALLER_ADDR problem > on PowerPC. > > Preface for those who don't know or forgot what the problem is: > > Gcc frame pointers do nothing useful on PowerPC (they're harmful, > actually), and thus lib/Kconfig.debug makes CONFIG_FRAME_POINTER > unselectable on PPC targets, but CALLER_ADDR macros are available > only with CONFIG_FRAME_POINTER, therefore tracing is completely > useless on PowerPC: > > [...] > <idle>-0 0X.h3 2us+: 0:140:R + [000] 1733:120:S mvtsd > <idle>-0 0X.h3 9us+: 0 (0) > <idle>-0 0X..3 72us : 0 (0) > <idle>-0 0X..3 73us : 0:140:R ==> [000] 1733:120:R mvtsd > > While it should look like this: > > [...] > <idle>-0 0X.h3 2us+: 0:140:R + [000] 1740:120:S mvtsd > <idle>-0 0X.h3 9us+: hrtimer_wakeup (__run_hrtimer) > <idle>-0 0X..3 87us : cpu_idle (__got2_end) > <idle>-0 0X..3 89us : 0:140:R ==> [000] 1740:120:R mvtsd > > I've tried to fix the issue via expanding the #ifdef in the ftrace.h: > http://lkml.org/lkml/2009/1/31/141 > > Then Steven Rostedt suggested to implement something more generic, > i.e. HAVE_NORMAL_FRAME_POINTERS Kconfig symbol. > > I found a way to solve the problem w/o additional symbols, but > with some Makefile magic (http://lkml.org/lkml/2009/2/4/273). > But because of top-level Makefile issues on other arches > (http://lkml.org/lkml/2009/2/14/89) I had to abandon the approach. Oh, and btw, I'm aware of commit c79a61f55773d2519fd0525bf58385f7d20752d3 Author: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Date: Fri Feb 27 21:30:03 2009 +0100 tracing: make CALLER_ADDRx overwriteable But I think the patch set is still applicable, considering that it removes gcc bug workaround in a nice way, and makes CONFIG_FRAME_POINTER available on PowerPC, thus other code can rely on that. If not, I can just fill-in the asm/ftrace.h for PowerPC. Thanks, -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC @ 2009-03-20 16:52 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-03-20 16:52 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg On Fri, Mar 20, 2009 at 07:44:04PM +0300, Anton Vorontsov wrote: > Hi all, > > Here is another approach to fixing tracers vs. CALLER_ADDR problem > on PowerPC. > > Preface for those who don't know or forgot what the problem is: > > Gcc frame pointers do nothing useful on PowerPC (they're harmful, > actually), and thus lib/Kconfig.debug makes CONFIG_FRAME_POINTER > unselectable on PPC targets, but CALLER_ADDR macros are available > only with CONFIG_FRAME_POINTER, therefore tracing is completely > useless on PowerPC: > > [...] > <idle>-0 0X.h3 2us+: 0:140:R + [000] 1733:120:S mvtsd > <idle>-0 0X.h3 9us+: 0 (0) > <idle>-0 0X..3 72us : 0 (0) > <idle>-0 0X..3 73us : 0:140:R ==> [000] 1733:120:R mvtsd > > While it should look like this: > > [...] > <idle>-0 0X.h3 2us+: 0:140:R + [000] 1740:120:S mvtsd > <idle>-0 0X.h3 9us+: hrtimer_wakeup (__run_hrtimer) > <idle>-0 0X..3 87us : cpu_idle (__got2_end) > <idle>-0 0X..3 89us : 0:140:R ==> [000] 1740:120:R mvtsd > > I've tried to fix the issue via expanding the #ifdef in the ftrace.h: > http://lkml.org/lkml/2009/1/31/141 > > Then Steven Rostedt suggested to implement something more generic, > i.e. HAVE_NORMAL_FRAME_POINTERS Kconfig symbol. > > I found a way to solve the problem w/o additional symbols, but > with some Makefile magic (http://lkml.org/lkml/2009/2/4/273). > But because of top-level Makefile issues on other arches > (http://lkml.org/lkml/2009/2/14/89) I had to abandon the approach. Oh, and btw, I'm aware of commit c79a61f55773d2519fd0525bf58385f7d20752d3 Author: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Date: Fri Feb 27 21:30:03 2009 +0100 tracing: make CALLER_ADDRx overwriteable But I think the patch set is still applicable, considering that it removes gcc bug workaround in a nice way, and makes CONFIG_FRAME_POINTER available on PowerPC, thus other code can rely on that. If not, I can just fill-in the asm/ftrace.h for PowerPC. Thanks, -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH v5 0/3] Tracers vs. CALLER_ADDR on PowerPC
@ 2009-05-02 0:13 Anton Vorontsov
2009-05-02 0:14 ` Anton Vorontsov
0 siblings, 1 reply; 45+ messages in thread
From: Anton Vorontsov @ 2009-05-02 0:13 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras,
Sam Ravnborg
Hi all,
In v5 there are few fixes suggested by Sam Ravnborg:
- Use 8 spaces for indentation in Makefile;
- Rename ARCH_HAS_NORMAL_FRAME_POINTERS to HAVE_NORMAL_FRAME_POINTER;
Thanks,
---
Preface for those who don't know or forgot what the problem is:
Gcc frame pointers do nothing useful on PowerPC (they're harmful,
actually), and thus lib/Kconfig.debug makes CONFIG_FRAME_POINTER
unselectable on PPC targets, but CALLER_ADDR macros are available
only with CONFIG_FRAME_POINTER, therefore tracing is completely
useless on PowerPC:
[...]
<idle>-0 0X.h3 2us+: 0:140:R + [000] 1733:120:S mvtsd
<idle>-0 0X.h3 9us+: 0 (0)
<idle>-0 0X..3 72us : 0 (0)
<idle>-0 0X..3 73us : 0:140:R ==> [000] 1733:120:R mvtsd
While it should look like this:
[...]
<idle>-0 0X.h3 2us+: 0:140:R + [000] 1740:120:S mvtsd
<idle>-0 0X.h3 9us+: hrtimer_wakeup (__run_hrtimer)
<idle>-0 0X..3 87us : cpu_idle (__got2_end)
<idle>-0 0X..3 89us : 0:140:R ==> [000] 1740:120:R mvtsd
I've tried to fix the issue via expanding the #ifdef in the ftrace.h:
http://lkml.org/lkml/2009/1/31/141
Then Steven Rostedt suggested to implement something more generic,
i.e. HAVE_NORMAL_FRAME_POINTERS Kconfig symbol.
I found a way to solve the problem w/o additional symbols, but
with some Makefile magic (http://lkml.org/lkml/2009/2/4/273).
But because of top-level Makefile issues on other arches
(http://lkml.org/lkml/2009/2/14/89) I had to abandon the approach.
So, this patch set combines Steven Rostedt's idea and a small
Makefile change, so that now only top-level Makefile has to know
about the new symbol, and the rest of the kernel can stay with
using CONFIG_FRAME_POINTER.
I'm aware of
commit c79a61f55773d2519fd0525bf58385f7d20752d3
Author: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Date: Fri Feb 27 21:30:03 2009 +0100
tracing: make CALLER_ADDRx overwriteable
But I think the patch set is still applicable, considering that
it removes gcc bug workaround in a nice way, and makes
CONFIG_FRAME_POINTER available on PowerPC, thus other code
can rely on that.
If not, I can just fill-in the asm/ftrace.h for PowerPC.
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 45+ messages in thread* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-05-02 0:13 [PATCH v5 " Anton Vorontsov @ 2009-05-02 0:14 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-05-02 0:14 UTC (permalink / raw) To: Ingo Molnar Cc: linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Sam Ravnborg Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 450d3c2..ad44791 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -122,6 +122,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -143,6 +144,7 @@ config PREEMPT_TRACER depends on PREEMPT select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -171,6 +173,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.6.2.2 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-05-02 0:14 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-05-02 0:14 UTC (permalink / raw) To: Ingo Molnar Cc: Steven Rostedt, Sam Ravnborg, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 450d3c2..ad44791 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -122,6 +122,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -143,6 +144,7 @@ config PREEMPT_TRACER depends on PREEMPT select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -171,6 +173,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.6.2.2 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH v2] ftrace: On PowerPC we don't need frame pointers for CALLER_ADDRs
@ 2009-02-04 15:07 Anton Vorontsov
2009-02-04 15:08 ` Anton Vorontsov
0 siblings, 1 reply; 45+ messages in thread
From: Anton Vorontsov @ 2009-02-04 15:07 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Steven Rostedt, Paul Mackerras, linux-kernel, linuxppc-dev
On Tue, Feb 03, 2009 at 07:19:55PM +0300, Anton Vorontsov wrote:
> On Tue, Feb 03, 2009 at 05:06:45PM +0100, Ingo Molnar wrote:
> >
> > * Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> >
> > > According to this discussion:
> > >
> > > http://lkml.org/lkml/2008/7/25/338
> > > http://lkml.org/lkml/2008/7/26/72
> > >
> > > Frame pointers do nothing useful on PowerPC, so lib/Kconfig.debug
> > > makes CONFIG_FRAME_POINTER unselectable on PPC targets. But ftrace.h
> > > requires CONFIG_FRAME_POINTER for CALLER_ADDR macros. [...]
> >
> > hm, why not add PPC to FRAME_POINTERS list of architectures, and select it
> > from the powerpc arch Kconfig? Does that cause complications somewhere?
>
> -fno-omit-frame-pointers makes the code worse w/o any actual
> benefit that we would use. Plus, there is a long standing bug in
> gcc that makes -fno-omit-frame-pointer generate wrong code for PPC
> targets:
>
> http://lkml.org/lkml/2008/9/2/25
>
> That is, the only tracer that needs[1] -fno-omit-frame-pointer is
> "FUNCTION_TRCER", but we workaround the issue via -mno-sched-epilog,
> quoting arch/powerpc/Makefile:
>
> # Work around a gcc code-gen bug with -fno-omit-frame-pointer.
> ifeq ($(CONFIG_FUNCTION_TRACER),y)
> KBUILD_CFLAGS += -mno-sched-epilog
> endif
Thinking about it more... we can workaround the bug the other way,
and then permit CONFIG_FRAME_POINTER on PowerPC.
Patches are coming...
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 45+ messages in thread* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:07 [PATCH v2] ftrace: On PowerPC we don't need frame pointers for CALLER_ADDRs Anton Vorontsov @ 2009-02-04 15:08 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-02-04 15:08 UTC (permalink / raw) To: Steven Rostedt, Ingo Molnar Cc: linux-rt-users, Paul Mackerras, linux-kernel, linuxppc-dev Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index e2a4ff6..48f7a37 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -86,6 +86,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -108,6 +109,7 @@ config PREEMPT_TRACER depends on DEBUG_KERNEL select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -136,6 +138,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:08 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-02-04 15:08 UTC (permalink / raw) To: Steven Rostedt, Ingo Molnar Cc: Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they should select FRAME_POINTER. Otherwise traces are meaningless. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- kernel/trace/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index e2a4ff6..48f7a37 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -86,6 +86,7 @@ config IRQSOFF_TRACER select TRACE_IRQFLAGS select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in irqs-off critical sections, with microsecond accuracy. @@ -108,6 +109,7 @@ config PREEMPT_TRACER depends on DEBUG_KERNEL select TRACING select TRACER_MAX_TRACE + select FRAME_POINTER help This option measures the time spent in preemption off critical sections, with microsecond accuracy. @@ -136,6 +138,7 @@ config SCHED_TRACER select TRACING select CONTEXT_SWITCH_TRACER select TRACER_MAX_TRACE + select FRAME_POINTER help This tracer tracks the latency of the highest priority task to be scheduled in, starting from the point it has woken up. -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:08 ` Anton Vorontsov (?) @ 2009-02-04 15:26 ` Frédéric Weisbecker -1 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 15:26 UTC (permalink / raw) To: Anton Vorontsov Cc: linux-rt-users, linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > should select FRAME_POINTER. Otherwise traces are meaningless. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > kernel/trace/Kconfig | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > index e2a4ff6..48f7a37 100644 > --- a/kernel/trace/Kconfig > +++ b/kernel/trace/Kconfig > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > select TRACE_IRQFLAGS > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in irqs-off critical > sections, with microsecond accuracy. > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > depends on DEBUG_KERNEL > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in preemption off critical > sections, with microsecond accuracy. > @@ -136,6 +138,7 @@ config SCHED_TRACER > select TRACING > select CONTEXT_SWITCH_TRACER > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This tracer tracks the latency of the highest priority task > to be scheduled in, starting from the point it has woken up. > -- Looks right. BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? I guess it would only work with the first caller builtin_return_address(0) ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:26 ` Frédéric Weisbecker 0 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 15:26 UTC (permalink / raw) To: Anton Vorontsov Cc: Steven Rostedt, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > should select FRAME_POINTER. Otherwise traces are meaningless. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > kernel/trace/Kconfig | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > index e2a4ff6..48f7a37 100644 > --- a/kernel/trace/Kconfig > +++ b/kernel/trace/Kconfig > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > select TRACE_IRQFLAGS > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in irqs-off critical > sections, with microsecond accuracy. > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > depends on DEBUG_KERNEL > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in preemption off critical > sections, with microsecond accuracy. > @@ -136,6 +138,7 @@ config SCHED_TRACER > select TRACING > select CONTEXT_SWITCH_TRACER > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This tracer tracks the latency of the highest priority task > to be scheduled in, starting from the point it has woken up. > -- Looks right. BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? I guess it would only work with the first caller builtin_return_address(0) ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:26 ` Frédéric Weisbecker 0 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 15:26 UTC (permalink / raw) To: Anton Vorontsov Cc: Steven Rostedt, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > should select FRAME_POINTER. Otherwise traces are meaningless. > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > --- > kernel/trace/Kconfig | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > index e2a4ff6..48f7a37 100644 > --- a/kernel/trace/Kconfig > +++ b/kernel/trace/Kconfig > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > select TRACE_IRQFLAGS > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in irqs-off critical > sections, with microsecond accuracy. > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > depends on DEBUG_KERNEL > select TRACING > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This option measures the time spent in preemption off critical > sections, with microsecond accuracy. > @@ -136,6 +138,7 @@ config SCHED_TRACER > select TRACING > select CONTEXT_SWITCH_TRACER > select TRACER_MAX_TRACE > + select FRAME_POINTER > help > This tracer tracks the latency of the highest priority task > to be scheduled in, starting from the point it has woken up. > -- Looks right. BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? I guess it would only work with the first caller builtin_return_address(0) ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:26 ` Frédéric Weisbecker (?) (?) @ 2009-02-04 15:31 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Anton Vorontsov, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:26 ` Frédéric Weisbecker (?) @ 2009-02-04 15:31 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: linux-rt-users, linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:31 ` Steven Rostedt 0 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Anton Vorontsov, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:31 ` Steven Rostedt 0 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Anton Vorontsov, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >>From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:26 ` Frédéric Weisbecker ` (3 preceding siblings ...) (?) @ 2009-02-04 15:31 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Anton Vorontsov, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:26 ` Frédéric Weisbecker ` (4 preceding siblings ...) (?) @ 2009-02-04 15:31 ` Steven Rostedt -1 siblings, 0 replies; 45+ messages in thread From: Steven Rostedt @ 2009-02-04 15:31 UTC (permalink / raw) To: Frédéric Weisbecker Cc: linux-rt-users, linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar On Wed, 2009-02-04 at 16:26 +0100, Frédéric Weisbecker wrote: > 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > > Irqsoff, switch and preempt tracers use CALLER_ADDR macros, so they > > should select FRAME_POINTER. Otherwise traces are meaningless. > > > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> > > --- > > kernel/trace/Kconfig | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > > index e2a4ff6..48f7a37 100644 > > --- a/kernel/trace/Kconfig > > +++ b/kernel/trace/Kconfig > > @@ -86,6 +86,7 @@ config IRQSOFF_TRACER > > select TRACE_IRQFLAGS > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in irqs-off critical > > sections, with microsecond accuracy. > > @@ -108,6 +109,7 @@ config PREEMPT_TRACER > > depends on DEBUG_KERNEL > > select TRACING > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This option measures the time spent in preemption off critical > > sections, with microsecond accuracy. > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) >From ftrace.h: #ifdef CONFIG_FRAME_POINTER /* TODO: need to fix this for ARM */ # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) #else # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) # define CALLER_ADDR1 0UL # define CALLER_ADDR2 0UL # define CALLER_ADDR3 0UL # define CALLER_ADDR4 0UL # define CALLER_ADDR5 0UL # define CALLER_ADDR6 0UL #endif Yep! -- Steve _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:26 ` Frédéric Weisbecker (?) @ 2009-02-04 15:36 ` Anton Vorontsov -1 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-02-04 15:36 UTC (permalink / raw) To: Frédéric Weisbecker Cc: linux-rt-users, linux-kernel, linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar On Wed, Feb 04, 2009 at 04:26:15PM +0100, Frédéric Weisbecker wrote: [...] > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) It depends on the architecture. On PowerPC we always have frame pointers, thus __builtin_return_address(1..) will always work. On x86 it won't work that way. Thanks, -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:36 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-02-04 15:36 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Steven Rostedt, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, Feb 04, 2009 at 04:26:15PM +0100, Frédéric Weisbecker wrote: [...] > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) It depends on the architecture. On PowerPC we always have frame pointers, thus __builtin_return_address(1..) will always work. On x86 it won't work that way. Thanks, -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 15:36 ` Anton Vorontsov 0 siblings, 0 replies; 45+ messages in thread From: Anton Vorontsov @ 2009-02-04 15:36 UTC (permalink / raw) To: Frédéric Weisbecker Cc: Steven Rostedt, Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users On Wed, Feb 04, 2009 at 04:26:15PM +0100, Frédéric Weisbecker wrote: [...] > > @@ -136,6 +138,7 @@ config SCHED_TRACER > > select TRACING > > select CONTEXT_SWITCH_TRACER > > select TRACER_MAX_TRACE > > + select FRAME_POINTER > > help > > This tracer tracks the latency of the highest priority task > > to be scheduled in, starting from the point it has woken up. > > -- > > > Looks right. > > BTW, how behaves builtin_return_address in case of !FRAME_POINTERS ? > I guess it would only work with the first caller builtin_return_address(0) It depends on the architecture. On PowerPC we always have frame pointers, thus __builtin_return_address(1..) will always work. On x86 it won't work that way. Thanks, -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER 2009-02-04 15:36 ` Anton Vorontsov (?) @ 2009-02-04 16:50 ` Frédéric Weisbecker -1 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 16:50 UTC (permalink / raw) To: avorontsov, Steven Rostedt Cc: linux-rt-users, linux-kernel, linuxppc-dev, Paul Mackerras, Ingo Molnar 2009/2/4 Steven Rostedt <srostedt@redhat.com>: > > >From ftrace.h: > > #ifdef CONFIG_FRAME_POINTER > /* TODO: need to fix this for ARM */ > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) > # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) > # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) > # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) > # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) > # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) > #else > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 0UL > # define CALLER_ADDR2 0UL > # define CALLER_ADDR3 0UL > # define CALLER_ADDR4 0UL > # define CALLER_ADDR5 0UL > # define CALLER_ADDR6 0UL > #endif > > Yep! > Ok. 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > It depends on the architecture. On PowerPC we always have frame pointers, > thus __builtin_return_address(1..) will always work. On x86 it won't work > that way. > > Thanks, > > -- > Anton Vorontsov Thanks for your answers! ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 16:50 ` Frédéric Weisbecker 0 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 16:50 UTC (permalink / raw) To: avorontsov, Steven Rostedt Cc: Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users 2009/2/4 Steven Rostedt <srostedt@redhat.com>: > > >From ftrace.h: > > #ifdef CONFIG_FRAME_POINTER > /* TODO: need to fix this for ARM */ > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) > # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) > # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) > # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) > # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) > # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) > #else > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 0UL > # define CALLER_ADDR2 0UL > # define CALLER_ADDR3 0UL > # define CALLER_ADDR4 0UL > # define CALLER_ADDR5 0UL > # define CALLER_ADDR6 0UL > #endif > > Yep! > Ok. 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > It depends on the architecture. On PowerPC we always have frame pointers, > thus __builtin_return_address(1..) will always work. On x86 it won't work > that way. > > Thanks, > > -- > Anton Vorontsov Thanks for your answers! ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER @ 2009-02-04 16:50 ` Frédéric Weisbecker 0 siblings, 0 replies; 45+ messages in thread From: Frédéric Weisbecker @ 2009-02-04 16:50 UTC (permalink / raw) To: avorontsov, Steven Rostedt Cc: Ingo Molnar, Paul Mackerras, Benjamin Herrenschmidt, linuxppc-dev, linux-kernel, linux-rt-users 2009/2/4 Steven Rostedt <srostedt@redhat.com>: > > >From ftrace.h: > > #ifdef CONFIG_FRAME_POINTER > /* TODO: need to fix this for ARM */ > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1)) > # define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2)) > # define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3)) > # define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4)) > # define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5)) > # define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6)) > #else > # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) > # define CALLER_ADDR1 0UL > # define CALLER_ADDR2 0UL > # define CALLER_ADDR3 0UL > # define CALLER_ADDR4 0UL > # define CALLER_ADDR5 0UL > # define CALLER_ADDR6 0UL > #endif > > Yep! > Ok. 2009/2/4 Anton Vorontsov <avorontsov@ru.mvista.com>: > It depends on the architecture. On PowerPC we always have frame pointers, > thus __builtin_return_address(1..) will always work. On x86 it won't work > that way. > > Thanks, > > -- > Anton Vorontsov Thanks for your answers! ^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2009-05-02 0:15 UTC | newest] Thread overview: 45+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-20 16:44 [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC Anton Vorontsov 2009-03-20 16:44 ` Anton Vorontsov 2009-03-20 16:44 ` [PATCH 1/3] powerpc, Makefile: Make it possible to safely select CONFIG_FRAME_POINTER Anton Vorontsov 2009-03-20 16:44 ` Anton Vorontsov 2009-03-21 3:49 ` Steven Rostedt 2009-03-21 3:49 ` Steven Rostedt 2009-03-28 10:48 ` Anton Vorontsov 2009-03-28 10:48 ` Anton Vorontsov 2009-03-29 22:54 ` Benjamin Herrenschmidt 2009-03-29 22:54 ` Benjamin Herrenschmidt 2009-03-30 4:36 ` Sam Ravnborg 2009-03-30 4:36 ` Sam Ravnborg 2009-04-05 21:07 ` Sam Ravnborg 2009-04-05 21:07 ` Sam Ravnborg 2009-04-13 15:51 ` Steven Rostedt 2009-04-13 15:51 ` Steven Rostedt 2009-05-02 0:14 ` Anton Vorontsov 2009-05-02 0:14 ` Anton Vorontsov 2009-03-20 16:44 ` [PATCH 2/3] powerpc: Remove -fno-omit-frame-pointer workarounds Anton Vorontsov 2009-03-20 16:44 ` Anton Vorontsov 2009-03-21 3:50 ` Steven Rostedt 2009-03-21 3:50 ` Steven Rostedt 2009-03-20 16:44 ` [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER Anton Vorontsov 2009-03-20 16:44 ` Anton Vorontsov 2009-03-20 16:52 ` [PATCH v4 0/3] Tracers vs. CALLER_ADDR on PowerPC Anton Vorontsov 2009-03-20 16:52 ` Anton Vorontsov -- strict thread matches above, loose matches on Subject: below -- 2009-05-02 0:13 [PATCH v5 " Anton Vorontsov 2009-05-02 0:14 ` [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER Anton Vorontsov 2009-05-02 0:14 ` Anton Vorontsov 2009-02-04 15:07 [PATCH v2] ftrace: On PowerPC we don't need frame pointers for CALLER_ADDRs Anton Vorontsov 2009-02-04 15:08 ` [PATCH 3/3] tracing: Tracers that use CALLER_ADDR macros should select FRAME_POINTER Anton Vorontsov 2009-02-04 15:08 ` Anton Vorontsov 2009-02-04 15:26 ` Frédéric Weisbecker 2009-02-04 15:26 ` Frédéric Weisbecker 2009-02-04 15:26 ` Frédéric Weisbecker 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:31 ` Steven Rostedt 2009-02-04 15:36 ` Anton Vorontsov 2009-02-04 15:36 ` Anton Vorontsov 2009-02-04 15:36 ` Anton Vorontsov 2009-02-04 16:50 ` Frédéric Weisbecker 2009-02-04 16:50 ` Frédéric Weisbecker 2009-02-04 16:50 ` Frédéric Weisbecker
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.