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

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

Issue 1149623010: Print and save JS stacktrace on OOM crash. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 999
1000 UNREACHABLE(); 1000 UNREACHABLE();
1001 return Smi::FromInt(0); 1001 return Smi::FromInt(0);
1002 } 1002 }
1003 1003
1004 1004
1005 bool PagedSpace::CanExpand() { 1005 bool PagedSpace::CanExpand() {
1006 DCHECK(max_capacity_ % AreaSize() == 0); 1006 DCHECK(max_capacity_ % AreaSize() == 0);
1007 DCHECK(heap()->mark_compact_collector()->is_compacting() || 1007 DCHECK(heap()->mark_compact_collector()->is_compacting() ||
1008 Capacity() <= heap()->MaxOldGenerationSize()); 1008 Capacity() <= heap()->MaxOldGenerationSize());
1009 DCHECK(heap()->CommittedOldGenerationMemory() <= 1009 // DCHECK(heap()->CommittedOldGenerationMemory() <=
1010 heap()->MaxOldGenerationSize() + 1010 // heap()->MaxOldGenerationSize() +
1011 PagedSpace::MaxEmergencyMemoryAllocated()); 1011 // PagedSpace::MaxEmergencyMemoryAllocated());
1012 1012
1013 // Are we going to exceed capacity for this space? 1013 // Are we going to exceed capacity for this space?
1014 if (!heap()->CanExpandOldGeneration(Page::kPageSize)) return false; 1014 if (!heap()->CanExpandOldGeneration(Page::kPageSize)) return false;
1015 1015
1016 return true; 1016 return true;
1017 } 1017 }
1018 1018
1019 1019
1020 bool PagedSpace::Expand() { 1020 bool PagedSpace::Expand() {
1021 if (!CanExpand()) return false; 1021 if (!CanExpand()) return false;
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 object->ShortPrint(); 3120 object->ShortPrint();
3121 PrintF("\n"); 3121 PrintF("\n");
3122 } 3122 }
3123 printf(" --------------------------------------\n"); 3123 printf(" --------------------------------------\n");
3124 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3124 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3125 } 3125 }
3126 3126
3127 #endif // DEBUG 3127 #endif // DEBUG
3128 } // namespace internal 3128 } // namespace internal
3129 } // namespace v8 3129 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | src/string-stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698