Uh oh!
There was an error while loading. Please reload this page.
Add an --insert-label-frames argument to the profiler-edit tool - #5966
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #5966 +/- ##
==========================================
- Coverage 83.70% 83.69% -0.02%
==========================================
Files 337 338 +1 Lines 35575 35693 +118 Branches 9971 9904 -67 ==========================================
+ Hits 29778 29873 +95 - Misses 5369 5392 +23
Partials 428 428 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
83cd29e to
7354e3cCompare55816ce to
952d57eCompare057b358 to
560ba64Compare| if (line !== null && col !== null) { | ||
| name += ` (${filename}:${line}:${col})`; | ||
| } else if (line !== null) { | ||
| name += ` (${filename}:${line})`; | ||
| } else { | ||
| name += ` (${filename})`; |
There was a problem hiding this comment.
The comment above mentions that it mirrors getLabelIndexForFunc, but it doesn't seem like it matches fully.
getLabelIndexForFunc constructs it like (${filename}), but this one does it like (${filename}:${line}:${col}).
| autoLabels: AutoLabel[]; | ||
| }; | ||
| import { parse as parseToml } from 'smol-toml'; |
There was a problem hiding this comment.
nit: can we move this to the top of the file?
In the past we had a hardcoded list of DOM methods in the label matchers.
This modification lets us replace 100 explicit labels of this type:
```
[[labels]]
name = "Document.querySelector"
funcPrefixes = [
"mozilla::dom::Document_Binding::querySelector(",
"blink::`anonymous namespace'::v8_document::QuerySelectorOperation",
"blink::(anonymous namespace)::v8_document::QuerySelectorOperation",
"WebCore::jsDocumentPrototypeFunction_querySelector",
]
```
with one auto label of this type:
```
[[auto_labels]]
nameTemplate = "{Class}.{method}"
funcPrefixTemplates = [
"mozilla::dom::{Class}_Binding::{method}(",
"blink::`anonymous namespace'::v8_{Class:blink_snake}::{method:pascal}Operation",
"blink::(anonymous namespace)::v8_{Class:blink_snake}::{method:pascal}Operation",
"WebCore::js{Class}PrototypeFunction_{method}",
]
```
fixup auto labelsThis 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
Uh oh!
There was an error while loading. Please reload this page.
Changes: [Nazım Can Altınova] Fix call node context menu being hidden behind source view bottom box (#6045) [Nazım Can Altınova] Pass `--use-env-proxy` only when the node version is >= 24 (#6064) [fatadel] Upgrade @firefox-devtools/react-contextmenu to 5.2.4 (#6066) [Markus Stange] Switch profiler-edit from minimist to commander (#6065) [Markus Stange] Support reading profiles from JsonSlabs files (#6037) [Florian Quèze] Don't fail profile processing when a marker's stack field is not a backtrace (#6069) [fatadel] Replace the footer-links overlay with a settings menu (#6042) [fatadel] Upgrade @types/node to match Node 24 (#6070) [fatadel] Remove unused undici-types package (#6074) [cathaysia] Update isLocalURL to include LAN addresses, .local domains, and hostn… (#5973) [Markus Stange] Fix from-url with binary profiles (#6072) [fatadel] Upgrade to React 19 (#6067) [Markus Stange] Add an insertStackLabels helper. (#6076) [fatadel] Drive counter tooltips from a tooltipRows schema (#6023) [fatadel] Add TrackPower--tooltip-average-power-microwatt (#6080) [Markus Stange] Downgrade to React 19.1 to fix unusable dev build performance. (#6082) [Nazım Can Altınova] Add source map symbolication and source view support (#6018) [spokodev] fix(FilterNavigatorBar): clip overflow so many breadcrumbs do not expand the parent (#6085) [Markus Stange] Move paddings inside the tree header cells. (#6002) [Markus Stange] Add an --insert-label-frames argument to the profiler-edit tool (#5966) [Markus Stange] Stop printing "error: too many arguments" during tests. (#6088) [Markus Stange] More additions to profiler-edit, for sp3 profiles (#6009) [Nazım Can Altınova] Do not rely on localized texts in the settings menu tests (#6101) And special thanks to our localizers: be: Andrei Mukamolau de: Ger de: Michael Köhler de: Ralf Duehnfahr el: Jim Spentzos en-CA: chutten en-GB: Ian Neal es-CL: ravmn fr: Théo Chevalier fr: wy fur: Fabio Tomat fy-NL: Fjoerfoks ia: Melo46 it: Francesco Lodolo [:flod] nl: Mark Heijl ru: Valery Ledovskoy sr: Марко Костић (Marko Kostić) sv-SE: Andreas Pettersson tr: Grk tr: Selim Şumlu zh-CN: Olvcpr423 zh-TW: Pin-guang Chen
Based on #6076.
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.
Example TOML file: https://gist.github.com/mstange/827c40404c987bc566b8b324efc0a04f