More additions to profiler-edit, for sp3 profiles#6009
Draft
mstange wants to merge 6 commits into
Draft
Conversation
This allows applying wasm symbols to existing profiles that were captured with a stripped wasm bundle. The script looks for functions with names of the shape `wasm-function[123]`, which is what Firefox uses when the wasm file doesn't have a names section. Usage: ``` yarn build-node-tools && \ node node-tools-dist/profiler-edit.js -i input.json.gz \ --symbolicate-wasm http://host/a.wasm=./a-unstripped.wasm \ --symbolicate-wasm http://host/b.wasm=./b-unstripped.wasm \ -o out.json.gz ```
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
…verlapping-threads-by-name.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6009 +/- ##
==========================================
- Coverage 83.82% 83.48% -0.34%
==========================================
Files 328 331 +3
Lines 34254 34832 +578
Branches 9572 9610 +38
==========================================
+ Hits 28712 29079 +367
- Misses 5114 5324 +210
- Partials 428 429 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes it so that you can run profiler-edit with
--insert-label-frames browser_labels.toml --only-keep-threads-with-markers-matching='-async,-sync' --merge-non-overlapping-threads-by-name --set-name 'Sp3 5x (with labels, combined main threads)'to turn https://share.firefox.dev/4cXQFED into https://share.firefox.dev/4ezEcsaThe label frames are useful in the JS-only view when applied to profiles from samply; they let us group work like "Paint" and "JS Parsing" (example toml). You can best see them in action in the function list deploy preview: JS-only, ordered by self, with the Self wing showing where the time is spent.