Closed Bug 1615436 Opened 6 years ago Closed 6 years ago

Allow capturing profiles if the profiler was started by another tool, to allow startup profiling on Android

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task)

task
Not set
normal

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(1 file)

It is currently possible to start profiling during startup in GeckoView/Android, by using environment variables and launching the app via adb:

adb shell am start -n org.mozilla.geckoview_example/org.mozilla.geckoview_example.GeckoViewActivity \
    --es env0 MOZ_PROFILER_STARTUP=1 \
    --es env1 MOZ_PROFILER_STARTUP_FEATURES=threads,js,stackwalk,leaf,screenshots,ipcmessages,java \
    --es env2 MOZ_PROFILER_STARTUP_INTERVAL=5

However, these profiling runs currently cannot be captured via about:debugging. That's because the profiler was started "by another tool" and the performance panel on about:debugging only shows a "Cancel profiling" button.

I think it makes sense in general to always allow capturing existing profiling runs, even if they were started by another tool.
This would allow the startup profiling use case. There's probably more polishing we could do for startup profiling in general, but this would unblock the immediate use case.

I just thought of another use case: Say I want to check how performance differs between a device that is currently charging and a device that's on battery. In order to do that, I can't have a USB connection to the device. So I could start profiling while the device is connected, then unplug it, leave the profiler running for a bit, and then reconnect. Then it would be nice to be able to capture that profile.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/df596657bebc Allow capturing profiles even when profiling was started by another tool. r=gregtatum
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: