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

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

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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/spaces.h ('k') | src/heap/store-buffer.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 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 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 2532
2533 2533
2534 void FreeList::RepairLists(Heap* heap) { 2534 void FreeList::RepairLists(Heap* heap) {
2535 small_list_.RepairFreeList(heap); 2535 small_list_.RepairFreeList(heap);
2536 medium_list_.RepairFreeList(heap); 2536 medium_list_.RepairFreeList(heap);
2537 large_list_.RepairFreeList(heap); 2537 large_list_.RepairFreeList(heap);
2538 huge_list_.RepairFreeList(heap); 2538 huge_list_.RepairFreeList(heap);
2539 } 2539 }
2540 2540
2541 2541
2542 #ifdef DEBUG 2542 #if DCHECK_IS_ON
2543 intptr_t FreeListCategory::SumFreeList() { 2543 intptr_t FreeListCategory::SumFreeList() {
2544 intptr_t sum = 0; 2544 intptr_t sum = 0;
2545 FreeListNode* cur = top(); 2545 FreeListNode* cur = top();
2546 while (cur != NULL) { 2546 while (cur != NULL) {
2547 DCHECK(cur->map() == cur->GetHeap()->raw_unchecked_free_space_map()); 2547 DCHECK(cur->map() == cur->GetHeap()->raw_unchecked_free_space_map());
2548 FreeSpace* cur_as_free_space = reinterpret_cast<FreeSpace*>(cur); 2548 FreeSpace* cur_as_free_space = reinterpret_cast<FreeSpace*>(cur);
2549 sum += cur_as_free_space->nobarrier_size(); 2549 sum += cur_as_free_space->nobarrier_size();
2550 cur = cur->next(); 2550 cur = cur->next();
2551 } 2551 }
2552 return sum; 2552 return sum;
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 object->ShortPrint(); 3205 object->ShortPrint();
3206 PrintF("\n"); 3206 PrintF("\n");
3207 } 3207 }
3208 printf(" --------------------------------------\n"); 3208 printf(" --------------------------------------\n");
3209 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3209 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3210 } 3210 }
3211 3211
3212 #endif // DEBUG 3212 #endif // DEBUG
3213 } 3213 }
3214 } // namespace v8::internal 3214 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698