v8/test/cctest/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
..
heap-tester.h Reland "Reland "[deoptimizer] Change deopt entries into builtins"" 2020-10-21 06:01:38 +00:00
heap-utils.cc [heap] Forces CodeSpaceMemoryModificationScope only in safepoints 2021-11-05 14:34:41 +00:00
heap-utils.h [heap, infra] Remove --local-heaps and --concurrent-allocation flags 2021-02-01 11:01:26 +00:00
test-alloc.cc [test] Fix StressJS 2021-11-17 13:31:02 +00:00
test-array-buffer-tracker.cc heap: Rename compaction flags 2021-11-10 09:01:59 +00:00
test-compaction.cc [test] Skip test with FLAG_single_generation 2021-11-11 12:17:28 +00:00
test-concurrent-allocation.cc [heap][cleanup] Rename kWordAligned to kTaggedAligned 2021-11-16 09:14:24 +00:00
test-concurrent-marking.cc heap: Remove unused Worklist 2021-12-02 12:43:01 +00:00
test-embedder-tracing.cc heap: Mark EmbedderHeapTracer::GarbageCollectionForTesting as deprecated 2021-11-22 23:15:28 +00:00
test-external-string-tracker.cc heap: Rename compaction flags 2021-11-10 09:01:59 +00:00
test-heap.cc heap: Fix the tracing of GC cycles 2022-02-02 14:27:50 +00:00
test-incremental-marking.cc heap: Fix the tracing of GC cycles 2022-02-02 14:27:50 +00:00
test-invalidated-slots.cc [cctest] Fix -Wshadow warnings in cctest/heap 2021-10-18 16:34:30 +00:00
test-iterators.cc Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
test-lab.cc [heap][cleanup] Rename kWordAligned to kTaggedAligned 2021-11-16 09:14:24 +00:00
test-mark-compact.cc heap: Rename compaction flags 2021-11-10 09:01:59 +00:00
test-memory-measurement.cc [build] Reduce dependencies on deserializer.h 2021-06-29 13:21:57 +00:00
test-page-promotion.cc [heap] Remove flag always_promote_young_mc 2021-11-09 19:37:39 +00:00
test-shared-heap.cc [heap] Find references in client heaps to shared objects in shared GC 2021-12-06 12:00:18 +00:00
test-spaces.cc [heap] Refactor MemoryAllocator 2022-01-12 09:53:53 +00:00
test-unmapper.cc [test]: Fix platform lifetime in EagerUnmappingInCollectAllAvailableGarbage. 2020-10-28 09:12:05 +00:00
test-weak-references.cc [ext-code-space][compiler] Support calling CodeT targets 2021-12-16 13:45:12 +00:00
test-write-barrier.cc [heap] Fix failed tests when enabling single generation 2021-04-21 07:33:51 +00:00