Implement object previews/grips in C++
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(firefox143 fixed)
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: alexical, Assigned: alexical)
References
Details
Attachments
(7 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
1.10 MB,
image/png
|
Details | |
|
17.72 KB,
image/png
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Basically, creating previews for objects is rather expensive, and can be made much faster if implemented in C++. Simply migrating the existing JS logic into C++ is a significant speedup, but there's also more work we can do by serializing the preview into a binary representation which can be more efficiently passed to the parent process and included in profiles / elsewhere. This bug tracks at least the first part of this, and it may be most expedient to just do the serialization work as part of this.
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
The lastest mozilla-central patch can be tested by settting devtools.performance.recording.ui-base-url to https://deploy-preview-5363--perf-html.netlify.app/.
Doing this help use a custom profiler frontend that supports showing arg values, which comes from the following pull request:
https://github.com/firefox-devtools/profiler/pull/5363
With such setup, you can record traces that look like this:
https://deploy-preview-5363--perf-html.netlify.app/public/rxabzrr1e4fcb8f05aavnbm7vsgcp4cn2hg7mtr/stack-chart/?globalTrackOrder=a0w9&hiddenGlobalTracks=1w8&hiddenLocalTracksByPid=4612-0w4~4636-0~4617-0&thread=f&timelineType=category&v=10
See the popups when mouse overing the frames in the stack chart.
Comment 4•1 year ago
|
||
Adding a screenshot for posterity
This looks very promising :)
(Looks like the profiler might need to handle overflowing in the tooltip)
Comment 5•1 year ago
•
|
||
I just tried it, pretty cool. One question, will we be able to see arguments (and possibly return values) into native calls? Like not only to functions, but to CanvasRenderingContext2D.fillText for example
Comment 6•1 year ago
|
||
I crafted a WIP patch on top of :alexical's one against the profiler frontend in order to show the previews via DevTools Reps (React component used by the console to render any arbitraty JS value nicely):
https://github.com/firefox-devtools/profiler/pull/5394
(More info on github about the challenges of integrating reps into the profiler frontend)
Using the same mozilla-central patch attached on this bug: https://phabricator.services.mozilla.com/D236936
and then setting devtools.performance.recording.ui-base-url to https://deploy-preview-5394--perf-html.netlify.app/,
you should be able to see tracer values like on this profiler record:
https://deploy-preview-5394--perf-html.netlify.app/public/rxabzrr1e4fcb8f05aavnbm7vsgcp4cn2hg7mtr/stack-chart/?globalTrackOrder=a0w9&hiddenGlobalTracks=1w8&hiddenLocalTracksByPid=4612-0w4~4636-0~4617-0&implementation=js&search=activity-s&thread=f&timelineType=category&v=10
| Assignee | ||
Comment 7•1 year ago
|
||
| Assignee | ||
Comment 8•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 9•1 year ago
|
||
Quick update on this: work still ongoing, but I should have a big update to the followup patches for DOM types and the profiler integration later today, together with an integration test that tests both the JS and DOM side of things.
Updated•1 year ago
|
| Assignee | ||
Comment 10•11 months ago
|
||
This does not represent the finalized form for a lot of the entries in the
snapshot since some types are still not handled, but this at least lets us
exercise the code paths and ensure future additions don't change the
representations of any existing covered types. I would also like to move
the serialization code here into a module we can include from Firefox and
the profiler frontend but that's for a future patch.
Comment 11•9 months ago
|
||
Comment 12•9 months ago
|
||
Comment 13•9 months ago
•
|
||
Backed out for causing build bustages @ ExecutionTracer.h
Backout link: https://hg.mozilla.org/integration/autoland/rev/ab1f4f1be64dbebcb4fee3868a4ff130ee397965
Comment 14•9 months ago
|
||
Comment 15•9 months ago
|
||
Comment 16•9 months ago
|
||
Backed out for causing failures at test_feature_java.js
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/22eb2254b7a90581851991892a7e870156aed4ed
Failure log: https://treeherder.mozilla.org/logviewer?job_id=518798628&repo=autoland&lineNumber=1817
Comment 17•9 months ago
|
||
Comment 18•9 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5f32c9dda3cd
https://hg.mozilla.org/mozilla-central/rev/b8d87d0224c2
https://hg.mozilla.org/mozilla-central/rev/b4948b0d58b3
https://hg.mozilla.org/mozilla-central/rev/0c7eeec56eab
| Assignee | ||
Updated•9 months ago
|
Updated•8 months ago
|
Description
•