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

Unified Diff: runtime/vm/simulator_dbc.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/service.cc ('k') | runtime/vm/stack_trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 614e61f13b713127d51c25f2b82aedcbee25b6d3..d42e97c9a4f6208998ba4f60bab0feeccae4cf84 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -434,6 +434,24 @@ class SimulatorHelpers {
return true;
}
+ static bool ClearAsyncThreadStack(Thread* thread,
+ RawObject** FP,
+ RawObject** result) {
+ thread->clear_async_stack_trace();
+ *result = Object::null();
+ return true;
+ }
+
+ static bool SetAsyncThreadStackTrace(Thread* thread,
+ RawObject** FP,
+ RawObject** result) {
+ RawObject** args = FrameArguments(FP, 1);
+ thread->set_raw_async_stack_trace(
+ reinterpret_cast<RawStackTrace*>(args[0]));
+ *result = Object::null();
+ return true;
+ }
+
DART_FORCE_INLINE static RawCode* FrameCode(RawObject** FP) {
ASSERT(GetClassId(FP[kPcMarkerSlotFromFp]) == kCodeCid);
return static_cast<RawCode*>(FP[kPcMarkerSlotFromFp]);
@@ -504,6 +522,10 @@ void Simulator::InitOnce() {
intrinsics_[kDouble_equalIntrinsic] = SimulatorHelpers::Double_equal;
intrinsics_[kDouble_lessEqualThanIntrinsic] =
SimulatorHelpers::Double_lessEqualThan;
+ intrinsics_[kClearAsyncThreadStackTraceIntrinsic] =
+ SimulatorHelpers::ClearAsyncThreadStack;
+ intrinsics_[kSetAsyncThreadStackTraceIntrinsic] =
+ SimulatorHelpers::SetAsyncThreadStackTrace;
}
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/stack_trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698