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

Side by Side Diff: src/heap/spaces.cc

Issue 1415383004: Fixing --verify-predictable mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: d8 now uses its own PredictablePlatform implementation Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen/full-codegen.h" 9 #include "src/full-codegen/full-codegen.h"
10 #include "src/heap/slots-buffer.h" 10 #include "src/heap/slots-buffer.h"
(...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 } 2403 }
2404 2404
2405 2405
2406 int FreeList::Free(Address start, int size_in_bytes) { 2406 int FreeList::Free(Address start, int size_in_bytes) {
2407 if (size_in_bytes == 0) return 0; 2407 if (size_in_bytes == 0) return 0;
2408 2408
2409 owner()->heap()->CreateFillerObjectAt(start, size_in_bytes); 2409 owner()->heap()->CreateFillerObjectAt(start, size_in_bytes);
2410 2410
2411 Page* page = Page::FromAddress(start); 2411 Page* page = Page::FromAddress(start);
2412 2412
2413 owner()->heap()->OnFreeEvent(start, size_in_bytes);
2414
2413 // Early return to drop too-small blocks on the floor. 2415 // Early return to drop too-small blocks on the floor.
2414 if (size_in_bytes <= kSmallListMin) { 2416 if (size_in_bytes <= kSmallListMin) {
2415 page->add_non_available_small_blocks(size_in_bytes); 2417 page->add_non_available_small_blocks(size_in_bytes);
2416 wasted_bytes_ += size_in_bytes; 2418 wasted_bytes_ += size_in_bytes;
2417 return size_in_bytes; 2419 return size_in_bytes;
2418 } 2420 }
2419 2421
2420 FreeSpace* free_space = FreeSpace::cast(HeapObject::FromAddress(start)); 2422 FreeSpace* free_space = FreeSpace::cast(HeapObject::FromAddress(start));
2421 // Insert other blocks at the head of a free list of the appropriate 2423 // Insert other blocks at the head of a free list of the appropriate
2422 // magnitude. 2424 // magnitude.
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 object->ShortPrint(); 3300 object->ShortPrint();
3299 PrintF("\n"); 3301 PrintF("\n");
3300 } 3302 }
3301 printf(" --------------------------------------\n"); 3303 printf(" --------------------------------------\n");
3302 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3304 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3303 } 3305 }
3304 3306
3305 #endif // DEBUG 3307 #endif // DEBUG
3306 } // namespace internal 3308 } // namespace internal
3307 } // namespace v8 3309 } // namespace v8
OLDNEW
« src/heap/heap-inl.h ('K') | « src/heap/mark-compact.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698