Commit 5b9b47fa authored by Jim Harris's avatar Jim Harris
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: If16fef6e94a73dfca6c10d3b7f158a12dfc70b53

Reviewed-on: https://review.gerrithub.io/393823


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 61ba62bd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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.