profiler
profiler copied to clipboard
Stop treating "GeckoMain" threads specially and replace the name-based detection with an `isMainThread` or `isPrimaryThread` field
In some places we treat threads specially when they have the name "GeckoMain": These threads become the thread of a globalTrack, and they get a marker track shown for them.
Similar treatment can benefit threads from non-Gecko sources, too, so this should be based on a field, not on the thread name.
I'm not sure whether isMainThread
or isPrimaryThread
would be the better name. For example, in GeckoView, the "GeckoMain" thread is not actually the true main thread of the process; instead, the Java UI thread is the actual main thread. But we still want to treat the GeckoMain thread as the primary thread in the globalTrack.
Let's just call the property isMainThread
.
So the tasks for this bug are:
- Add an
isMainThread
field toThread
. - In profile processing, detect GeckoMain threads and set this field on them.
- Add a profile upgrader for the processed format.
- In various places that check for the string GeckoMain, use the isMainThread field instead.
- Take advantage of the new field in various importers like the Chrome importer.
Hello @mstange , still working on this?
I have a branch laying around...