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

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

Issue 2462613002: [not for landing] Debugging gpu failures
Patch Set: more checks Created 4 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
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.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 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 <utility> 7 #include <utility>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
11 #include "src/base/platform/semaphore.h" 11 #include "src/base/platform/semaphore.h"
12 #include "src/frames.h"
12 #include "src/full-codegen/full-codegen.h" 13 #include "src/full-codegen/full-codegen.h"
13 #include "src/heap/array-buffer-tracker.h" 14 #include "src/heap/array-buffer-tracker.h"
14 #include "src/heap/slot-set.h" 15 #include "src/heap/slot-set.h"
15 #include "src/macro-assembler.h" 16 #include "src/macro-assembler.h"
16 #include "src/msan.h" 17 #include "src/msan.h"
18 #include "src/objects.h"
17 #include "src/snapshot/snapshot.h" 19 #include "src/snapshot/snapshot.h"
18 #include "src/v8.h" 20 #include "src/v8.h"
19 21
20 namespace v8 { 22 namespace v8 {
21 namespace internal { 23 namespace internal {
22 24
23 25
24 // ---------------------------------------------------------------------------- 26 // ----------------------------------------------------------------------------
25 // HeapObjectIterator 27 // HeapObjectIterator
26 28
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 1172
1171 PagedSpace::PagedSpace(Heap* heap, AllocationSpace space, 1173 PagedSpace::PagedSpace(Heap* heap, AllocationSpace space,
1172 Executability executable) 1174 Executability executable)
1173 : Space(heap, space, executable), anchor_(this), free_list_(this) { 1175 : Space(heap, space, executable), anchor_(this), free_list_(this) {
1174 area_size_ = MemoryAllocator::PageAreaSize(space); 1176 area_size_ = MemoryAllocator::PageAreaSize(space);
1175 accounting_stats_.Clear(); 1177 accounting_stats_.Clear();
1176 1178
1177 allocation_info_.Reset(nullptr, nullptr); 1179 allocation_info_.Reset(nullptr, nullptr);
1178 } 1180 }
1179 1181
1182 void PagedSpace::PrintStackFramesAndDie() {
1183 StackFrameIterator it(heap()->isolate());
1184 for (int i = 0; !it.done(); it.Advance(), i++) {
1185 if (it.frame()->is_java_script()) {
1186 PrintF(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
1187 JavaScriptFrame* frame = static_cast<JavaScriptFrame*>(it.frame());
1188 PrintF("Frame %d: pc = %p\n", i, reinterpret_cast<void*>(frame->pc()));
1189 Code* code = frame->unchecked_code();
1190 if (code && code->IsCode()) {
1191 if (code->is_turbofanned()) {
1192 PrintF("[turbofaned]\n");
1193 } else if (code->is_crankshafted()) {
1194 PrintF("[crankshafted]\n");
1195 }
1196 code->Print();
1197 } else {
1198 PrintF("unknown code!\n");
1199 }
1200 PrintF("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
1201 }
1202 }
1203 CHECK(false);
1204 }
1180 1205
1181 bool PagedSpace::SetUp() { return true; } 1206 bool PagedSpace::SetUp() { return true; }
1182 1207
1183 1208
1184 bool PagedSpace::HasBeenSetUp() { return true; } 1209 bool PagedSpace::HasBeenSetUp() { return true; }
1185 1210
1186 1211
1187 void PagedSpace::TearDown() { 1212 void PagedSpace::TearDown() {
1188 for (auto it = begin(); it != end();) { 1213 for (auto it = begin(); it != end();) {
1189 Page* page = *(it++); // Will be erased. 1214 Page* page = *(it++); // Will be erased.
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 object->ShortPrint(); 3270 object->ShortPrint();
3246 PrintF("\n"); 3271 PrintF("\n");
3247 } 3272 }
3248 printf(" --------------------------------------\n"); 3273 printf(" --------------------------------------\n");
3249 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3274 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3250 } 3275 }
3251 3276
3252 #endif // DEBUG 3277 #endif // DEBUG
3253 } // namespace internal 3278 } // namespace internal
3254 } // namespace v8 3279 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698