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

Unified Diff: runtime/vm/service.cc

Issue 2646443005: Track async causal stack traces (Closed)
Patch Set: rebase Created 3 years, 10 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/raw_object.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 3353228e860062b857f37fb48ecf4f20621393a8..c456fee51e9516a6f5088e970b5e4f7e47cf6322 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1340,6 +1340,8 @@ static bool GetStack(Thread* thread, JSONStream* js) {
}
ASSERT(isolate->compilation_allowed());
DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
+ DebuggerStackTrace* async_causal_stack =
+ isolate->debugger()->AsyncCausalStackTrace();
// Do we want the complete script object and complete local variable objects?
// This is true for dump requests.
const bool full = BoolParameter::Parse(js->LookupParam("_full"), false);
@@ -1357,6 +1359,17 @@ static bool GetStack(Thread* thread, JSONStream* js) {
}
}
+ if (async_causal_stack != NULL) {
+ JSONArray jsarr(&jsobj, "asyncCausalFrames");
+ intptr_t num_frames = async_causal_stack->Length();
+ for (intptr_t i = 0; i < num_frames; i++) {
+ ActivationFrame* frame = async_causal_stack->FrameAt(i);
+ JSONObject jsobj(&jsarr);
+ frame->PrintToJSONObject(&jsobj, full);
+ jsobj.AddProperty("index", i);
+ }
+ }
+
{
MessageHandler::AcquiredQueues aq(isolate->message_handler());
jsobj.AddProperty("messages", aq.queue());
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698