Lines Matching refs:heap
5 #include "src/heap/memory-reducer.h"
8 #include "src/heap/gc-tracer.h"
9 #include "src/heap/heap-inl.h"
10 #include "src/heap/incremental-marking.h"
24 MemoryReducer::MemoryReducer(Heap* heap)
25 : heap_(heap),
27 reinterpret_cast<v8::Isolate*>(heap->isolate()))),
33 : CancelableTask(memory_reducer->heap()->isolate()),
38 Heap* heap = memory_reducer_->heap();
40 double time_ms = heap->MonotonicallyIncreasingTimeInMs();
41 heap->tracer()->SampleAllocation(time_ms, heap->NewSpaceAllocationCounter(),
42 heap->OldGenerationAllocationCounter(),
43 heap->EmbedderAllocationCounter());
44 bool low_allocation_rate = heap->HasLowAllocationRate();
45 bool optimize_for_memory = heap->ShouldOptimizeForMemoryUsage();
47 heap->isolate()->PrintWithTimestamp(
60 heap->incremental_marking()->IsStopped() &&
61 (heap->incremental_marking()->CanBeActivated() || optimize_for_memory);
62 event.committed_memory = heap->CommittedOldGenerationMemory();
72 DCHECK(heap()->incremental_marking()->IsStopped());
75 heap()->isolate()->PrintWithTimestamp("Memory reducer: started GC #%d\n",
78 heap()->StartIdleIncrementalMarking(
82 if (!heap()->incremental_marking()->IsStopped() &&
83 heap()->ShouldOptimizeForMemoryUsage()) {
88 double deadline = heap()->MonotonicallyIncreasingTimeInMs() +
90 heap()->incremental_marking()->AdvanceWithDeadline(
93 heap()->FinalizeIncrementalMarkingIfComplete(
99 heap()->isolate()->PrintWithTimestamp(
117 heap()->isolate()->PrintWithTimestamp(
215 if (heap()->IsTearingDown()) return;