firefox-devtools/profiler

Feature: Focusing and excluding by modules

Opened this issue · 0 comments

It's often useful to limit the flame graph to a single module, because you own that module's code and want to optimize it. It's also possible that you have a proprietary module that you can do nothing about it, in which case you would exclude that module.

Right now, the only thing you can do about modules is to collapse their trees. This does not cover the use cases above.

There are a few possibility what Focus on Module M could mean, which needs to be decided:

  1. Include all stacks that contains a frame from Module M. The stacks are not truncated, the bottom frame does not have to be from Module M.
  2. Same as 1., but truncate the stacks at the bottom that are not from Module M. Equivalent to 1. + Focus on function for all the root functions from Module M.
  3. Include only stacks which has Module M at the top frame. This is likely not useful: for example, if Module M calls into libc, this will end up excluding all the frames in libc.

Excluding a particular module should function like the Drop samples from function option, except that function is replaced with samples that contain Module M (in any position of its stack).

┆Issue is synchronized with this Jira Task