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

Issue 525353002: [oilpan]: optimize the way we allocate persistent handles in wrappers. (Closed)

Created:
6 years, 3 months ago by wibling-chromium
Modified:
6 years, 3 months ago
CC:
blink-reviews, vsevik+blink_chromium.org, caseq+blink_chromium.org, arv+blink, Mads Ager (chromium), eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, abarth-chromium, loislo+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, blink-reviews-bindings_chromium.org, devtools-reviews_chromium.org, haraken, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org, kouhei+heap_chromium.org, pasko
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[oilpan]: optimize the way we allocate persistent handles in wrappers. The oilpan JS wrappers all have a persistent which is used to keep the wrapped object around while there is a javascript reference to it. Allocation of these wrapper persistents showed up in some of benchmarks. This change creates a new optimized WrapperPersistent which is allocated in blocks. This gives a speedup ranging between a few percent to 20% in some of the more wrapper intensive tests. R=ager@chromium.org, haraken@chromium.org, oilpan-reviews@chromium.org, zerny@chromium.org BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181298

Patch Set 1 #

Total comments: 48

Patch Set 2 : review feedback #

Total comments: 2

Patch Set 3 : short copyright header #

Total comments: 12

Patch Set 4 : more review feedback #

Total comments: 14

Patch Set 5 : fix component build #

Patch Set 6 : more review feedback #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+431 lines, -80 lines) Patch
M Source/bindings/core/v8/NPV8Object.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8DOMWrapper.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/core/v8/WrapperTypeInfo.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/core/v8/custom/V8ArrayBufferCustom.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8ArrayBufferCustom.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp View 1 1 chunk +5 lines, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8TypedArrayCustom.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/templates/interface.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.cpp View 1 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8SVGTestInterface.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8SVGTestInterface.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestException.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestException.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface3.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface3.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor4.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor4.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNotScriptWrappable.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNotScriptWrappable.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InjectedScriptManager.h View 1 chunk +10 lines, -1 line 0 comments Download
M Source/core/inspector/InjectedScriptManager.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M Source/platform/heap/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/heap/Handle.h View 1 2 3 4 5 1 chunk +201 lines, -0 lines 3 comments Download
A Source/platform/heap/Handle.cpp View 1 2 3 4 5 1 chunk +74 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 5 3 chunks +12 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 chunks +43 lines, -1 line 0 comments Download
M Source/platform/heap/blink_heap.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (3 generated)
wibling-chromium
6 years, 3 months ago (2014-09-01 12:47:56 UTC) #1
Erik Corry
https://codereview.chromium.org/525353002/diff/1/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://codereview.chromium.org/525353002/diff/1/Source/platform/heap/Handle.h#newcode237 Source/platform/heap/Handle.h:237: void* allocate() I think you want this to be ...
6 years, 3 months ago (2014-09-01 13:40:41 UTC) #3
Mads Ager (chromium)
https://codereview.chromium.org/525353002/diff/1/Source/core/inspector/InjectedScriptManager.cpp File Source/core/inspector/InjectedScriptManager.cpp (right): https://codereview.chromium.org/525353002/diff/1/Source/core/inspector/InjectedScriptManager.cpp#newcode48 Source/core/inspector/InjectedScriptManager.cpp:48: if (hostPtr) No need to check, delete ignores null ...
6 years, 3 months ago (2014-09-01 13:52:46 UTC) #4
zerny-chromium
A quick comment in passing. https://codereview.chromium.org/525353002/diff/1/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp File Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp (right): https://codereview.chromium.org/525353002/diff/1/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp#newcode78 Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp:78: callbackData->host = host.get(); Is ...
6 years, 3 months ago (2014-09-01 14:13:37 UTC) #5
haraken
Looks like a nice change. https://codereview.chromium.org/525353002/diff/1/Source/core/inspector/InjectedScriptManager.h File Source/core/inspector/InjectedScriptManager.h (right): https://codereview.chromium.org/525353002/diff/1/Source/core/inspector/InjectedScriptManager.h#newcode53 Source/core/inspector/InjectedScriptManager.h:53: WrapperPersistent<InjectedScriptHost>* hostPtr; InjectedScriptManager is ...
6 years, 3 months ago (2014-09-02 05:22:06 UTC) #6
wibling-chromium
Thanks for the reviews! I have updated the patch with the feedback and replied inline ...
6 years, 3 months ago (2014-09-02 11:19:38 UTC) #7
Mads Ager (chromium)
LGTM, let's give this a spin on the perf bots and see how well this ...
6 years, 3 months ago (2014-09-02 11:45:49 UTC) #8
wibling-chromium
Thanks for the review! https://codereview.chromium.org/525353002/diff/20001/Source/platform/heap/Handle.cpp File Source/platform/heap/Handle.cpp (right): https://codereview.chromium.org/525353002/diff/20001/Source/platform/heap/Handle.cpp#newcode2 Source/platform/heap/Handle.cpp:2: * Copyright (C) 2014 Google ...
6 years, 3 months ago (2014-09-02 11:54:25 UTC) #9
haraken
LGTM (Though I still think that it would be better to just use Deque<OwnPtr> for ...
6 years, 3 months ago (2014-09-02 13:00:37 UTC) #10
wibling-chromium
Thanks again for the review! Regarding the Deque there can be quite a bit of ...
6 years, 3 months ago (2014-09-02 13:55:33 UTC) #11
haraken
Just nits. Still LGTM. https://codereview.chromium.org/525353002/diff/60001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://codereview.chromium.org/525353002/diff/60001/Source/platform/heap/Handle.h#newcode189 Source/platform/heap/Handle.h:189: ASSERT(m_regionOffset && !isAlive()); It's better ...
6 years, 3 months ago (2014-09-02 14:53:51 UTC) #12
wibling-chromium
Thanks for the review and the help with the component build! I have added a ...
6 years, 3 months ago (2014-09-03 07:51:42 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wibling@chromium.org/525353002/100001
6 years, 3 months ago (2014-09-03 07:52:47 UTC) #15
zerny-chromium
Was much easier to read second time through! lgtm.
6 years, 3 months ago (2014-09-03 08:06:46 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 181298
6 years, 3 months ago (2014-09-03 09:07:21 UTC) #17
Fabrice (no longer in Chrome)
Please see the comments below. From reading the comments and the previous patch sets, I ...
6 years, 3 months ago (2014-09-05 18:37:32 UTC) #19
wibling-chromium
6 years, 3 months ago (2014-09-08 09:38:23 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/553483004/ by wibling@chromium.org.

The reason for reverting is: Reverting due to browser test failures..

Powered by Google App Engine
This is Rietveld 408576698