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

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

Issue 697423002: Fix predictable mode when job based sweeping is off. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/v8.h" 5 #include "src/v8.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.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 // This counter will be increased for pages which will be swept by the 2562 // This counter will be increased for pages which will be swept by the
2563 // sweeper threads. 2563 // sweeper threads.
2564 unswept_free_bytes_ = 0; 2564 unswept_free_bytes_ = 0;
2565 2565
2566 // Clear the free list before a full GC---it will be rebuilt afterward. 2566 // Clear the free list before a full GC---it will be rebuilt afterward.
2567 free_list_.Reset(); 2567 free_list_.Reset();
2568 } 2568 }
2569 2569
2570 2570
2571 intptr_t PagedSpace::SizeOfObjects() { 2571 intptr_t PagedSpace::SizeOfObjects() {
2572 DCHECK(heap()->mark_compact_collector()->sweeping_in_progress() || 2572 DCHECK(FLAG_predictable ||
2573 heap()->mark_compact_collector()->sweeping_in_progress() ||
2573 (unswept_free_bytes_ == 0)); 2574 (unswept_free_bytes_ == 0));
2574 return Size() - unswept_free_bytes_ - (limit() - top()); 2575 return Size() - unswept_free_bytes_ - (limit() - top());
2575 } 2576 }
2576 2577
2577 2578
2578 // After we have booted, we have created a map which represents free space 2579 // After we have booted, we have created a map which represents free space
2579 // on the heap. If there was already a free list then the elements on it 2580 // on the heap. If there was already a free list then the elements on it
2580 // were created with the wrong FreeSpaceMap (normally NULL), so we need to 2581 // were created with the wrong FreeSpaceMap (normally NULL), so we need to
2581 // fix them. 2582 // fix them.
2582 void PagedSpace::RepairFreeListsAfterBoot() { free_list_.RepairLists(heap()); } 2583 void PagedSpace::RepairFreeListsAfterBoot() { free_list_.RepairLists(heap()); }
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 object->ShortPrint(); 3166 object->ShortPrint();
3166 PrintF("\n"); 3167 PrintF("\n");
3167 } 3168 }
3168 printf(" --------------------------------------\n"); 3169 printf(" --------------------------------------\n");
3169 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3170 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3170 } 3171 }
3171 3172
3172 #endif // DEBUG 3173 #endif // DEBUG
3173 } 3174 }
3174 } // namespace v8::internal 3175 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698