mk: remove -fno-omit-frame-pointer for release builds

This can make profiling more challenging, but should not
affect debugging since we still have unwind tables.

Keep the C_OPT in COMMON_CFLAGS to allow a way to
still add compile flags, even though C_OPT is now
not set by default.

This results in a 11% performance improvement on
a bdevperf microbenchmark using null bdevs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If16fef6e94a73dfca6c10d3b7f158a12dfc70b53

Reviewed-on: https://review.gerrithub.io/393823
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2018-01-05 11:26:19 -07:00
parent 61ba62bdae
commit 5b9b47fae5

View File

@ -37,7 +37,6 @@ include $(SPDK_ROOT_DIR)/CONFIG
-include $(SPDK_ROOT_DIR)/mk/cc.mk
C_OPT ?= -fno-omit-frame-pointer
ifneq ($(V),1)
Q ?= @
endif
@ -121,7 +120,7 @@ COMMON_CFLAGS += -I$(CONFIG_NVML_DIR)/src/include
endif
ifeq ($(CONFIG_DEBUG), y)
COMMON_CFLAGS += -DDEBUG -O0
COMMON_CFLAGS += -DDEBUG -O0 -fno-omit-frame-pointer
else
COMMON_CFLAGS += -DNDEBUG -O2
# Enable _FORTIFY_SOURCE checks - these only work when optimizations are enabled.