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 1766283 6f3303d415f7920900d800869ce901eed060c889
parent 1766218 da37c7e24c90cd585bdf68dff8acc45aa4ba7c3c
child 1766284 8540104bb0bd811f9fd45b160dbe38a67c9aa5cd
push id316869
push userkgupta@mozilla.com
push dateWed, 21 Nov 2018 04:32:11 +0000
treeherdertry@db9eeed690b9 [default view] [failures only]
reviewersdmajor
bugs1508547
milestone65.0a1
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"