Index: runtime/vm/simulator_dbc.cc |
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc |
index c26cb7500b95f80df22c7961b2314a27a2ceb193..337daf10b3f77991bfd8736b8fb152fd52fa0df1 100644 |
--- a/runtime/vm/simulator_dbc.cc |
+++ b/runtime/vm/simulator_dbc.cc |
@@ -542,6 +542,7 @@ DART_FORCE_INLINE void Simulator::Invoke(Thread* thread, |
callee_fp[kSavedCallerFpSlotFromFp] = reinterpret_cast<RawObject*>(*FP); |
*pp = code->ptr()->object_pool_->ptr(); |
*pc = reinterpret_cast<uint32_t*>(code->ptr()->entry_point_); |
+ pc_ = reinterpret_cast<uword>(*pc); // For the profiler. |
Cutch
2016/08/19 13:49:31
weird indentation
rmacnak
2016/08/19 23:28:17
It is indented the same as the other lines, the as
|
*FP = callee_fp; |
*SP = *FP - 1; |
} |
@@ -694,6 +695,7 @@ static DART_NOINLINE bool InvokeRuntime( |
thread->set_vm_tag(reinterpret_cast<uword>(drt)); |
drt(args); |
thread->set_vm_tag(VMTag::kDartTagId); |
+ thread->set_top_exit_frame_info(0); |
return true; |
} else { |
return false; |
@@ -711,6 +713,7 @@ static DART_NOINLINE bool InvokeNative( |
thread->set_vm_tag(reinterpret_cast<uword>(f)); |
f(args); |
thread->set_vm_tag(VMTag::kDartTagId); |
+ thread->set_top_exit_frame_info(0); |
return true; |
} else { |
return false; |
@@ -729,6 +732,7 @@ static DART_NOINLINE bool InvokeNativeWrapper( |
NativeEntry::NativeCallWrapper(reinterpret_cast<Dart_NativeArguments>(args), |
f); |
thread->set_vm_tag(VMTag::kDartTagId); |
+ thread->set_top_exit_frame_info(0); |
return true; |
} else { |
return false; |
@@ -930,6 +934,7 @@ RawObject* Simulator::Call(const Code& code, |
// Save outer top_exit_frame_info. |
fp_[0] = reinterpret_cast<RawObject*>(thread->top_exit_frame_info()); |
+ thread->set_top_exit_frame_info(0); |
// Copy arguments and setup the Dart frame. |
const intptr_t argc = arguments.Length(); |
@@ -948,6 +953,7 @@ RawObject* Simulator::Call(const Code& code, |
// Ready to start executing bytecode. Load entry point and corresponding |
// object pool. |
pc = reinterpret_cast<uint32_t*>(code.raw()->ptr()->entry_point_); |
+ pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
pp = code.object_pool()->ptr(); |
// Cache some frequently used values in the frame. |
@@ -1169,6 +1175,7 @@ RawObject* Simulator::Call(const Code& code, |
SimulatorHelpers::SetFrameCode(FP, code); |
pp = code->ptr()->object_pool_->ptr(); |
pc = reinterpret_cast<uint32_t*>(code->ptr()->entry_point_); |
+ pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
} |
DISPATCH(); |
} |
@@ -1198,6 +1205,7 @@ RawObject* Simulator::Call(const Code& code, |
SimulatorHelpers::SetFrameCode(FP, code); |
pp = code->ptr()->object_pool_->ptr(); |
pc = reinterpret_cast<uint32_t*>(code->ptr()->entry_point_); |
+ pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
} |
} |
DISPATCH(); |
@@ -2090,6 +2098,7 @@ RawObject* Simulator::Call(const Code& code, |
ReturnImpl: |
// Restore caller PC. |
pc = SavedCallerPC(FP); |
+ pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
// Check if it is a fake PC marking the entry frame. |
if ((reinterpret_cast<uword>(pc) & 2) != 0) { |
@@ -2917,6 +2926,7 @@ RawObject* Simulator::Call(const Code& code, |
// Restore caller PC. |
pc = SavedCallerPC(FP); |
+ pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
// Check if it is a fake PC marking the entry frame. |
ASSERT((reinterpret_cast<uword>(pc) & 2) == 0); |