Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Issue 2625093002: [wrapper-tracing] Add heap snapshot generator infrastructure (Closed)

Created:
3 years, 11 months ago by Michael Lippautz
Modified:
3 years, 11 months ago
CC:
Marcel Hlopko, blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[wrapper-tracing] Add heap snapshot generator infrastructure Register a callback with V8's heap profiler that can be used to query all RetainedObjectInfo_s for a given Isolate. Basically, we create RetainedObjectInfo_s for DOM trees (attached and detached) and pending activities and assign all found wrappers to these info objects. BUG=chromium:679724 Review-Url: https://codereview.chromium.org/2625093002 Cr-Commit-Position: refs/heads/master@{#445372} Committed: https://chromium.googlesource.com/chromium/src/+/a34d185b3e31187fb8aa16b700e5837e9636cba9

Patch Set 1 #

Patch Set 2 : Move the scope to V8PerIsolateData #

Total comments: 2

Patch Set 3 : Add processing of DOM trees #

Patch Set 4 : Fix leftover #

Total comments: 18

Patch Set 5 : Rework and address comments #

Total comments: 35

Patch Set 6 : Addressed comments #

Total comments: 4

Patch Set 7 : Addressed comments #

Patch Set 8 : Also trace through empty ScriptWrappable #

Patch Set 9 : Rebase and fix CHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -5 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h View 1 2 3 4 4 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCController.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp View 1 2 3 4 5 6 7 2 chunks +136 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (26 generated)
Michael Lippautz
ptal V8: https://codereview.chromium.org/2627033002/ It's not yet complete, i.e., it only returns the infos for the ...
3 years, 11 months ago (2017-01-11 10:29:07 UTC) #5
Michael Lippautz
(Side note: I am actually quite happy to see how flexible the tracing infra is ...
3 years, 11 months ago (2017-01-11 10:33:21 UTC) #9
haraken
The approach looks good, although TemporaryScriptWrappableVisitorScope looks weird. Can we implement a stack of ScriptWrappableVisitor ...
3 years, 11 months ago (2017-01-11 12:22:24 UTC) #10
Michael Lippautz
On 2017/01/11 12:22:24, haraken wrote: > The approach looks good, although TemporaryScriptWrappableVisitorScope looks > weird. ...
3 years, 11 months ago (2017-01-11 12:29:46 UTC) #11
Michael Lippautz
On 2017/01/11 12:29:46, Michael Lippautz (OOO) wrote: > On 2017/01/11 12:22:24, haraken wrote: > > ...
3 years, 11 months ago (2017-01-11 12:36:30 UTC) #12
haraken
On 2017/01/11 12:29:46, Michael Lippautz (OOO) wrote: > On 2017/01/11 12:22:24, haraken wrote: > > ...
3 years, 11 months ago (2017-01-11 12:37:42 UTC) #13
Marcel Hlopko
Did you consider bringing back the reporter?
3 years, 11 months ago (2017-01-11 12:41:38 UTC) #15
Michael Lippautz
On 2017/01/11 12:41:38, Marcel Hlopko wrote: > Did you consider bringing back the reporter? Yes, ...
3 years, 11 months ago (2017-01-11 13:29:55 UTC) #16
Michael Lippautz
Updated the TemporaryScriptWrappableVisitorScope.
3 years, 11 months ago (2017-01-11 13:30:20 UTC) #17
jochen (gone - plz use gerrit)
lgtm
3 years, 11 months ago (2017-01-12 08:31:46 UTC) #18
haraken
On 2017/01/12 08:31:46, jochen wrote: > lgtm I think you need to implement V8GCController::getRetainerInfos, right?
3 years, 11 months ago (2017-01-12 08:32:44 UTC) #19
alph
lgtm https://codereview.chromium.org/2625093002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode198 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:198: mutable WTF::HashSet<const v8::PersistentBase<v8::Value>*> m_foundV8Wrappers; I wonder why not ...
3 years, 11 months ago (2017-01-12 08:59:00 UTC) #20
Michael Lippautz
haraken: PTAL; All implemented now. https://codereview.chromium.org/2625093002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode198 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:198: mutable WTF::HashSet<const v8::PersistentBase<v8::Value>*> m_foundV8Wrappers; ...
3 years, 11 months ago (2017-01-12 12:23:19 UTC) #21
haraken
LGTM with comments. https://codereview.chromium.org/2625093002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode54 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:54: #include <unordered_set> Remove this? You're using ...
3 years, 11 months ago (2017-01-12 16:25:18 UTC) #22
Michael Lippautz
On 2017/01/12 16:25:18, haraken wrote: > LGTM with comments. > > https://codereview.chromium.org/2625093002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp > File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp ...
3 years, 11 months ago (2017-01-12 16:40:29 UTC) #23
haraken
On 2017/01/12 16:40:29, Michael Lippautz wrote: > On 2017/01/12 16:25:18, haraken wrote: > > LGTM ...
3 years, 11 months ago (2017-01-13 00:36:46 UTC) #24
Michael Lippautz
Please take another look. The implementation changed quite substantially. I will update the V8 side ...
3 years, 11 months ago (2017-01-13 15:08:41 UTC) #26
haraken
https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode175 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:175: m_nodesRequiringTracing[root].push_back(node); Why don't you need to push Nodes that ...
3 years, 11 months ago (2017-01-16 02:46:57 UTC) #27
Michael Lippautz
Thanks, addressed comments and answered questions. https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode175 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:175: m_nodesRequiringTracing[root].push_back(node); On 2017/01/16 ...
3 years, 11 months ago (2017-01-16 10:45:06 UTC) #28
Michael Lippautz
https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode279 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:279: isolate->VisitHandlesWithClassIds(&tracer); On 2017/01/16 02:46:56, haraken wrote: > > Nit: ...
3 years, 11 months ago (2017-01-16 10:51:01 UTC) #29
Marcel Hlopko
LGTM, I like how this ended up looking! Thank you Michael.
3 years, 11 months ago (2017-01-16 11:58:13 UTC) #30
haraken
Mostly looks good. Do you think that this feature is well tested in the layout ...
3 years, 11 months ago (2017-01-16 12:48:13 UTC) #31
Michael Lippautz
Test coverage is ok as no existing tests are disabled. We currently generate snapshots using ...
3 years, 11 months ago (2017-01-16 13:15:38 UTC) #32
haraken
LGTM with comments. https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode228 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:228: } On 2017/01/16 13:15:38, Michael Lippautz ...
3 years, 11 months ago (2017-01-17 00:31:26 UTC) #33
Michael Lippautz
https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode228 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:228: } On 2017/01/17 00:31:25, haraken wrote: > On 2017/01/16 ...
3 years, 11 months ago (2017-01-17 09:15:32 UTC) #34
haraken
LGTM! https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/2625093002/diff/90001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode228 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:228: } On 2017/01/17 09:15:32, Michael Lippautz wrote: > ...
3 years, 11 months ago (2017-01-17 09:22:42 UTC) #35
Michael Lippautz
Alright, due to API changes this will all happen after the branch cut, thanks.
3 years, 11 months ago (2017-01-17 16:14:51 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2625093002/170001
3 years, 11 months ago (2017-01-23 13:19:41 UTC) #52
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 13:24:33 UTC) #55
Message was sent while issue was closed.
Committed patchset #9 (id:170001) as
https://chromium.googlesource.com/chromium/src/+/a34d185b3e31187fb8aa16b700e5...

Powered by Google App Engine
This is Rietveld 408576698