v8/test/cctest/heap
Michael Lippautz 76c9368593 [api, global-handles] Add TracedGlobal
TracedGlobal integrates with the use case of EmbedderHeapTracer and replaces
regular weak Global or Persistent nodes for such cases. This allows to simplify
the case for regular weak handles in a sense that they follow regular weak
semantics (if the underlying object is otherwise unreachable the weak handle
will be reset).

TracedGlobal requires slightly different semantics in the sense that it can be
required to keep them alive on Scavenge garbage collections because there's a
transitive path that is only known when using the EmbedderHeapTracer.
TracedGlobal accomodates that use case.

TracedGlobal follows move semantics and can thus be used in regular std
containers without wrapping data structure.

The internal state uses 20% less memory and allows for only iterating those
nodes when necessary. The design trades the virtual call when iterating
interesting persistents in the GC prologue with calling out through the
EmbedderHeapTracer for each node which is also a virtual call. There is one less
iteration over the set of handles required though and the design is robust
against recursive GCs that mutate the embedder state during the prologue
callback.

Bug: chromium:923361
Change-Id: Idbacfbe4723cd12af9de21058a4792e51dc4df74
Reviewed-on: https://chromium-review.googlesource.com/c/1425523
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59183}
2019-01-29 20:15:39 +00:00
..
heap-tester.h [heap] Activate the memory reducer on smaller heaps 2019-01-22 11:14:32 +00:00
heap-utils.cc [api, global-handles] Add TracedGlobal 2019-01-29 20:15:39 +00:00
heap-utils.h [api, global-handles] Add TracedGlobal 2019-01-29 20:15:39 +00:00
test-alloc.cc [ubsan] Port HeapObject to the new design 2018-12-20 16:43:49 +00:00
test-array-buffer-tracker.cc [cleanup] Use Page::FromHeapObject where applicable 2019-01-15 01:20:11 +00:00
test-compaction.cc [cleanup] Use Page::FromHeapObject where applicable 2019-01-15 01:20:11 +00:00
test-concurrent-marking.cc Reland "[heap] Remove bailout marking worklist." 2019-01-18 10:04:17 +00:00
test-embedder-tracing.cc [api, global-handles] Add TracedGlobal 2019-01-29 20:15:39 +00:00
test-external-string-tracker.cc [cleanup] Use Page::FromHeapObject where applicable 2019-01-15 01:20:11 +00:00
test-heap.cc [heap] Refactor usages of the InNewSpace() predicate 2019-01-29 09:34:26 +00:00
test-incremental-marking.cc [cleanup] Use the new taskrunner API in the gc 2018-10-04 11:18:32 +00:00
test-invalidated-slots.cc Reland "Change SetProperty/SetSuperProperty to infer language mode when possible" 2019-01-24 16:57:23 +00:00
test-lab.cc [ubsan] Port HeapObject to the new design 2018-12-20 16:43:49 +00:00
test-mark-compact.cc Reland "Change SetProperty/SetSuperProperty to infer language mode when possible" 2019-01-24 16:57:23 +00:00
test-page-promotion.cc [cleanup] Use Page::FromHeapObject where applicable 2019-01-15 01:20:11 +00:00
test-spaces.cc [cleanup] Use Page::FromHeapObject where applicable 2019-01-15 01:20:11 +00:00
test-unmapper.cc [cleanup] Mark heap/ methods in subclasses with override. 2018-09-17 15:32:31 +00:00
test-weak-references.cc [assembler] Remove legacy constructor 2019-01-17 12:39:57 +00:00