Unverified Commit fc3a68d8 authored by judeng's avatar judeng Committed by GitHub
Browse files

add -fno-omit-frame-pointer to default complication flags (#12973)

Currently redis uses O3 level optimization would remove the frame pointer
in the target bin.

In the very old past, when gcc optimized at O1 and above levels, the
frame pointer is deleted by default to improve performance. This saves
the RBP registers and reduces the pop/push instructions. But it makes it
difficult for us to observe the running status of the program. For
example, the perf tool cannot be used effectively, especially the modern
eBPF tools such as bcc/memleak.
parent 6df42df2
......@@ -25,6 +25,9 @@ ifeq ($(OPTIMIZATION),-O3)
endif
REDIS_LDFLAGS+=-O3 -flto
endif
ifneq ($(OPTIMIZATION),-O0)
REDIS_CFLAGS+=-fno-omit-frame-pointer
endif
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv
NODEPS:=clean distclean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment