Closed Bug 1902288 Opened 2 years ago Closed 1 year ago

Add 16 KB Page Size support to Android

Categories

(Firefox Build System :: General, task)

All
Android
task

Tracking

(firefox135 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: mcarare, Assigned: sergesanspaille)

References

Details

(Whiteboard: [fxdroid][group1])

Attachments

(1 file)

See https://developer.android.com/about/versions/15/behavior-changes-all#16-kb.

As we use native code, our app will be impacted.

Supporting 16 KB memory page sizes will also bring performance improvement.

Starting next year Google plans to make 16 KB page compatibility required for app uploads to the Google Play store. ( No definitive date mentioned, as usual).

We should check if we already have support and what we need do add it if not.

See also: https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html

Serge, are there changes we need to make in the build system to support this? I'm thinking this is more of a GeckoView question than Fenix since that's where the native code lives.

Flags: needinfo?(sguelton)

This might also impact Application Services and Glean IIUC.

The Bugbug bot thinks this bug should belong to the 'Fenix::Performance' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Performance

According to https://developer.android.com/guide/practices/page-sizes#build one needs to pass the extra "-Wl,-z,max-page-size=16384" linker flag if NDK version is <= 26 and we seem to support 21+. If you go that way, please create a bug and assign it to me, I can deal with it.

I cannot tell for the gradle part.

Flags: needinfo?(sguelton)
Severity: N/A → --
Component: Performance → General
Product: Fenix → Firefox Build System
Summary: Check if we support 16 KB memory page sizes → Add 16 KB Page Size support to Android

AFAICT, we need to add "-Wl,-z,max-page-size=16384" to wherever we set our Android ldflags. My understanding is that we don't use the llvm toolchain from the NDK in favor of our own builds and therefore can't rely on whatever the NDK does.

Flags: needinfo?(sguelton)
Assignee: nobody → sguelton
Status: NEW → ASSIGNED

patch submitted, feel free to comment there

Flags: needinfo?(sguelton)
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea5154572139 Add 16 KB Page Size support to Android r=glandium
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
See Also: → 1959478
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: