Closed Bug 1831935 Opened 2 years ago Closed 1 year ago

Optimize Gecko android build for speed (O2) rather than for size (Oz)

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement, P1)

enhancement

Tracking

(firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: mleclair, Assigned: mleclair)

References

Details

(Keywords: perf-alert)

Attachments

(1 file, 1 obsolete file)

We're currently using Oz to optimize for size in Android. We tried previously to test with O2 in bug 1591725. It led to some good results but there was an increase in APK size.

There's also been improvement with sp3 in geckoview (there is a caveat on this one since when it runs with PGO, it seems like those gains are lost).

As for the APK size, baseline geckoview was 87.4mb and increased to 91.7mb after compiling with O2

Assignee: nobody → mleclair
Status: NEW → ASSIGNED
Attachment #9332232 - Attachment is obsolete: true
Pushed by mleclair@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21b2831713e7 optimize android gecko for O2 r=firefox-build-system-reviewers,glandium
Flags: needinfo?(mleclair)

Not sure why this failed since it should've passed. Here's the ./mach try result I got.. I'll give a try to landing it again since it shouldn't affect any tests

Flags: needinfo?(mleclair)
Pushed by mleclair@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b13e72246d35 optimize android gecko for O2 r=firefox-build-system-reviewers,glandium

Backed out for causing android reftest and mochitest failures

Backout link

Push with failures - mochitest & reftest

Failure log - mochitest // Failure log - reftest

Flags: needinfo?(mleclair)
See Also: → 1591725
Duplicate of this bug: 1807359

(In reply to Norisz Fay [:noriszfay] from comment #8)

Backed out for causing android reftest and mochitest failures

Backout link

Push with failures - mochitest & reftest

Failure log - mochitest // Failure log - reftest

Perfherder has detected a build_metrics performance regression from push 88f507752a8b57949b64bd4be8717dab605c9cad. From the graphs found in the regression alert summary it looks like this patch has introduced an improvement with b13e72246d35e40efc6705d25b8cfea49060278d which caused an regression when it was backed out.

== Change summary for alert #38370 (as of Thu, 18 May 2023 05:35:59 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
3% compiler_metrics num_static_constructors android-5-0-x86_64 101.00 -> 104.00
3% compiler_metrics num_static_constructors android-5-0-x86_64 lite 101.00 -> 104.00
3% compiler_metrics num_static_constructors android-5-0-x86_64 107.00 -> 110.00
2% compiler_metrics num_static_constructors android-5-0-x86_64 107.75 -> 110.00

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38370

Trying to land again since the fix for a geckoview crash seemed to have been the problem ( crash in InterposerHelper.h)

Flags: needinfo?(mleclair)
Pushed by mleclair@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d1fd23e1929 optimize android gecko for O2 r=firefox-build-system-reviewers,glandium
Severity: -- → N/A
Priority: -- → P1

(In reply to Sandor Molnar from comment #14)

Backed out for causing reftest failures

Backout link: https://hg.mozilla.org/integration/autoland/rev/4e39a470b52c2437f1025481e82a18d5ed68a6d3

Push with failures

Failure log -> REFTEST ERROR | RemoteProcessMonitor | exception reading log: args: adb wait-for-device pull /data/local/tmp/test_root/reftest/reftest.log

== Change summary for alert #38564 (as of Mon, 05 Jun 2023 20:17:53 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
3% compiler_metrics num_static_constructors android-5-0-x86_64 100.00 -> 103.00
3% compiler_metrics num_static_constructors android-5-0-x86_64 lite 100.00 -> 103.00
3% compiler_metrics num_static_constructors android-5-0-x86_64 106.00 -> 109.00
3% compiler_metrics num_static_constructors android-5-0-x86_64 isolated-process 106.00 -> 109.00

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38564

Pushed by mleclair@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d2b14ac73d9a optimize android gecko for O2 r=firefox-build-system-reviewers,glandium
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1838709

== Change summary for alert #38872 (as of Sat, 24 Jun 2023 06:50:05 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
8% AndroidStartup:geckoview_example cold_view_nav_start.median android-hw-a51-11-0-aarch64-shippable 2,288.79 -> 2,108.62

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38872

O2 was limited to Nightly builds in bug 1840494.

Clearing the needinfo request for mleclair because he already addressed the backout.

Flags: needinfo?(mleclair)
See Also: → 1840494
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: