WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155188
Web Inspector: Add a way to create a Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=155188
Summary
Web Inspector: Add a way to create a Heap Snapshot
Joseph Pecoraro
Reported
2016-03-08 13:25:25 PST
* SUMMARY Add a way to create a Heap Snapshot. HeapAgent.snapshot => (error, timestamp, snapshotData)
Attachments
[PATCH] Proposed Fix
(23.11 KB, patch)
2016-03-08 13:28 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(23.98 KB, patch)
2016-03-08 13:42 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(24.02 KB, patch)
2016-03-08 13:53 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(24.02 KB, patch)
2016-03-08 14:26 PST
,
Joseph Pecoraro
bburg
: review+
Details
Formatted Diff
Diff
[PATCH] For Landing
(24.08 KB, patch)
2016-03-08 16:47 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-03-08 13:26:01 PST
<
rdar://problem/25042222
>
Joseph Pecoraro
Comment 2
2016-03-08 13:28:25 PST
Created
attachment 273322
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 3
2016-03-08 13:42:58 PST
Created
attachment 273324
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 4
2016-03-08 13:53:28 PST
Created
attachment 273334
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 5
2016-03-08 14:26:12 PST
Created
attachment 273341
[details]
[PATCH] Proposed Fix
Blaze Burg
Comment 6
2016-03-08 16:39:56 PST
Comment on
attachment 273341
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=273341&action=review
very clean. r=me
> LayoutTests/inspector/heap/snapshot.html:22 > + resolve();
I'm assuming these magic numbers come from builtins / injected scripts?
> Source/JavaScriptCore/inspector/protocol/Heap.json:18 > + "type": "string"
I am tempted to add JSON and base64 to the protocol, if we add more uses (which we will).
> Source/WebInspectorUI/UserInterface/Models/HeapSnapshot.js:88 > + let nodePayload = nodes[i];
I assume this loop body is what led you to complain about slow array restructuring.
> Source/WebInspectorUI/UserInterface/Models/HeapSnapshot.js:116 > + console.assert(rootNode, "Node with identifier 0 is the artificial <root> node.");
s/artificial/synthetic/
> Source/WebInspectorUI/UserInterface/Models/HeapSnapshotEdge.js:30 > + this.from = from;
Might be worth adding a comment saying this is a directed edge between two HeapSnapshotNodes, 'to' and 'from'. Adding assertions to that effect is probably a perf problem.
Joseph Pecoraro
Comment 7
2016-03-08 16:43:52 PST
Comment on
attachment 273341
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=273341&action=review
>> LayoutTests/inspector/heap/snapshot.html:22 >> + resolve(); > > I'm assuming these magic numbers come from builtins / injected scripts?
Nope, the magic numbers are just low ball estimates to ensure they are not 0. The heap size should be at least 1kb for a page, with at least 100 objects (all the builtin APIs), and at least one "Window".
>> Source/JavaScriptCore/inspector/protocol/Heap.json:18 >> + "type": "string" > > I am tempted to add JSON and base64 to the protocol, if we add more uses (which we will).
Yeah, I considered this! Worth adding in the future for sure.
>> Source/WebInspectorUI/UserInterface/Models/HeapSnapshot.js:88 >> + let nodePayload = nodes[i]; > > I assume this loop body is what led you to complain about slow array restructuring.
Correct.
>> Source/WebInspectorUI/UserInterface/Models/HeapSnapshotEdge.js:30 >> + this.from = from; > > Might be worth adding a comment saying this is a directed edge between two HeapSnapshotNodes, 'to' and 'from'. Adding assertions to that effect is probably a perf problem.
Yes, adding an assert was a performance problem.
Joseph Pecoraro
Comment 8
2016-03-08 16:47:48 PST
Created
attachment 273367
[details]
[PATCH] For Landing
WebKit Commit Bot
Comment 9
2016-03-08 17:38:30 PST
Comment on
attachment 273367
[details]
[PATCH] For Landing Clearing flags on attachment: 273367 Committed
r197822
: <
http://trac.webkit.org/changeset/197822
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug