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

Side by Side Diff: runtime/vm/exceptions.cc

Issue 11478012: Provide a mechanism for dumping of heap profiles on predefined events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/object_store.h"
12 #include "vm/stack_frame.h" 13 #include "vm/stack_frame.h"
13 #include "vm/stub_code.h" 14 #include "vm/stub_code.h"
14 #include "vm/symbols.h" 15 #include "vm/symbols.h"
15 16
16 namespace dart { 17 namespace dart {
17 18
18 DEFINE_FLAG(bool, print_stacktrace_at_throw, false, 19 DEFINE_FLAG(bool, print_stacktrace_at_throw, false,
19 "Prints a stack trace everytime a throw occurs."); 20 "Prints a stack trace everytime a throw occurs.");
21 DEFINE_FLAG(bool, heap_profile_out_of_memory, false,
22 "Writes a heap profile on unhandled out-of-memory exceptions.");
20 23
21 24
22 const char* Exceptions::kCastErrorDstName = "type cast"; 25 const char* Exceptions::kCastErrorDstName = "type cast";
23 26
24 27
25 // Iterate through the stack frames and try to find a frame with an 28 // Iterate through the stack frames and try to find a frame with an
26 // exception handler. Once found, set the pc, sp and fp so that execution 29 // exception handler. Once found, set the pc, sp and fp so that execution
27 // can continue in that frame. 30 // can continue in that frame.
28 static bool FindExceptionHandler(uword* handler_pc, 31 static bool FindExceptionHandler(uword* handler_pc,
29 uword* handler_sp, 32 uword* handler_sp,
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 case kIsolateSpawn: 433 case kIsolateSpawn:
431 library = Library::IsolateLibrary(); 434 library = Library::IsolateLibrary();
432 class_name = Symbols::New("IsolateSpawnException"); 435 class_name = Symbols::New("IsolateSpawnException");
433 break; 436 break;
434 } 437 }
435 438
436 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); 439 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments);
437 } 440 }
438 441
439 } // namespace dart 442 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/heap.h » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698