v8/test/unittests/heap
Omer Katz d3a72e3c2a cppgc: Stack scanning using ObjectStartBitmap
This CL implements stack scanning for cppgc.
Given a value on the stack, the MarkingVisitor uses
PageBackend::Lookup to checks whether that address is on
the heap. If it is, BasePage::TryObjectHeaderFromInnerAddress
(introduced in this CL) is used to get the relevant object
header. Note that random addresses on the heap might point to
free memory, object-start-bitmap, etc.

If a valid object header is found:
* If the object is not in construction, the GCInfoIndex is used
the get the relevant Trace method and the object is traced.
* Otherwise, the object is conservatively scanned - i.e. the
payload of the object is iterated word by word and each word is
treated as a possible pointer.

Only addresses pointing to the payload on non-free objects are
traced.

BasePage::TryObjectHeaderFromInnerAddress assumes on LAB on the
relevant space, thus all LABs are reset before scanning the stack.

Bug: chromium:1056170
Change-Id: I172850f6f1bbb6f0efca8e44ad8fdfe222977b9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2190426
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67795}
2020-05-14 10:56:28 +00:00
..
cppgc cppgc: Stack scanning using ObjectStartBitmap 2020-05-14 10:56:28 +00:00
barrier-unittest.cc Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
bitmap-test-utils.h [heap] Relax accessing markbits in ranges. 2019-02-25 15:28:41 +00:00
bitmap-unittest.cc [heap] Fix an out-of-bounds access in the marking bitmap 2020-04-20 09:07:57 +00:00
code-object-registry-unittest.cc [heap] Make CodeObjectRegistry a separate class. 2019-05-16 18:41:33 +00:00
embedder-tracing-unittest.cc heap,cppgc: Update StackState enum values 2020-05-12 12:07:27 +00:00
gc-idle-time-handler-unittest.cc [heap] Clean up GCIdleTimeHandler. 2020-02-26 10:43:14 +00:00
gc-tracer-unittest.cc [heap, tracing] Use WorkerThreadRuntimeCallStatsScope in background GC 2019-08-29 15:55:48 +00:00
heap-controller-unittest.cc [heap] Introduce a min heap size and skip GCs below that threshold 2019-06-06 15:49:50 +00:00
heap-unittest.cc [heap] Split out memory-chunk.h etc from spaces.h 2020-05-05 05:44:42 +00:00
item-parallel-job-unittest.cc [heap] Do not emit background GC trace events on the main thread 2019-07-18 08:56:58 +00:00
list-unittest.cc [heap] Make Heap::Contains const 2020-05-13 13:19:22 +00:00
local-heap-unittest.cc [heap] Move list of local heaps to safepoint 2020-03-17 12:07:24 +00:00
marking-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
marking-worklist-unittest.cc [heap] Introduce per-context marking worklists 2019-12-20 15:49:12 +00:00
memory-reducer-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
object-stats-unittest.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
off-thread-factory-unittest.cc [parser] Move Compiler::Analyze into Parser 2020-05-06 13:35:37 +00:00
safepoint-unittest.cc [heap] Allow background threads to start incremental marking 2020-05-08 10:41:38 +00:00
slot-set-unittest.cc [heap] Verify filler slots don't need clearing 2020-04-28 16:24:45 +00:00
spaces-unittest.cc [heap] Split out memory-chunk.h etc from spaces.h 2020-05-05 05:44:42 +00:00
unmapper-unittest.cc [test] Correctly restore allocator on SequentialUnmapperTest teardown. 2020-01-20 20:02:34 +00:00
worklist-unittest.cc [v8 heap]: Track GlobalSize in worklist. 2020-02-07 16:12:30 +00:00