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

Issue 2652923002: Devirtualize Visitor and remove inline visitor specialization. (Closed)

Created:
3 years, 11 months ago by sof
Modified:
3 years, 11 months ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), mlamouri+watch-blink_chromium.org, sof, eae+blinkwatch, dcheng, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, blink-reviews, kinuko+watch, kouhei+heap_chromium.org, blink-reviews-api_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Devirtualize Visitor and remove inline visitor specialization. The Blink GC infrastructure requires its managed objects to provide a "trace()" method which will visit all the heap references it keeps into the Blink GC heap, by calling the "trace()" method on each of these via an incoming |visitor| argument (a Visitor.) The Visitor interface is really only used for that, i.e., to perform GC marking, so the flexibility it provides by way of overridable virtual methods, is unused. And it slows down the GC marking phase, something the specialized "inline visitor" (InlineGlobalMarkingVisitor) demonstrated, which devirtualized the mark() method, with noticable improvements to overall GC marking times. Given that and Visitor's use, devirtualize Visitor entirely and make it a GC marking visitor and nothing else. Besides removing code complexity, this also allows the removal of InlineGlobalMarkingVisitor along with all the specialized trace() implementation methods that we emit for each Blink GC managed object. Performance numbers show a ~10% improvement on marking times for oilpan_gc_times.{tough_animation_cases, blink_perf_stress}; code size (Android(ARM) official build, content shell) is 180k less. R= BUG=683019 Review-Url: https://codereview.chromium.org/2652923002 Cr-Commit-Position: refs/heads/master@{#445993} Committed: https://chromium.googlesource.com/chromium/src/+/66ac8d1a05c988aa07a1da9e1613c83ccdc304ad

Patch Set 1 #

Total comments: 4

Patch Set 2 : rename type alias #

Patch Set 3 : tidy #

Patch Set 4 : type renamed #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -688 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperty.h View 1 chunk +0 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StaticNodeList.h View 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoaderClient.h View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/BUILD.gn View 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/GarbageCollected.h View 3 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Handle.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.h View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 2 chunks +24 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapPage.h View 1 4 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapPage.cpp View 1 3 chunks +32 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapTest.cpp View 8 chunks +39 lines, -224 lines 0 comments Download
D third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h View 1 chunk +0 lines, -60 lines 0 comments Download
D third_party/WebKit/Source/platform/heap/MarkingVisitor.h View 1 chunk +0 lines, -62 lines 0 comments Download
D third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h View 1 chunk +0 lines, -124 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Member.h View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/RunAllTests.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/TraceTraits.h View 3 chunks +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Visitor.h View 11 chunks +75 lines, -148 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Visitor.cpp View 3 chunks +7 lines, -3 lines 0 comments Download
A third_party/WebKit/Source/platform/heap/VisitorImpl.h View 1 chunk +137 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/OpenedFrameTracker.h View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/OpenedFrameTracker.cpp View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrame.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebMemoryStatistics.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/web/WebFrame.h View 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (21 generated)
sof
please take a look. I think it is acceptable to just remove the two HeapTest ...
3 years, 11 months ago (2017-01-24 09:13:26 UTC) #6
haraken
LGTM, great simplification! https://codereview.chromium.org/2652923002/diff/1/third_party/WebKit/Source/platform/heap/Heap.h File third_party/WebKit/Source/platform/heap/Heap.h (right): https://codereview.chromium.org/2652923002/diff/1/third_party/WebKit/Source/platform/heap/Heap.h#newcode707 third_party/WebKit/Source/platform/heap/Heap.h:707: #include "platform/heap/VisitorImpl.h" It looks weird to ...
3 years, 11 months ago (2017-01-25 06:14:08 UTC) #10
sof
https://codereview.chromium.org/2652923002/diff/1/third_party/WebKit/Source/platform/heap/Heap.h File third_party/WebKit/Source/platform/heap/Heap.h (right): https://codereview.chromium.org/2652923002/diff/1/third_party/WebKit/Source/platform/heap/Heap.h#newcode707 third_party/WebKit/Source/platform/heap/Heap.h:707: #include "platform/heap/VisitorImpl.h" On 2017/01/25 06:14:08, haraken wrote: > > ...
3 years, 11 months ago (2017-01-25 06:25:24 UTC) #11
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/2652923002/40001
3 years, 11 months ago (2017-01-25 07:47:54 UTC) #18
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/2652923002/60001
3 years, 11 months ago (2017-01-25 08:00:01 UTC) #21
sof
Removing the DEFINE_TRACE() et al macros from the codebase is an option if this one ...
3 years, 11 months ago (2017-01-25 08:03:19 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/309550)
3 years, 11 months ago (2017-01-25 08:12:11 UTC) #24
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/2652923002/80001
3 years, 11 months ago (2017-01-25 08:25:43 UTC) #27
haraken
On 2017/01/25 08:03:19, sof wrote: > Removing the DEFINE_TRACE() et al macros from the codebase ...
3 years, 11 months ago (2017-01-25 08:55:39 UTC) #28
commit-bot: I haz the power
3 years, 11 months ago (2017-01-25 10:21:07 UTC) #31
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/66ac8d1a05c988aa07a1da9e1613...

Powered by Google App Engine
This is Rietveld 408576698