v8/test/unittests/heap
Dominik Inführ 25981026dc [heap] Improve accounting of PagedSpace::CommittedPhysicalMemory()
Instead of using the high water mark for determining this metric, we use
a bitset for all active/used system pages on a V8 heap page. Each time
when allocating a LAB on a page, we add the pages of that memory range
to that bitset. During sweeping we rebuild that bitset from scratch and
replace it with the old one in case free pages are discarded by the GC.
We DCHECK here that the sweeper only ever removes pages. This has the
nice benefit of ensuring that we don't miss any allocations (like we
do now for concurrent allocations).

CommittedPhysicalMemory for a page is then calculated by counting the
set bits in the bitset and multiplying it with the system page size.
This should be simpler to verify and track the "real" effective size
more precisely.

One case where we are partially less precise than the current
implementation is for LABs. In order to reduce complexity we now treat
all pages of a LAB allocation as active immediately. In the current
implementation we tried to only account the actual used part of the LAB
when changing the LAB later. This is more complex to track correctly
but also doesn't account the currently used LAB in effective size.

Change-Id: Ia83df9ad5fbb852f0717c4c396b5074604bd21e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497363
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79428}
2022-03-09 18:28:21 +00:00
..
base [heap] Improve accounting of PagedSpace::CommittedPhysicalMemory() 2022-03-09 18:28:21 +00:00
cppgc testing: OverrideEmbedderStackStateScope should only affect implicit GCs 2022-03-09 14:29:34 +00:00
cppgc-js testing: OverrideEmbedderStackStateScope should only affect implicit GCs 2022-03-09 14:29:34 +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 testing: OverrideEmbedderStackStateScope should only affect implicit GCs 2022-03-09 14:29:34 +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: Deprecate counters for GC UMA histograms 2022-02-28 16:27:58 +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 Split V8_OS_MACOSX into V8_OS_DARWIN and V8_OS_MACOS 2022-02-18 10:24:59 +00:00
heap-utils.cc heap: Refactor sweeping finalization for young GC 2022-03-08 16:48:43 +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