Index: runtime/vm/stub_code_x64.cc |
=================================================================== |
--- runtime/vm/stub_code_x64.cc (revision 36530) |
+++ runtime/vm/stub_code_x64.cc (working copy) |
@@ -27,6 +27,7 @@ |
"Set to true for debugging & verifying the slow paths."); |
DECLARE_FLAG(bool, trace_optimized_ic_calls); |
+DECLARE_FLAG(bool, enable_debugger); |
// Input parameters: |
// RSP : points to return address. |
@@ -1230,18 +1231,20 @@ |
} |
#endif // DEBUG |
- // Check single stepping. |
- Label not_stepping; |
- __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
- __ cmpq(RAX, Immediate(0)); |
- __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
- __ EnterStubFrame(); |
- __ pushq(RBX); |
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
- __ popq(RBX); |
- __ LeaveStubFrame(); |
- __ Bind(¬_stepping); |
+ if (FLAG_enable_debugger) { |
+ // Check single stepping. |
+ Label not_stepping; |
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
+ __ cmpq(RAX, Immediate(0)); |
+ __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
+ __ EnterStubFrame(); |
+ __ pushq(RBX); |
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
+ __ popq(RBX); |
+ __ LeaveStubFrame(); |
+ __ Bind(¬_stepping); |
+ } |
// Load arguments descriptor into R10. |
__ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset())); |