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

Issue 2585433003: [wrapper-tracing] Reduce marking overhead: Tri-color marking without 3 colors (Closed)

Created:
4 years ago by Michael Lippautz
Modified:
4 years ago
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), blink-reviews-bindings_chromium.org, blink-reviews, kouhei+heap_chromium.org, jochen (gone - plz use gerrit), Marcel Hlopko
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[wrapper-tracing] Reduce marking overhead: Tri-color marking without 3 colors This CL implements marking very similar to tri-color marking, with the difference to standard GC literature being that the grey state is being made explicit. The colors are logically represented by the tuple (color, in_marking_deque): - white: (0, false) - grey: (1, true) - black: (1, false) This works because there is currently no need to query whether an object is grey as we don't need a path to recover from e.g. a marking deque overflow. Performance for known regressions: - blink.perf_bindings structured-clone-long-string-serialize: -17% instead of +17% - speedometer: Reducing marking deque pushes from 3.3M to 1.7M. This is means that ~50% of all marking deque pushes were duplicates. BUG=chromium:468240, chromium:667811, chromium:669188 Committed: https://crrev.com/4f161eac0b1f1b76ef9cd36de5a6dce3c9002a71 Cr-Commit-Position: refs/heads/master@{#440074}

Patch Set 1 #

Patch Set 2 : Remove profiling prints #

Total comments: 11

Patch Set 3 : Addressed comments #

Total comments: 8

Patch Set 4 : Addressed comments #

Patch Set 5 : Fix test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -36 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h View 1 2 3 1 chunk +12 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/GarbageCollected.h View 1 2 3 2 chunks +42 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/TraceTraits.h View 1 2 3 3 chunks +40 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/WrapperVisitor.h View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 35 (21 generated)
Michael Lippautz
PTAL Also added Ulan/Hannes for further GC expertise. https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/platform/heap/GarbageCollected.h File third_party/WebKit/Source/platform/heap/GarbageCollected.h (right): https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/platform/heap/GarbageCollected.h#newcode116 third_party/WebKit/Source/platform/heap/GarbageCollected.h:116: void ...
4 years ago (2016-12-20 15:10:31 UTC) #10
Michael Lippautz
Forgot to mention: This is to be landed after the flag switch, to properly track ...
4 years ago (2016-12-20 15:11:08 UTC) #11
Hannes Payer (out of office)
lgtm https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h (right): https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h#newcode144 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h:144: // be in a non-construction state. Also leave ...
4 years ago (2016-12-20 15:30:34 UTC) #12
ulan
lgtm, maybe also add a check to pushMarkingDeque that the object header is marked.
4 years ago (2016-12-20 15:35:43 UTC) #13
Michael Lippautz
https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h (right): https://codereview.chromium.org/2585433003/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h#newcode144 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h:144: // be in a non-construction state. On 2016/12/20 15:30:33, ...
4 years ago (2016-12-20 15:57:23 UTC) #14
Michael Lippautz
On 2016/12/20 15:35:43, ulan wrote: > lgtm, maybe also add a check to pushMarkingDeque that ...
4 years ago (2016-12-20 15:58:10 UTC) #15
haraken
LGTM https://codereview.chromium.org/2585433003/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h (right): https://codereview.chromium.org/2585433003/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h#newcode145 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h:145: ->pushToMarkingDeque(TraceTrait<T>::markAndTraceWrapper, I don't have any strong opinion about ...
4 years ago (2016-12-21 01:38:37 UTC) #17
Michael Lippautz
https://codereview.chromium.org/2585433003/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h (right): https://codereview.chromium.org/2585433003/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h#newcode145 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h:145: ->pushToMarkingDeque(TraceTrait<T>::markAndTraceWrapper, On 2016/12/21 01:38:37, haraken wrote: > > I ...
4 years ago (2016-12-21 09:31:08 UTC) #18
haraken
On 2016/12/21 09:31:08, Michael Lippautz wrote: > https://codereview.chromium.org/2585433003/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h > File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h > (right): > > ...
4 years ago (2016-12-21 09:51:52 UTC) #23
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/2585433003/80001
4 years ago (2016-12-21 10:55:07 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-21 12:30:31 UTC) #31
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/4f161eac0b1f1b76ef9cd36de5a6dce3c9002a71 Cr-Commit-Position: refs/heads/master@{#440074}
4 years ago (2016-12-21 12:32:47 UTC) #33
agrieve
On 2016/12/21 12:32:47, commit-bot: I haz the power wrote: > Patchset 5 (id:??) landed as ...
4 years ago (2016-12-21 19:59:51 UTC) #34
Michael Lippautz
4 years ago (2016-12-22 08:24:07 UTC) #35
Message was sent while issue was closed.
On 2016/12/21 19:59:51, agrieve wrote:
> On 2016/12/21 12:32:47, commit-bot: I haz the power wrote:
> > Patchset 5 (id:??) landed as
> > https://crrev.com/4f161eac0b1f1b76ef9cd36de5a6dce3c9002a71
> > Cr-Commit-Position: refs/heads/master@{#440074}
> 
> FYI - this added 20kb to libchrome.so on Android. No action required, just
> wanted to annotate the commit with this fact (unless you can think of an
obvious
> way to reduce the overhead).
>
https://chromeperf.appspot.com/report?sid=a1a758ce61ac3a6d21c8ca8f5ea0a043a2a...

Thanks! https://codereview.chromium.org/2595053002/ should recover and even
reduce the overhead. Turns out we don't need those paths anymore. Cannot promise
for the long run though.

Powered by Google App Engine
This is Rietveld 408576698