Bug 1557762 - ensure we define NS_FREE_PERMANENT_DATA for single-stage pgo builds, r=chmanchester
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 28 Jun 2019 16:38:14 +0000
changeset 543420 4cb7eb5b8a428f82b8db1fd60e591a3a06e142b8
parent 543419 7be0577e53183d1d727ce78a56f3b8363198f713
child 543421 989d4fa5731b6b95952fb6babffa702d9312bd25
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1557762
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1557762 - ensure we define NS_FREE_PERMANENT_DATA for single-stage pgo builds, r=chmanchester Differential Revision: https://phabricator.services.mozilla.com/D35469
config/config.mk
xpcom/base/nscore.h
--- a/config/config.mk
+++ b/config/config.mk
@@ -128,16 +128,17 @@ endif
 # No sense in profiling unit tests
 ifdef CPP_UNIT_TESTS
 NO_PROFILE_GUIDED_OPTIMIZE = 1
 endif
 
 # Enable profile-based feedback
 ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
 ifdef MOZ_PROFILE_GENERATE
+PGO_CFLAGS += -DNS_FREE_PERMANENT_DATA=1
 PGO_CFLAGS += $(if $(filter $(notdir $<),$(notdir $(NO_PROFILE_GUIDED_OPTIMIZE))),,$(PROFILE_GEN_CFLAGS))
 PGO_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
 ifeq (WINNT,$(OS_ARCH))
 AR_FLAGS += -LTCG
 endif
 endif # MOZ_PROFILE_GENERATE
 
 ifdef MOZ_PROFILE_USE
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -167,21 +167,23 @@
  * sense to touch memory pages and free that memory at shutdown,
  * unless we are running leak stats.
  *
  * Note that we're also setting this for code coverage and pgo profile
  * generation, because both of those require atexit hooks, which won't fire
  * if we're using _exit. Bug 1555974 covers improving this.
  *
  */
+#ifndef NS_FREE_PERMANENT_DATA
 #if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND) || \
     defined(MOZ_ASAN) || defined(MOZ_CODE_COVERAGE) ||           \
     defined(MOZ_PROFILE_GENERATE)
 #  define NS_FREE_PERMANENT_DATA
 #endif
+#endif
 
 /**
  * NS_NO_VTABLE is emitted by xpidl in interface declarations whenever
  * xpidl can determine that the interface can't contain a constructor.
  * This results in some space savings and possible runtime savings -
  * see bug 49416.  We undefine it first, as xpidl-generated headers
  * define it for IDL uses that don't include this file.
  */