Bug 1508547 - Disable the machine outliner on Android. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 21 Nov 2018 01:13:07 +0000
changeset 447393 6f3303d415f7920900d800869ce901eed060c889
parent 447392 da37c7e24c90cd585bdf68dff8acc45aa4ba7c3c
child 447394 8540104bb0bd811f9fd45b160dbe38a67c9aa5cd
push id35075
push usershindli@mozilla.com
push dateWed, 21 Nov 2018 04:04:02 +0000
treeherdermozilla-central@8540104bb0bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1508547
milestone65.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 1508547 - Disable the machine outliner on Android. r=dmajor It's enabled by default as of clang 7 with -Oz on aarch64 (that is, afaict, the only platform where it's enabled), and regresses our performance on speedometer. Differential Revision: https://phabricator.services.mozilla.com/D12394
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -757,16 +757,23 @@ case "$target" in
 
     MOZ_GFX_OPTIMIZE_MOBILE=1
     if test -z "$CLANG_CC"; then
         MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions -Os"
     else
         # From https://github.com/android-ndk/ndk/issues/133#issuecomment-308549264
         # -Oz is smaller than -Os on clang.
         MOZ_OPTIMIZE_FLAGS="-Oz"
+        # Disable the outliner, which causes performance regressions, and is
+        # enabled on some platforms at -Oz.
+        DISABLE_OUTLINER="-mno-outline"
+        _SAVE_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS $DISABLE_OUTLINER"
+        AC_TRY_COMPILE(,,[MOZ_OPTIMIZE_FLAGS="$MOZ_OPTIMIZE_FLAGS $DISABLE_OUTLINER"])
+        CFLAGS="$_SAVE_CFLAGS"
     fi
     ;;
 
 *-*linux*)
     if test "$GNU_CC" -o "$GNU_CXX"; then
         MOZ_PGO_OPTIMIZE_FLAGS="-O3"
         if test -n "$MOZ_DEBUG"; then
             MOZ_OPTIMIZE_FLAGS="-Os"