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

Issue 765673004: Oilpan: support eager tracing of objects when marking. (Closed)

Created:
6 years ago by sof
Modified:
6 years ago
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Oilpan: support eager tracing of objects when marking. This adds support for eager tracing of objects when marking. That is, instead of pushing an unmarked object's trace callback onto a marker stack for later processing, the trace callback is invoked there & then. This may enable inlining of eager trace() methods at their call sites, leading to potentially faster marking overall. Eager tracing runs counter to the common approach of GC marking passes, where an explicit mark stack is used. The marking phase pushes the trace callbacks of unmarked objects onto this explicit stack, performing instead an iterative deepening traversal of the object graph. This ensures bounded system stack use, and any overflow of the marker stack can be explicitly handled. The use of eager tracing must be carefully considered with respect to the system stack use that it will bring: uncontrollably deep object structures should not be eagerly traced as that will risk overflowing the system stack at little or no gain. The GC does not have a recovery or trapping mechanism against such overflows. To eagerly call trace() over GCed objects at class type T, you declare a specialization of the boolean-valued TraceEagerlyTrait<T> trait. The default is currently not to perform any eager tracing. R=kouhei,haraken BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186355

Patch Set 1 #

Patch Set 2 : Re-introduce TraceEagerly #

Total comments: 17

Patch Set 3 : Support defining traits for class hierarchies + remove TraceEagerly #

Patch Set 4 : For eager tracing, check for cross-heap access #

Total comments: 22

Patch Set 5 : Parameterize MarkingVisitor over its marking mode/kind #

Patch Set 6 : rebased #

Total comments: 13

Patch Set 7 : Tidying up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -88 lines) Patch
M Source/platform/heap/Handle.h View 1 2 3 4 1 chunk +72 lines, -0 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 5 3 chunks +5 lines, -9 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 6 16 chunks +118 lines, -68 lines 0 comments Download
M Source/platform/heap/HeapLinkedStack.h View 2 1 chunk +7 lines, -1 line 0 comments Download
M Source/platform/heap/HeapTerminatedArray.h View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/platform/heap/HeapTest.cpp View 1 2 3 4 5 5 chunks +62 lines, -3 lines 0 comments Download
M Source/platform/heap/Visitor.h View 1 2 3 4 6 chunks +93 lines, -7 lines 0 comments Download

Messages

