profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Annotate profiles when slowdowns with known causes are detected

Open mgaudet opened this issue 9 months ago • 2 comments

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

mgaudet avatar Feb 25 '25 15:02 mgaudet

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.

mstange avatar Feb 25 '25 15:02 mstange

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

julienw avatar Mar 03 '25 15:03 julienw