profiler
profiler copied to clipboard
Annotate profiles when slowdowns with known causes are detected
Recently we had someone asking about a profile that seemed to be spending a lot of time capturing the stack. It turns out, that this only happens if a non-standard pref is set -or- Devtools is open.
I wonder if we could annotate either whole profiles, or even just frames, indicating "Hey, if you see this and are worried about this, have you tried... " (in this case, closing devtools and trying again).
┆Issue is synchronized with this Jira Task
We have an existing warning for "you were profiling a debug build" which is based on the value of profile.meta.debug. We could generalize this to be profile.meta.warningsAboutCircumstancesThatMayHaveCompromisedUsefulnessOfProfilingData and then put an appropriate value in that field at the platform level.
We could do some things such as:
- package all modified prefs inside the profile data (and display them somewhere in our UI)
- detect if devtools is open somewhere (and maybe label the related track appropriately)
- report the value for MOZ_OPTIMIZE