Skip to content

Make it easier to create upside-down flame graphs#6128

Open
mstange wants to merge 2 commits into
firefox-devtools:mainfrom
mstange:push-tzmnxpxrpyln
Open

Make it easier to create upside-down flame graphs#6128
mstange wants to merge 2 commits into
firefox-devtools:mainfrom
mstange:push-tzmnxpxrpyln

Conversation

@mstange

@mstange mstange commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This PR extracts some ideas from #6090. But it doesn't add UI to show an inverted flame graph.

I'm planning to have an upside-down flame graph in the function list (for the callers of the selected function), so the function list PR depends on this one.

mstange added 2 commits June 26, 2026 09:56
… flame graph code.

For the non-inverted call node info, the two are equivalent.

But if we want to use the flame graph on an inverted call node info,
such as for the "called by" view in the function list, the old code
would not work because the callNodeTable is always the non-inverted
call node table. So this change removes one barrier for inverted
flame graphs.
startsAtBottom={true} is the regular flame graph layout.
startsAtBottom={false} can be used for icicle-style flame graphs.
@mstange mstange requested a review from fatadel June 26, 2026 14:02
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.55102% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.45%. Comparing base (de0953b) to head (1d18f2a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/components/flame-graph/Canvas.tsx 76.00% 6 Missing ⚠️
src/components/flame-graph/FlameGraph.tsx 79.16% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6128      +/-   ##
==========================================
- Coverage   83.47%   83.45%   -0.02%     
==========================================
  Files         342      342              
  Lines       36097    36106       +9     
  Branches    10098    10122      +24     
==========================================
+ Hits        30131    30133       +2     
- Misses       5538     5545       +7     
  Partials      428      428              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant