Skip to content

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

Draft
mstange wants to merge 2 commits intofirefox-devtools:mainfrom
mstange:push-tppxoqrqsyyy
Draft

Add an --insert-stack-labels modification to the profiler-edit tool#5966
mstange wants to merge 2 commits intofirefox-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.

mstange and others added 2 commits April 23, 2026 16:06
Before:

```
  node dist/symbolicator-cli.js \
    --input samply-profile.json \
    --output profile-symbolicated.json \
    --server http://localhost:3000
```

After:

```
  node node-tools-dist/profiler-edit.js \
    -i samply-profile.json \
    -o profile-symbolicated.json \
    --symbolicate-with-server http://localhost:3000
```

The new tool also accepts a URL or profile storage hash as input, and can
write gzip-compressed output:

```
  node node-tools-dist/profiler-edit.js \
    --from-hash w1spyw917hg... \
    -o out.json.gz \
    --symbolicate-with-server http://localhost:8001/abcdef/
```

The reason for this change is that I want to add further ways to
modify profiles in the future (such as an `--insert-label-frames`
argument) and it doesn't really make sense to have a separate tool
for each modification.

This commit also moves the script file to /src/node-tools/ and the output to /node-tools-dist/.
I'm planning to add more scripts of this type in the future.
This command takes a .toml file and adds label frames to a profile
based on matching function names.

We use this for profiles from samply, to insert labels for DOM calls etc.
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