firefox-devtools / firefox-devtools/profiler

Feature: Focusing and excluding by modules

Open
#4,979 0 comments 0 reactions 0 assignees View on GitHub
flame graph
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

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](https://mozilla-hub.atlassian.net/browse/FP-757)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.