Open Bug 1904639 Opened 1 year ago Updated 11 months ago

Ensure that signal control of the profiler works on Android

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

People

(Reporter: aabh, Unassigned)

References

(Blocks 1 open bug)

Details

Given that Android is a posix-based operating system, signal control should be straightforward to get working. This hasn't been tested or validated yet, however.

Severity: -- → N/A
Priority: -- → P2

I just checked and there seem to be two problems:

  1. If you run adb shell kill -s USR2 16069 it says /system/bin/sh: kill: 16069: Operation not permitted. If you have a rooted phone you can do it with adb shell su -c kill -s USR2 16069.
  2. There's an existing handler for USR1 in Android, which saves out information about which Java/Kotlin functions were called so that ahead-of-time compilation can use this information later.

Additionally bug 1962880 is changing profiler_lookup_async_signal_dump_directory to skip getting the download directory on Android because GetPreferredDownloadsDirectory is not implemented for Android right now: https://searchfox.org/mozilla-central/rev/158fb9063c06a36e6a2efb2b1823bba8c01e82a1/mobile/android/components/geckoview/GeckoViewExternalAppService.cpp#104-108

So we'll have to implement that for Android signal profiling to work properly (currently it can be worked around by using MOZ_UPLOAD_DIR, it still works)

You need to log in before you can comment on or make changes to this bug.