Add JavaScript memory allocation tracking
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: gregtatum, Assigned: gregtatum)
References
Details
Attachments
(4 files)
This is currently implemented in the DevTool's performance actor. We should try to see if we can tap into this for the Gecko Profiler.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Marking as P3, since it's experimental at this point.
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
I submitted a WIP patch on doing this.
:jimb I had a couple questions on interacting with the JS object in this patch. I have 3 TODO
comments on the js/src/vm/SavedStacks.cpp file I submitted to phabricator. I could use some insight here if you wouldn't mind looking at them.
Assignee | ||
Comment 4•6 years ago
|
||
I did more investigations, and it turns out the UbiNode class has a lot of the utilities to extract the information I need. I'm going to try that approach instead.
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
The current revision is accepted, but I found out that I didn't hook into the JS engine correctly. The issue is that I'm only instrumenting the current Realm that is active when the profiler is turned on, and I need to be able to instrument any new Realm that gets added. I'm going to rework the patch with another approach. Most of it is still valid, except how I hook into the JS engine.
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D28142
Assignee | ||
Comment 7•6 years ago
|
||
Depends on D34543
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D34544
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Backed out 4 changesets for causing build bustages in SavedStacks.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/c945fb0af69583f4a15f8847f23e430b1b8a1d6d
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=251966372&repo=autoland&lineNumber=8695
task 2019-06-14T23:08:56.485Z] 23:08:56 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/js/src/Unified_cpp_js_src19.cpp:38:
[task 2019-06-14T23:08:56.486Z] 23:08:56 ERROR - /builds/worker/workspace/build/src/js/src/vm/SavedStacks.cpp:1895:9: error: non-constant-expression cannot be narrowed from type 'JS::ubi::Node::Size' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
[task 2019-06-14T23:08:56.487Z] 23:08:56 INFO - node.size(cx->runtime()->debuggerMallocSizeOf),
[task 2019-06-14T23:08:56.488Z] 23:08:56 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-06-14T23:08:56.489Z] 23:08:56 INFO - /builds/worker/workspace/build/src/js/src/vm/SavedStacks.cpp:1895:9: note: insert an explicit cast to silence this issue
[task 2019-06-14T23:08:56.489Z] 23:08:56 INFO - node.size(cx->runtime()->debuggerMallocSizeOf),
[task 2019-06-14T23:08:56.490Z] 23:08:56 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-06-14T23:08:56.491Z] 23:08:56 INFO - static_cast<size_t>( )
[task 2019-06-14T23:08:56.492Z] 23:08:56 INFO - 1 error generated.
[task 2019-06-14T23:08:56.493Z] 23:08:56 INFO - /builds/worker/workspace/build/src/config/rules.mk:810: recipe for target 'Unified_cpp_js_src19.o' failed
[task 2019-06-14T23:08:56.494Z] 23:08:56 ERROR - make[4]: *** [Unified_cpp_js_src19.o] Error 1
[task 2019-06-14T23:08:56.495Z] 23:08:56 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src'
[task 2019-06-14T23:08:56.496Z] 23:08:56 INFO - make[4]: *** Waiting for unfinished jobs....
Assignee | ||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Backed out 4 changesets (bug 1545582) for causing spidermonkey bustages CLOSED TREE
backout: https://hg.mozilla.org/integration/autoland/rev/779795f21006afeb34681461fd2a447b896f6efd
Assignee | ||
Updated•6 years ago
|
Comment 17•6 years ago
|
||
![]() |
||
Comment 18•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aaea4c45935f
https://hg.mozilla.org/mozilla-central/rev/c9cba85e0b62
https://hg.mozilla.org/mozilla-central/rev/3c4bfd4d4015
https://hg.mozilla.org/mozilla-central/rev/44349fd95ae4
Description
•