Skip to content

Add an --insert-stack-labels modification to the profiler-edit tool#5966

Draft
mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:push-tppxoqrqsyyy
Draft

Add an --insert-stack-labels modification to the profiler-edit tool#5966
mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:push-tppxoqrqsyyy

Conversation

@mstange
Copy link
Copy Markdown
Contributor

@mstange mstange commented Apr 23, 2026

Based on #5965.

This lets us create profiles like https://share.firefox.dev/4mPPTgr with DOM label frames that show up in the JS-only view, for profiles from samply, based on function name matching. The matchers are declared in a toml file that is passed to the script.

This command takes a .toml file and adds label frames to a profile based on 
matching function names.

We want to use this for profiles from samply, to insert labels for DOM calls 
and Layout / Style / etc.

Example:
Before: https://share.firefox.dev/48wEADM
After: https://share.firefox.dev/3P9d3BQ

The toml file has to be provided by the user, because the matched function
names are specific to the program being profiled.

Here's an example toml file:
https://gist.github.com/mstange/827c40404c987bc566b8b324efc0a04f
@mstange mstange force-pushed the push-tppxoqrqsyyy branch from c303031 to 39b7942 Compare May 28, 2026 18:30
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

❌ Patch coverage is 85.47297% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.79%. Comparing base (08c584a) to head (39b7942).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/node-tools/profiler-edit.ts 20.00% 24 Missing ⚠️
src/profile-logic/insert-stack-labels.ts 89.47% 12 Missing ⚠️
src/utils/label-templates.ts 95.39% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5966      +/-   ##
==========================================
+ Coverage   83.78%   83.79%   +0.01%     
==========================================
  Files         329      331       +2     
  Lines       34544    34839     +295     
  Branches     9675     9634      -41     
==========================================
+ Hits        28941    29193     +252     
- Misses       5174     5217      +43     
  Partials      429      429              

☔ View full report in Codecov by Sentry.
📢 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