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

Unified Diff: runtime/vm/isolate.h

Issue 13587008: Updated VM stacktrace support (20898) with strndup impl. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 20901)
+++ runtime/vm/isolate.h (working copy)
@@ -262,11 +262,13 @@
kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
kStoreBufferInterrupt = 0x4, // An interrupt to process the store buffer.
+ kVmStatusInterrupt = 0x8, // An interrupt to process a status request.
kInterruptsMask =
kApiInterrupt |
kMessageInterrupt |
- kStoreBufferInterrupt,
+ kStoreBufferInterrupt |
+ kVmStatusInterrupt,
};
void ScheduleInterrupts(uword interrupt_bits);
@@ -320,6 +322,13 @@
return interrupt_callback_;
}
+ static void SetVmStatsCallback(Dart_IsolateInterruptCallback cb) {
+ vmstats_callback_ = cb;
+ }
+ static Dart_IsolateInterruptCallback VmStatsCallback() {
+ return vmstats_callback_;
+ }
+
static void SetUnhandledExceptionCallback(
Dart_IsolateUnhandledExceptionCallback cb) {
unhandled_exception_callback_ = cb;
@@ -419,6 +428,13 @@
void BuildName(const char* name_prefix);
void PrintInvokedFunctions();
+ static bool FetchStacktrace();
+ static bool FetchStackFrameDetails();
+ char* GetStatusDetails();
+ char* GetStatusStacktrace();
+ char* GetStatusStackFrame(intptr_t index);
+ char* DoStacktraceInterrupt(Dart_IsolateInterruptCallback cb);
+
static ThreadLocalKey isolate_key;
StoreBufferBlock store_buffer_block_;
StoreBuffer store_buffer_;
@@ -457,6 +473,10 @@
intptr_t deopt_frame_copy_size_;
DeferredObject* deferred_objects_;
+ // Status support.
+ char* stacktrace_;
+ intptr_t stack_frame_index_;
+
static Dart_IsolateCreateCallback create_callback_;
static Dart_IsolateInterruptCallback interrupt_callback_;
static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_;
@@ -464,6 +484,7 @@
static Dart_FileOpenCallback file_open_callback_;
static Dart_FileWriteCallback file_write_callback_;
static Dart_FileCloseCallback file_close_callback_;
+ static Dart_IsolateInterruptCallback vmstats_callback_;
DISALLOW_COPY_AND_ASSIGN(Isolate);
};
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698