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

Issue 1944363002: Use a new type of weak phantom handle for ScriptWrappable. (Closed)

Created:
4 years, 7 months ago by ulan
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, dominicc (has gone to gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use a new type of weak phantom handle for ScriptWrappable. The new phantom handle does not require a callback and is reset automatically by the garbage collector. Since we do not have finalization callback anymore, we account for the freed wrappers in GC epilogue by using a new V8 API function. This drastically reduces time spent in callback handling phases of V8 GC on v8.infinite_scroll benchmark. See the related CL in V8 for more motivation and results: https://codereview.chromium.org/1950963002 BUG=608333 Committed: https://crrev.com/b19982c4431d0e8994b74992727e05cfb2e4ce37 Cr-Commit-Position: refs/heads/master@{#392613}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Unindent #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -18 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h View 2 chunks +1 line, -18 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp View 1 1 chunk +13 lines, -0 lines 2 comments Download

Messages

Total messages: 21 (10 generated)
ulan
ptal
4 years, 7 months ago (2016-05-04 14:07:53 UTC) #5
haraken
Thanks for working on this! LGTM. https://codereview.chromium.org/1944363002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/1944363002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode320 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:320: void UpdateCollectedPhantomHandles(v8::Isolate* isolate) ...
4 years, 7 months ago (2016-05-04 14:10:34 UTC) #6
ulan
Thanks for reviewing so quickly. https://codereview.chromium.org/1944363002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/1944363002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode320 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:320: void UpdateCollectedPhantomHandles(v8::Isolate* isolate) On ...
4 years, 7 months ago (2016-05-04 14:17:03 UTC) #7
jochen (gone - plz use gerrit)
lgtm
4 years, 7 months ago (2016-05-04 14:50:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944363002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944363002/20001
4 years, 7 months ago (2016-05-10 10:41:56 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/224918)
4 years, 7 months ago (2016-05-10 12:18:12 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944363002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944363002/20001
4 years, 7 months ago (2016-05-10 12:44:58 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-10 15:28:26 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/b19982c4431d0e8994b74992727e05cfb2e4ce37 Cr-Commit-Position: refs/heads/master@{#392613}
4 years, 7 months ago (2016-05-10 15:29:46 UTC) #19
dominicc (has gone to gerrit)
https://codereview.chromium.org/1944363002/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/1944363002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode324 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:324: heapStats.decreaseWrapperCount(count); Does this mean that phantom handles should *only* ...
4 years, 7 months ago (2016-05-11 03:38:30 UTC) #20
haraken
4 years, 7 months ago (2016-05-11 03:48:39 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/1944363002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right):

https://codereview.chromium.org/1944363002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:324:
heapStats.decreaseWrapperCount(count);
On 2016/05/11 03:38:30, dominicc wrote:
> Does this mean that phantom handles should *only* be used for wrappers, once
per
> wrapper?

Not really. heapStats.decreaseWrapperCount is just used as a hint to trigger
Oilpan's GCs, so the counter doesn't need to be very accurate.
heapStats.decreaseWrapperCount counts the number of V8 things that will have
references to Oilpan's objects.

Powered by Google App Engine
This is Rietveld 408576698