v8/test/unittests/heap
Nikolaos Papaspyrou 4ad20bff97 heap: Fix the tracing of GC cycles
Conceptually, a full GC cycle completes when the sweeping phase is
finished. As sweeping is performed concurrently, this happens after
Heap::CollectGarbage has returned and, at the latest, before the next
full GC cycle begins. However, an arbitrary number of young GC cycles
may happen in the meantime. Tracing information for the sweeping phase
must be added to the corresponding full GC cycle event. Until now, this
was not done correctly: this information was added to the GCTracer's
current event and could thus be attributed to a subsequent young or full
GC cycle.

This CL introduces methods GCTracer::(Start|Stop)Cycle to delimit a
cycle (still allowing for full GC cycles to be interrupted by young GC
cycles). These methods are different from (Start|Stop)ObservablePause,
which delimit the observable pause of each GC. The events of "pending"
full GC cycles are kept until they are properly amended and reported,
when the sweeping phase is finished.

Bug: chromium:1154636
Change-Id: I2fbc65d4807c78656d4abc8c451043f6f86211b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404733
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78905}
2022-02-02 14:27:50 +00:00
..
base heap: Remove unused Worklist 2021-12-02 12:43:01 +00:00
cppgc cppgc: young-gen: Prepare infra for young generation 2022-02-02 10:29:55 +00:00
cppgc-js api: Remove deprecated write barrier API 2022-01-21 11:36:48 +00:00
allocation-observer-unittest.cc [heap] Support removing of observers during Step() 2020-08-17 10:42:32 +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] Split out paged-spaces.h 2020-05-14 19:25:25 +00:00
embedder-tracing-unittest.cc heap: Add support for aborting compaction when finalizing with stack 2021-11-09 13:08:50 +00:00
gc-idle-time-handler-unittest.cc Reland "Fix -Wimplicit-int-float-conversions." 2021-06-29 16:36:18 +00:00
gc-tracer-unittest.cc heap: Fix the tracing of GC cycles 2022-02-02 14:27:50 +00:00
heap-controller-unittest.cc [cleanup] Replace all remaining Min/Max uses with std::min/max 2020-11-24 17:32:01 +00:00
heap-unittest.cc [ext-code-space] Make the code space external for real 2021-10-20 16:29:51 +00:00
heap-utils.cc cppgc,api: Add support for JS->C++ write barriers 2021-01-21 14:28:00 +00:00
heap-utils.h Revert "unittests: Provide Context in TestWithHeapInternals" 2021-10-27 15:05:10 +00:00
index-generator-unittest.cc [Heap]: Implement IndexGenerator for Jobs use cases. 2020-09-11 19:25:33 +00:00
list-unittest.cc [heap] Make Heap::Contains const 2020-05-13 13:19:22 +00:00
local-factory-unittest.cc [compiler] Introduce ReusableUnoptimizedCompileState 2021-12-08 11:14:27 +00:00
local-heap-unittest.cc Reland "[heap] Optimize time to reach global safepoint" 2022-01-12 10:35:25 +00:00
marking-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
marking-worklist-unittest.cc cppgc-js, heap: Concurrently push references from v8 to Oilpan 2021-12-27 11:34:29 +00:00
memory-reducer-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
object-start-bitmap-unittest.cc [heap] Add object start bitmap for conservative stack scanning 2020-08-31 07:10:36 +00:00
object-stats-unittest.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
persistent-handles-unittest.cc [handles] Make DetachPersistent insert into ordered_blocks_ 2020-08-05 12:03:52 +00:00
progressbar-unittest.cc heap: Fix TSAN race when setting a flag after page initialization 2021-08-19 10:28:57 +00:00
safepoint-unittest.cc [test][cleanup] Fix -Wshadow warnings in unittests 2021-09-27 08:59:01 +00:00
slot-set-unittest.cc [heap] Split MarkCompactCollector::PrepareRecordRelocSlot 2022-01-20 14:15:49 +00:00
spaces-unittest.cc [sparkplug][x64] Enable short builtin calls in x64 when pointer compression is disabled 2021-10-06 09:04:43 +00:00
unmapper-unittest.cc [heap] Refactor MemoryAllocator 2022-01-12 09:53:53 +00:00