|
From: <sv...@va...> - 2012-05-22 01:41:55
|
florian 2012-05-22 02:41:48 +0100 (Tue, 22 May 2012)
New Revision: 12575
Log:
Add comments from Julian as to why mc_main.c and mc_replace_strmem.c
deserve special compilation treatment.
Modified files:
trunk/memcheck/Makefile.am
Modified: trunk/memcheck/Makefile.am (+8 -0)
===================================================================
--- trunk/memcheck/Makefile.am 2012-05-21 23:53:06 +01:00 (rev 12574)
+++ trunk/memcheck/Makefile.am 2012-05-22 02:41:48 +01:00 (rev 12575)
@@ -69,6 +69,9 @@
$(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
endif
+# mc_main.c contains the helper function for memcheck that get called
+# all the time. To maximise performance compile with -fomit-frame-pointer
+# Primary beneficiary is x86.
mc_main.o: CFLAGS += -fomit-frame-pointer
#----------------------------------------------------------------------------
@@ -112,5 +115,10 @@
$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
endif
+# mc_replace_strmem.c runs on the simulated CPU, and it often appears
+# in stack traces shown to the user. It is built with
+# -fno-omit-frame-pointer so as to guarantee robust backtraces on x86,
+# on which CFI based unwinding is not the "normal" case and so is
+# sometimes fragile.
mc_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer
|