Export tracing session into a JSON file that the Profiler UI can consume
Categories
(DevTools :: Debugger, enhancement)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
This would help developer share the tracer and investigate issues, similarly to performance profiles.
The WebCompat team would find this quite helpful, and the Profiler team told us it would be quite simple to consume such file.
Comment 1•1 year ago
|
||
I've been suggested by Julien to look at:
https://github.com/firefox-devtools/profiler/blob/17c4918daba1c2c4ed5f973b748009302e04fc5a/src/profile-logic/import/chrome.js#L487
and:
https://github.com/firefox-devtools/profiler/blob/main/src/profile-logic/data-structures.js
to learn how to craft a profiler's profile.
Otherwise, on the tracer side, we can see the type of data we get to qualify a frame:
https://searchfox.org/mozilla-central/rev/4e22b886bbd4c274f268c4a285ab7da00e95c99b/devtools/server/tracer/tracer.jsm#236-253
script.source.url
will be the url of the js file running
and lineNumber
/ columnNumber
the location of the frame that just ran.
I imagine it should be already enough to compute a profile?
The tracer is per thread, so we wouldn't be able to easily compute a multi-thread record.
At least, we should try to generated a mono-thread record as a first step.
Comment 2•1 year ago
|
||
I tweaked the pref so that tracing is enabled by default and automatically set to record to the profiler.
The tracer can be toggled on/off via Ctrl+Shift+5 or via the bold round icon on top right of the debugger.
Description
•