Skip to content

Commit

Permalink
Merge branch 'optimization/kernel'
Browse files Browse the repository at this point in the history
  • Loading branch information
anvol committed Jul 13, 2014
2 parents cce6258 + 52dfaff commit 2cb7d86
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -585,18 +585,18 @@ endif
# Use make W=1 to enable this warning (see scripts/Makefile.build)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)

ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
#ifdef CONFIG_FRAME_POINTER
#KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
#else
# Some targets (ARM with Thumb2, for example), can't be built with frame
# pointers. For those, we don't have FUNCTION_TRACER automatically
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
# -fomit-frame-pointer with FUNCTION_TRACER.
ifndef CONFIG_FUNCTION_TRACER
#ifndef CONFIG_FUNCTION_TRACER
KBUILD_CFLAGS += -fomit-frame-pointer
endif
endif
#endif
#endif

ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ config ARM_UNWIND
config OLD_MCOUNT
bool
depends on FUNCTION_TRACER && FRAME_POINTER
default y
default n

config DEBUG_USER
bool "Verbose user fault messages"
Expand Down
6 changes: 1 addition & 5 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ ifeq ($(CONFIG_MMU),)
MMUEXT := -nommu
endif

ifeq ($(CONFIG_FRAME_POINTER),y)
KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
endif

ifeq ($(CONFIG_CC_STACKPROTECTOR),y)
KBUILD_CFLAGS +=-fstack-protector
endif
Expand All @@ -57,7 +53,7 @@ comma = ,
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-mcpu=cortex-a15,-march=armv7-a)
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
# always available in ARMv7
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ config PERSISTENT_TRACER
depends on HAVE_FUNCTION_TRACER
select FUNCTION_TRACER
select ANDROID_PERSISTENT_RAM
default n
help
persistent_trace traces function calls into a persistent ram
buffer that can be decoded and dumped after reboot through
Expand Down
9 changes: 0 additions & 9 deletions kernel/sched/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_clock.o = -pg
endif

ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
# According to Alan Modra <[email protected]>, the -fno-omit-frame-pointer is
# needed for x86 only. Why this used to be enabled for all architectures is beyond
# me. I suspect most platforms don't need this, but until we know that for sure
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
endif

obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o
obj-$(CONFIG_SMP) += cpupri.o
obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
Expand Down
4 changes: 3 additions & 1 deletion kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ config FUNCTION_TRACER
select KALLSYMS
select GENERIC_TRACER
select CONTEXT_SWITCH_TRACER
default n
help
Enable the kernel to trace every kernel function. This is done
by using a compiler feature to insert a small, 5-byte No-Operation
Expand Down Expand Up @@ -325,6 +326,7 @@ config STACK_TRACER
select FUNCTION_TRACER
select STACKTRACE
select KALLSYMS
default n
help
This special tracer records the maximum stack footprint of the
kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
Expand Down Expand Up @@ -389,7 +391,7 @@ config DYNAMIC_FTRACE
bool "enable/disable ftrace tracepoints dynamically"
depends on FUNCTION_TRACER
depends on HAVE_DYNAMIC_FTRACE
default y
default n
help
This option will modify all the calls to ftrace dynamically
(will patch them out of the binary image and replace them
Expand Down

0 comments on commit 2cb7d86

Please sign in to comment.