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

Side by Side Diff: src/heap/heap-inl.h

Issue 2183383004: Revert of [heap] Reland "Remove black pages and use black areas instead." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/heap/heap.cc ('k') | src/heap/incremental-marking.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } else { 245 } else {
246 // NEW_SPACE is not allowed here. 246 // NEW_SPACE is not allowed here.
247 UNREACHABLE(); 247 UNREACHABLE();
248 } 248 }
249 if (allocation.To(&object)) { 249 if (allocation.To(&object)) {
250 OnAllocationEvent(object, size_in_bytes); 250 OnAllocationEvent(object, size_in_bytes);
251 } else { 251 } else {
252 old_gen_exhausted_ = true; 252 old_gen_exhausted_ = true;
253 } 253 }
254 254
255 if (!old_gen_exhausted_ && incremental_marking()->black_allocation() &&
256 space != OLD_SPACE) {
257 Marking::MarkBlack(ObjectMarking::MarkBitFrom(object));
258 MemoryChunk::IncrementLiveBytesFromGC(object, size_in_bytes);
259 }
255 return allocation; 260 return allocation;
256 } 261 }
257 262
258 263
259 void Heap::OnAllocationEvent(HeapObject* object, int size_in_bytes) { 264 void Heap::OnAllocationEvent(HeapObject* object, int size_in_bytes) {
260 HeapProfiler* profiler = isolate_->heap_profiler(); 265 HeapProfiler* profiler = isolate_->heap_profiler();
261 if (profiler->is_tracking_allocations()) { 266 if (profiler->is_tracking_allocations()) {
262 profiler->AllocationEvent(object->address(), size_in_bytes); 267 profiler->AllocationEvent(object->address(), size_in_bytes);
263 } 268 }
264 269
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 767
763 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 768 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
764 for (Object** current = start; current < end; current++) { 769 for (Object** current = start; current < end; current++) {
765 CHECK((*current)->IsSmi()); 770 CHECK((*current)->IsSmi());
766 } 771 }
767 } 772 }
768 } // namespace internal 773 } // namespace internal
769 } // namespace v8 774 } // namespace v8
770 775
771 #endif // V8_HEAP_HEAP_INL_H_ 776 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698