profiler
profiler copied to clipboard
Add Predefined Call Tree Transformations
When I'm profiling, it's pretty common for me to want to see both C++ and JS, but to filter out all the XPConnect and SpiderMonkey stuff, so I can just focus on the meat of what C++ is doing and get the context of what the JS functions are. It would be nice if there were some way to quickly filter out XPConnect and SpiderMonkey stuff based on, say, a filter list of regexes.
┆Issue is synchronized with this Jira Task
Yes, this does sound like something nice to have. I find myself wanting to apply certain transforms by default. It seems like we need some UI here to list and apply saved transforms, and then save the preferences to your browser. Internally, we store only indexes to refer to transforms, so we'd have to store the text (or regexes) and then do some pattern matching to re-apply the transforms dynamically to generate the actual transforms.
It sounds like there is a decent amount of work to do this, so if anyone else wants this feature please advocate for it to help us prioritize it.
I wonder if the interface for this should be in the add-on? That way you could select some pre-defined configuration options. Then maybe a button to save the current transforms and options as default, that would then be associated with the add-on.
I think whatever we do, it would be ideal to be able to import / export / share saved transforms. Otherwise profiling local builds on a fresh profile would be a bit inconvenient.
We're in the process of changing how the JS view behaves in https://github.com/firefox-devtools/profiler/pull/2000. Maybe that would remove your need of predefined transforms by providing you the right information right away :)
I got this request again from @fitzgen at the All Hands, who wanted it for things that #2000 would not cover.
Just got this request again from @jimblandy, also he wants @hotsphink to write his transforms for him :)
Thinking this through a bit, it would be hard to filter on native frames, since they get symbolicated realtime, and thus transforms would easily be invalidated. We could support transforms on label frames pretty robustly since those are stable through symbolication. Plus we control the pipeline there, and it's stable across platforms.
I wonder if it would be nice to be able to collapse functions under a path, which would be more flexible than just a single file...