Skip to content

uucore: detect CPU features on Android - #15367

Open
limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/hardware-android-detection
Open

limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/hardware-android-detection

Conversation

@limadog9

Copy link
Copy Markdown
Contributor

Use Rust's supported feature detection on Android instead of disabling every feature. Enable the checksum debug tests there and add an x86_64 SSE2 regression that runs in the existing Android CI.

Closes #15233

Comment thread tests/by-util/test_wc.rs Outdated
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning, 1 note

⚠️ 120 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

✅ 257 untouched benchmarks
⏩ 214 skipped benchmarks1


Comparing limadog9:fix/hardware-android-detection (708c8a8) with main (ff0c589)2

Open in CodSpeed

Footnotes

  1. 214 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (732b9c5) during the generation of this report, so ff0c589 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@xtqqczze

This comment was marked as resolved.

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch from a57f5b0 to 34575d5 Compare October 15, 2026 17:40
@xtqqczze

Copy link
Copy Markdown
Collaborator

@limadog9 This branch has conflicts that must be resolved

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch from 34575d5 to 6d2d503 Compare October 20, 2026 22:25
@xtqqczze

Copy link
Copy Markdown
Collaborator

cc: @naoNao89

@xtqqczze xtqqczze left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced by the reasoning in #15233, has this been tested for Android x86_64?

@limadog9

Copy link
Copy Markdown
Contributor Author

@xtqqczze Yep, this ran on Android x86_64 in the API 28 emulator through Termux. The CI logs⁠ show the new SSE2 regression and all three checksum debug tests passing

@xtqqczze

Copy link
Copy Markdown
Collaborator

API 28 emulator

API level 28 is very old

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch from 6d2d503 to 2f8f08a Compare October 21, 2026 16:40
@xtqqczze

Copy link
Copy Markdown
Collaborator

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch from 2f8f08a to 6a8eafd Compare October 21, 2026 19:44
Comment thread .github/workflows/android.yml Outdated
disk-size: ${{ env.EMULATOR_DISK_SIZE }}
cores: ${{ env.EMULATOR_CORES }}
force-avd-creation: true
# These command-line tests do not need Android's animation settings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# These command-line tests do not need Android's animation settings.

seems trivial?

cores: [4] # , 6
ram: [4096]
api-level: [28]
api-level: [28, "37.0"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android-emulator-runner@v2.38.0 predates the API 37 SDK tools fix ReactiveCircus/android-emulator-runner#483
could we install cmdline tools 22.0 and rerun this job??also previous API 37 run failed before reaching the tests.

Comment thread tests/by-util/test_wc.rs

#[test]
#[cfg(all(target_arch = "x86_64", not(wasi_runner)))]
fn test_debug_reports_sse2_on_x86_64() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since CI only covers x86_64, has the Android ARM64 ASIMD/PMULL path been tested on a real device?

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch 3 times, most recently from 2597be9 to 421e388 Compare October 23, 2026 02:05
@github-actions

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 155.04 MB (-308 KB, -0.19%)

Significant per-binary changes:
  date     2.61 MB ->    2.30 MB  (-316 KB, -11.81%)

@limadog9
limadog9 force-pushed the fix/hardware-android-detection branch 2 times, most recently from acf6126 to 04a7510 Compare October 23, 2026 02:39
Use Rust's supported CPU feature detection on Android instead of
disabling every feature. Enable the checksum debug tests and add an
x86_64 SSE2 regression.

Run Android CI on both API 28 and API 37.0 so the detection tests cover
an older Android release and Android 17.

Closes uutils#15233
@sylvestre
sylvestre force-pushed the fix/hardware-android-detection branch from 04a7510 to 708c8a8 Compare October 25, 2026 10:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uucore: hardware feature detection always reports nothing on Android

4 participants