Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: test/cctest/heap/heap-utils.cc

Issue 2032973002: Revert of Reland "[heap] Fine-grained JSArrayBuffer tracking" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/heap/heap-utils.h ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/cctest/heap/heap-utils.h" 5 #include "test/cctest/heap/heap-utils.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/heap/incremental-marking.h" 9 #include "src/heap/incremental-marking.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 CHECK(marking->IsComplete()); 135 CHECK(marking->IsComplete());
136 } 136 }
137 137
138 void SimulateFullSpace(v8::internal::PagedSpace* space) { 138 void SimulateFullSpace(v8::internal::PagedSpace* space) {
139 space->EmptyAllocationInfo(); 139 space->EmptyAllocationInfo();
140 space->ResetFreeList(); 140 space->ResetFreeList();
141 space->ClearStats(); 141 space->ClearStats();
142 } 142 }
143 143
144 void AbandonCurrentlyFreeMemory(PagedSpace* space) {
145 space->EmptyAllocationInfo();
146 PageIterator pit(space);
147 while (pit.has_next()) {
148 pit.next()->MarkNeverAllocateForTesting();
149 }
150 }
151
152 void GcAndSweep(Heap* heap, AllocationSpace space) {
153 heap->CollectGarbage(space);
154 if (heap->mark_compact_collector()->sweeping_in_progress()) {
155 heap->mark_compact_collector()->EnsureSweepingCompleted();
156 }
157 }
158
159 } // namespace heap 144 } // namespace heap
160 } // namespace internal 145 } // namespace internal
161 } // namespace v8 146 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/heap-utils.h ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698