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

Issue 1844413002: Use EmbedderHeapTracer instead of object grouping when trace_embedder_heap flag is set (Closed)

Created:
4 years, 8 months ago by Marcel Hlopko
Modified:
4 years, 8 months ago
CC:
Michael Hablich, Hannes Payer (out of office), ulan, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Use EmbedderHeapTracer instead of object grouping when embedder sets the heap tracer. When the embedder sets the heap tracer, V8, during marking, will collect all reachable wrappers, and then ask embedder to trace its heap. The embedder is expected to call PersistentBase::RegisterExternalReference with all wrappers reachable from the given ones. This fixed point iteration happens in MarkCompact::ProcessEphemeralMarking. For more efficient object visiting during marking, we need a special JS_API_OBJECT_TYPE (in tandem with already existing JS_SPECIAL_API_OBJECT_TYPE) and corresponding visitor (JSApiObjectVisitor). BUG=chromium:468240 LOG=no Committed: https://crrev.com/6d1f7282aff7cf332bbecf3f63e99b2e7716fa14 Cr-Commit-Position: refs/heads/master@{#35412}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Incorporated Jochen's wonderful comments #

Total comments: 6

Patch Set 3 : Incorporated wonderful Hannes' comments #

Patch Set 4 : Fixing bug - harmony weak collections can reach new wrappers, we need to process them #

Patch Set 5 : Introduce JSApiObject type #

Patch Set 6 : Rebase #

Patch Set 7 : Another rebase #

Patch Set 8 : Fix fast accessor tests #

Total comments: 2

Patch Set 9 : Rebase #

Patch Set 10 : Improve WasConstructedFromApiFunction, cleanup #

Patch Set 11 : Remove flag, presence of heap tracer is enough #

Total comments: 10

Patch Set 12 : Moved EmbedderHeapTracer to MarkCompactCollector #

Patch Set 13 : Revert back to void pointers through the api #

Total comments: 2

