Add profiler start geckoview API to be able to capture very early part of startup profiling
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | affected |
People
(Reporter: canova, Unassigned)
References
(Blocks 1 open bug)
Details
With Bug 1659103, we made the Android startup profiling a bit better by starting the JVM sampler earlier. But we can make it even better by starting the JVM sampler even before the geckoview GeckoThread initialization by starting it from Fenix directly.
Right now, during the startup profiling, we are starting the profiler from geckoview on the GeckoThread.run
method:
https://searchfox.org/mozilla-central/rev/5a8487d8e9dd114289083800f723d9c56c9a8003/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java#435
This is helping us to start the JVM sampler before the mozglue load. But still, we are missing the very early startup of Fenix because GeckoThread.run
is not being executed directly, and we are missing the things that are happening earlier.
So to start the sampler even earlier, we can create a geckoview profiler API for profilerStart
, and call this API on very early stage of Fenix. Possibly on Application.onCreate()
of Fenix. This also requires some Fenix changes but this geckoview API must be implemented first.
We have some geckoview APIs here currently. We should add the start API here:
https://searchfox.org/mozilla-central/rev/5a8487d8e9dd114289083800f723d9c56c9a8003/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ProfilerController.java
Description
•