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

Issue 651713002: Oilpan: DOM wrappers don't need to keep persistent handles (Closed)

Created:
6 years, 2 months ago by haraken
Modified:
6 years, 2 months ago
CC:
blink-reviews, caseq+blink_chromium.org, paulirish+reviews_chromium.org, loislo+blink_chromium.org, Mads Ager (chromium), eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, mkwst+moarreviews_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, arv+blink, blink-reviews-bindings_chromium.org, devtools-reviews_chromium.org, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org, kouhei+heap_chromium.org
Project:
blink
Visibility:
Public.

Description

Oilpan: DOM wrappers don't need to keep persistent handles DOM wrappers don't need to create persistent handles to keep corresponding DOM objects alive. Given that V8 already knows a list of DOM wrappers, we can just iterate the DOM wrappers and trace corresponding DOM objects. The key change of this CL is in V8GCController.cpp. V8GCController::traceDOMWrappers is called in ThreadState::visitPersistents. V8GCController::traceDOMWrappers iterates all DOM wrappers using v8::PersistentHandleVisitor and traces corresponding DOM objects. This CL significantly improves performance of various benchmarks in oilpan. query-selector-*.html: ~32% better create-element.html: 15% better indexed-getter.html: 26% better usr-parser.html: 13% better ... Also this CL removes a lot of complexity from the code base, e.g., WrapperPersistentNode, setNativeInfoWithPersistentHandle, setNativeInfoForHiddenWrapper etc. BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183944

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -793 lines) Patch
M Source/bindings/core/v8/NPV8Object.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M Source/bindings/core/v8/ScriptProfiler.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8DOMWrapper.h View 5 chunks +3 lines, -70 lines 0 comments Download
M Source/bindings/core/v8/V8DOMWrapper.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8GCController.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/V8GCController.cpp View 1 2 3 4 5 6 2 chunks +33 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/WindowProxy.cpp View 1 2 2 chunks +2 lines, -10 lines 0 comments Download
M Source/bindings/core/v8/WorkerScriptController.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/core/v8/WrapperTypeInfo.h View 4 chunks +6 lines, -29 lines 0 comments Download
M Source/bindings/core/v8/custom/V8ArrayBufferCustom.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8ArrayBufferCustom.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp View 1 chunk +0 lines, -8 lines 0 comments Download
M Source/bindings/core/v8/custom/V8TypedArrayCustom.h View 3 chunks +3 lines, -5 lines 0 comments Download
M Source/bindings/templates/interface.h View 2 chunks +10 lines, -13 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 5 6 7 2 chunks +1 line, -18 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8SVGTestInterface.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestException.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestException.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface3.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface3.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 6 7 3 chunks +2 lines, -8 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceDocument.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 2 chunks +1 line, -11 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEmpty.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp View 1 2 3 4 5 6 7 2 chunks +1 line, -11 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp View 3 chunks +2 lines, -12 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h View 1 chunk +5 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 3 chunks +2 lines, -8 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 3 chunks +2 lines, -8 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNode.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 2 chunks +1 line, -11 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNotScriptWrappable.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNotScriptWrappable.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp View 3 chunks +2 lines, -12 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestNode.h View 1 chunk +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestNode.cpp View 2 chunks +1 line, -11 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperations.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestTypedefs.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestTypedefs.cpp View 2 chunks +1 line, -7 lines 0 comments Download
M Source/bindings/tests/results/modules/V8TestInterface5.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M Source/core/inspector/InjectedScriptManager.h View 1 chunk +1 line, -10 lines 0 comments Download
M Source/core/inspector/InjectedScriptManager.cpp View 1 chunk +0 lines, -7 lines 0 comments Download
M Source/platform/heap/BUILD.gn View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/heap/Handle.h View 1 2 3 4 5 6 1 chunk +0 lines, -193 lines 0 comments Download
D Source/platform/heap/Handle.cpp View 1 chunk +0 lines, -77 lines 0 comments Download
M Source/platform/heap/RunAllTests.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 5 6 7 6 chunks +13 lines, -12 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 6 chunks +4 lines, -46 lines 0 comments Download
M Source/platform/heap/blink_heap.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M Source/web/WebKit.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
haraken
PTAL
6 years, 2 months ago (2014-10-12 04:03:15 UTC) #2
sof
lgtm, considerable simplifications made indeed; impressive. (I notice there's one ServiceWorker failure still to contend ...
6 years, 2 months ago (2014-10-12 20:40:43 UTC) #3
tkent
lgtm https://codereview.chromium.org/651713002/diff/1000001/Source/bindings/core/v8/V8GCController.h File Source/bindings/core/v8/V8GCController.h (right): https://codereview.chromium.org/651713002/diff/1000001/Source/bindings/core/v8/V8GCController.h#newcode34 Source/bindings/core/v8/V8GCController.h:34: #include "platform/heap/Handle.h" nit: "class Visitor;" looks enough. https://codereview.chromium.org/651713002/diff/1000001/Source/platform/heap/ThreadState.cpp ...
6 years, 2 months ago (2014-10-15 03:48:36 UTC) #5
haraken
Still investigating the failure of request.html. It looks like we sometimes miss tracing live DOM ...
6 years, 2 months ago (2014-10-15 05:50:18 UTC) #6
haraken
Finally I found the cause of the crash... https://codereview.chromium.org/651713002/diff/1000001/Source/bindings/core/v8/V8GCController.cpp File Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/651713002/diff/1000001/Source/bindings/core/v8/V8GCController.cpp#newcode486 Source/bindings/core/v8/V8GCController.cpp:486: v8::V8::VisitHandlesWithClassIds(&tracer); ...
6 years, 2 months ago (2014-10-15 10:43:05 UTC) #7
haraken
On 2014/10/15 10:43:05, haraken wrote: > Finally I found the cause of the crash... > ...
6 years, 2 months ago (2014-10-17 00:47:09 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/651713002/1080001
6 years, 2 months ago (2014-10-18 08:09:58 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/29827)
6 years, 2 months ago (2014-10-18 08:34:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/651713002/1100001
6 years, 2 months ago (2014-10-18 11:07:50 UTC) #14
commit-bot: I haz the power
6 years, 2 months ago (2014-10-18 12:19:10 UTC) #15
Message was sent while issue was closed.
Committed patchset #8 (id:1100001) as 183944

Powered by Google App Engine
This is Rietveld 408576698