Patch Set 14 : Move logic from heap to mark compact #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -50 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +10 lines, -5 lines 0 comments Download
M src/api-natives.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/fast-accessor-assembler.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +8 lines, -11 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +20 lines, -21 lines 0 comments Download
M src/heap/incremental-marking.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
M src/heap/mark-compact.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +21 lines, -2 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +38 lines, -3 lines 0 comments Download
M src/heap/objects-visiting.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +36 lines, -3 lines 0 comments Download
M src/heap/objects-visiting.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M src/heap/objects-visiting-inl.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M src/heap/scavenger.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +7 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -0 lines 0 comments Download
M src/objects-body-descriptors-inl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M src/types.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (10 generated)
Marcel Hlopko
Hello Gentlemen, Ptal. I'm not very happy with the ProcessEphemeralMarking method. I tried to extract ...
4 years, 8 months ago (2016-03-31 16:08:54 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1844413002/diff/1/src/heap/incremental-marking.cc File src/heap/incremental-marking.cc (right): https://codereview.chromium.org/1844413002/diff/1/src/heap/incremental-marking.cc#newcode738 src/heap/incremental-marking.cc:738: if (!heap_->mark_compact_collector()->UsingEmbedderHeapTracer()) { in principle, we could use both ...
4 years, 8 months ago (2016-04-01 08:49:12 UTC) #4
Marcel Hlopko
https://codereview.chromium.org/1844413002/diff/1/src/heap/incremental-marking.cc File src/heap/incremental-marking.cc (right): https://codereview.chromium.org/1844413002/diff/1/src/heap/incremental-marking.cc#newcode738 src/heap/incremental-marking.cc:738: if (!heap_->mark_compact_collector()->UsingEmbedderHeapTracer()) { Yes, but right now we aim ...
4 years, 8 months ago (2016-04-01 09:24:32 UTC) #5
Hannes Payer (out of office)
https://codereview.chromium.org/1844413002/diff/20001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1844413002/diff/20001/src/heap/mark-compact.cc#newcode1919 src/heap/mark-compact.cc:1919: if (UsingEmbedderHeapTracer() && object->IsJSObject()) { As discussed offline, move ...
4 years, 8 months ago (2016-04-01 11:13:37 UTC) #6
Marcel Hlopko
Incorporated Hannes' comments, the cl is a little bit bigger now. Would you mind commenting ...
4 years, 8 months ago (2016-04-01 12:47:20 UTC) #7
Marcel Hlopko
Realized objects reachable from weak harmony collection elements marked for destruction can reach new wrappers, ...
4 years, 8 months ago (2016-04-04 09:32:12 UTC) #8
Marcel Hlopko
Introduced new object type - JSApiObject. Ptal :)
4 years, 8 months ago (2016-04-06 10:10:25 UTC) #9
Marcel Hlopko
Ptal :)
4 years, 8 months ago (2016-04-06 12:09:03 UTC) #11
Marcel Hlopko
So it looks like I fixed the tests, so you can take a look. Thanks!
4 years, 8 months ago (2016-04-06 13:39:46 UTC) #14
Toon Verwaest
Adding the instance type lgtm https://codereview.chromium.org/1844413002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1844413002/diff/160001/src/objects.cc#newcode15991 src/objects.cc:15991: bool JSObject::WasConstructedFromApiFunction() { can't ...
4 years, 8 months ago (2016-04-06 14:07:48 UTC) #15
Marcel Hlopko
https://codereview.chromium.org/1844413002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1844413002/diff/160001/src/objects.cc#newcode15991 src/objects.cc:15991: bool JSObject::WasConstructedFromApiFunction() { On 2016/04/06 at 14:07:47, Toon Verwaest ...
4 years, 8 months ago (2016-04-07 08:09:53 UTC) #17
Hannes Payer (out of office)
Overall looking good. A few more comments. https://codereview.chromium.org/1844413002/diff/220001/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1844413002/diff/220001/src/heap/heap.h#newcode920 src/heap/heap.h:920: EmbedderHeapTracer* embedder_heap_tracer() ...
4 years, 8 months ago (2016-04-07 20:38:31 UTC) #18
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1844413002/diff/220001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1844413002/diff/220001/include/v8.h#newcode5400 include/v8.h:5400: const std::vector<std::pair<Value*, Value*> >& internal_fields) = 0; why this ...
4 years, 8 months ago (2016-04-08 02:19:56 UTC) #19
Marcel Hlopko
https://codereview.chromium.org/1844413002/diff/220001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1844413002/diff/220001/include/v8.h#newcode5400 include/v8.h:5400: const std::vector<std::pair<Value*, Value*> >& internal_fields) = 0; On 2016/04/08 ...
4 years, 8 months ago (2016-04-08 08:08:10 UTC) #20
Hannes Payer (out of office)
one nit left, LGTM from my side https://codereview.chromium.org/1844413002/diff/260001/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1844413002/diff/260001/src/heap/heap.h#newcode915 src/heap/heap.h:915: // Embedder ...
4 years, 8 months ago (2016-04-08 12:02:09 UTC) #22
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-09 23:46:43 UTC) #23
Marcel Hlopko
Final version, will be landed once v8 5.1 branch is stable and the queue is ...
4 years, 8 months ago (2016-04-11 10:29:22 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844413002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844413002/280001
4 years, 8 months ago (2016-04-12 10:08:42 UTC) #27
commit-bot: I haz the power
Committed patchset #14 (id:280001)
4 years, 8 months ago (2016-04-12 10:31:43 UTC) #28
commit-bot: I haz the power
4 years, 8 months ago (2016-04-12 10:33:36 UTC) #30
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/6d1f7282aff7cf332bbecf3f63e99b2e7716fa14
Cr-Commit-Position: refs/heads/master@{#35412}

Powered by Google App Engine
This is Rietveld 408576698