Commit 1e34e6ec authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Reland "Android: Remove -fprofile-sample-accurate from blink core"

This reverts commit 16ccdc07.

Reason for reland: CL did improve some metrics.

Original change's description:
> Revert "Android: Remove -fprofile-sample-accurate from blink core"
>
> This reverts commit c2bb3798.
>
> Reason for revert: Reverting to see what perf alerts fire.
>
> Original change's description:
> > Android: Remove -fprofile-sample-accurate from blink core
> >
> > This trades off some size for performance.
> >
> > Binary-Size: Trading size for speed
> > Bug: 1125115
> > Change-Id: If18e8ef4449dec6aab4494fa7d04063d8d94b845
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491540
> > Reviewed-by: George Burgess <gbiv@chromium.org>
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#819964}
>
> Bug: 1125115
> Change-Id: Iebce1fffa79b590fd015d0054f9fe2da9e3bb3a3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2498088
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: George Burgess <gbiv@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#822847}

Bug: 1125115
Change-Id: I62345561bb892ba49da433f692caf317b96a1837
Binary-Size: Trading size for perf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2514376
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarGeorge Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823996}
parent c475d17d
...@@ -328,7 +328,7 @@ blink_core_sources("core_hot") { ...@@ -328,7 +328,7 @@ blink_core_sources("core_hot") {
# TODO(ajwong) this is of mirror # TODO(ajwong) this is of mirror
# https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/core.gni;l=26 # https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/core.gni;l=26
# to undo the configs which is fragile. Find a better way. # to undo the configs which is fragile. Find a better way.
if (is_android && !is_debug) { if (!is_debug && optimize_for_size) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
} }
......
...@@ -20,12 +20,15 @@ core_config_remove = [] ...@@ -20,12 +20,15 @@ core_config_remove = []
# Compute the optimization level. `optimize_max` ensures that speed is preferred # Compute the optimization level. `optimize_max` ensures that speed is preferred
# over size on all platforms. # over size on all platforms.
# TODO: It's unclear if the perf vs size win here is a good trade-off for # TODO(crbug.com/1125115): It's unclear if the perf vs size win here is a good
# Android. Investigate that. # trade-off for Android. Investigate that.
if (!is_debug && !is_android) { if (!is_debug && !optimize_for_size) {
core_config_remove += [ "//build/config/compiler:default_optimization" ] core_config_remove += [ "//build/config/compiler:default_optimization" ]
core_config_add += [ "//build/config/compiler:optimize_max" ] core_config_add += [ "//build/config/compiler:optimize_max" ]
} }
if (using_mismatched_sample_profile) {
core_config_remove += [ "//build/config/compiler:afdo_optimize_size" ]
}
core_config_remove += [ "//build/config/compiler:default_symbols" ] core_config_remove += [ "//build/config/compiler:default_symbols" ]
core_config_add += blink_symbols_config core_config_add += blink_symbols_config
......
...@@ -30,6 +30,9 @@ source_set("heap_unsanitized") { ...@@ -30,6 +30,9 @@ source_set("heap_unsanitized") {
# std::atomic<>:: functions must be inlined. # std::atomic<>:: functions must be inlined.
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
if (using_mismatched_sample_profile) {
configs -= [ "//build/config/compiler:afdo_optimize_size" ]
}
if (!enable_blink_heap_use_v8_oilpan) { if (!enable_blink_heap_use_v8_oilpan) {
sources = [ sources = [
...@@ -165,6 +168,8 @@ blink_platform_sources("heap") { ...@@ -165,6 +168,8 @@ blink_platform_sources("heap") {
if (!is_debug && !optimize_for_size) { if (!is_debug && !optimize_for_size) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
} else if (using_mismatched_sample_profile) {
configs -= [ "//build/config/compiler:afdo_optimize_size" ]
} }
visibility = [ visibility = [
......
...@@ -252,9 +252,8 @@ component("wtf") { ...@@ -252,9 +252,8 @@ component("wtf") {
sources -= [ "text/atomic_string_cf.cc" ] sources -= [ "text/atomic_string_cf.cc" ]
} }
if (!is_debug && !optimize_for_size) { if (using_mismatched_sample_profile) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:afdo_optimize_size" ]
configs += [ "//build/config/compiler:optimize_max" ]
} }
configs -= [ "//build/config/compiler:default_symbols" ] configs -= [ "//build/config/compiler:default_symbols" ]
......
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