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

Unified Diff: runtime/vm/thread.cc

Issue 2603383004: Sane asynchronous debugging and stack traces (Closed)
Patch Set: rebase Created 3 years, 11 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/thread.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 620e542d209bec406d2116221d63c4c1a3d72e1a..d39b26d9c9657b5dc686fb1ac42de23b9a0053d9 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -101,6 +101,7 @@ Thread::Thread(Isolate* isolate)
active_stacktrace_(Object::null()),
resume_pc_(0),
sticky_error_(Error::null()),
+ async_stack_trace_(StackTrace::null()),
compiler_stats_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) safepoint_state_(0),
@@ -292,6 +293,22 @@ const char* Thread::TaskKindToCString(TaskKind kind) {
}
+RawStackTrace* Thread::async_stack_trace() const {
+ return async_stack_trace_;
+}
+
+
+void Thread::set_async_stack_trace(const StackTrace& stack_trace) {
+ ASSERT(!stack_trace.IsNull());
+ async_stack_trace_ = stack_trace.raw();
+}
+
+
+void Thread::clear_async_stack_trace() {
+ async_stack_trace_ = StackTrace::null();
+}
+
+
bool Thread::EnterIsolate(Isolate* isolate) {
const bool kIsMutatorThread = true;
Thread* thread = isolate->ScheduleThread(kIsMutatorThread);
@@ -670,6 +687,7 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor,
visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_exception_));
visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_stacktrace_));
visitor->VisitPointer(reinterpret_cast<RawObject**>(&sticky_error_));
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&async_stack_trace_));
// Visit the api local scope as it has all the api local handles.
ApiLocalScope* scope = api_top_scope_;
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698