Total messages: 30 (4 generated)
sof
Please take a look.
6 years ago (2014-11-27 20:35:07 UTC) #2
kouhei (in TOK)
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2052 Source/platform/heap/Heap.cpp:2052: #if ENABLE(ASSERT) Would you describe why we need ENABLE(ASSERT) ...
6 years ago (2014-11-28 01:00:57 UTC) #4
haraken
Thanks for working on this! https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2033 Source/platform/heap/Heap.cpp:2033: virtual bool ensureMarked(const void* ...
6 years ago (2014-11-28 05:20:06 UTC) #6
sof
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2033 Source/platform/heap/Heap.cpp:2033: virtual bool ensureMarked(const void* objectPointer) override On 2014/11/28 05:20:05, ...
6 years ago (2014-11-28 12:05:08 UTC) #7
haraken
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2033 Source/platform/heap/Heap.cpp:2033: virtual bool ensureMarked(const void* objectPointer) override On 2014/11/28 12:05:08, ...
6 years ago (2014-11-28 12:39:27 UTC) #8
sof
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Visitor.h File Source/platform/heap/Visitor.h (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Visitor.h#newcode600 Source/platform/heap/Visitor.h:600: TraceTrait<T>::trace(visitor, const_cast<T*>(t)); On 2014/11/28 12:39:27, haraken wrote: > On ...
6 years ago (2014-11-28 12:44:28 UTC) #9
sof
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Visitor.h File Source/platform/heap/Visitor.h (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Visitor.h#newcode420 Source/platform/heap/Visitor.h:420: template<typename T>void markNoTracing(const T* pointer) { mark(pointer, reinterpret_cast<TraceCallback>(0)); } ...
6 years ago (2014-12-01 10:59:55 UTC) #10
kouhei (in TOK)
lgtm https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2052 Source/platform/heap/Heap.cpp:2052: #if ENABLE(ASSERT) On 2014/11/28 12:05:08, sof wrote: > ...
6 years ago (2014-12-02 00:41:58 UTC) #11
haraken
Thanks for being persistent on this. Hopefully the final comment! https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp#newcode1972 ...
6 years ago (2014-12-02 06:16:05 UTC) #12
sof
https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp#newcode2087 Source/platform/heap/Heap.cpp:2087: if (UNLIKELY(m_checkIfNeedsTracing && !needsTracing(objectPointer))) On 2014/12/02 06:16:04, haraken wrote: ...
6 years ago (2014-12-02 06:19:27 UTC) #13
kouhei (in TOK)
https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/60001/Source/platform/heap/Heap.cpp#newcode1511 Source/platform/heap/Heap.cpp:1511: for (HeapPage<Header>* page = m_firstPage; page; page = page->next()) ...
6 years ago (2014-12-02 06:51:02 UTC) #14
sof
https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/20001/Source/platform/heap/Heap.cpp#newcode2052 Source/platform/heap/Heap.cpp:2052: #if ENABLE(ASSERT) On 2014/12/02 00:41:58, kouhei wrote: > On ...
6 years ago (2014-12-02 09:52:15 UTC) #15
haraken
LGTM with comments! https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2023 Source/platform/heap/Heap.cpp:2023: #endif Can we just write: ASSERT(!pageFromObject(objectPointer)->orphaned()); ...
6 years ago (2014-12-02 15:35:10 UTC) #16
haraken
https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2246 Source/platform/heap/Heap.cpp:2246: static inline bool needsTracing(const void* objectPointer) On 2014/12/02 15:35:10, ...
6 years ago (2014-12-02 15:38:35 UTC) #17
sof
https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2024 Source/platform/heap/Heap.cpp:2024: if (Mode == ThreadLocalMarking && !needsTracing(objectPointer)) On 2014/12/02 15:35:10, ...
6 years ago (2014-12-02 15:46:51 UTC) #18
sof
On 2014/12/02 15:38:35, haraken wrote: > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2246 > ...
6 years ago (2014-12-02 15:50:53 UTC) #19
haraken
https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2024 Source/platform/heap/Heap.cpp:2024: if (Mode == ThreadLocalMarking && !needsTracing(objectPointer)) On 2014/12/02 15:46:51, ...
6 years ago (2014-12-02 15:56:54 UTC) #20
haraken
On 2014/12/02 15:50:53, sof wrote: > On 2014/12/02 15:38:35, haraken wrote: > > > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp ...
6 years ago (2014-12-02 15:58:50 UTC) #21
sof
On 2014/12/02 15:56:54, haraken wrote: > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2024 > ...
6 years ago (2014-12-02 16:01:03 UTC) #22
sof
On 2014/12/02 15:58:50, haraken wrote: > On 2014/12/02 15:50:53, sof wrote: > > On 2014/12/02 ...
6 years ago (2014-12-02 16:03:26 UTC) #23
haraken
On 2014/12/02 16:01:03, sof wrote: > On 2014/12/02 15:56:54, haraken wrote: > > > https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp ...
6 years ago (2014-12-02 16:04:31 UTC) #24
haraken
On 2014/12/02 16:04:31, haraken wrote: > On 2014/12/02 16:01:03, sof wrote: > > On 2014/12/02 ...
6 years ago (2014-12-02 16:06:27 UTC) #25
sof
https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/765673004/diff/100001/Source/platform/heap/Heap.cpp#newcode2023 Source/platform/heap/Heap.cpp:2023: #endif On 2014/12/02 15:35:10, haraken wrote: > > Can ...
6 years ago (2014-12-02 21:33:22 UTC) #26
haraken
Still LGTM. Landing.
6 years ago (2014-12-03 01:03:02 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/765673004/120001
6 years ago (2014-12-03 01:03:50 UTC) #29
commit-bot: I haz the power
6 years ago (2014-12-03 01:06:12 UTC) #30
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186355

Powered by Google App Engine
This is Rietveld 408576698