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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 286363006: Add flag —enable-debugger (default true) in order to disable debugger single stepping code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/object.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 36530)
+++ runtime/vm/stub_code_arm.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:
// LR : return address.
@@ -1268,18 +1269,20 @@
}
#endif // DEBUG
- // Check single stepping.
- Label not_stepping;
- __ ldr(R6, FieldAddress(CTX, Context::isolate_offset()));
- __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
- __ CompareImmediate(R6, 0);
- __ b(&not_stepping, EQ);
- __ EnterStubFrame();
- __ Push(R5); // Preserve IC data.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ Pop(R5);
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ ldr(R6, FieldAddress(CTX, Context::isolate_offset()));
+ __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
+ __ CompareImmediate(R6, 0);
+ __ b(&not_stepping, EQ);
+ __ EnterStubFrame();
+ __ Push(R5); // Preserve IC data.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ Pop(R5);
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
+ }
// Load arguments descriptor into R4.
__ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
@@ -1483,18 +1486,20 @@
}
#endif // DEBUG
- // Check single stepping.
- Label not_stepping;
- __ ldr(R6, FieldAddress(CTX, Context::isolate_offset()));
- __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
- __ CompareImmediate(R6, 0);
- __ b(&not_stepping, EQ);
- __ EnterStubFrame();
- __ Push(R5); // Preserve IC data.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ Pop(R5);
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ ldr(R6, FieldAddress(CTX, Context::isolate_offset()));
+ __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
+ __ CompareImmediate(R6, 0);
+ __ b(&not_stepping, EQ);
+ __ EnterStubFrame();
+ __ Push(R5); // Preserve IC data.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ Pop(R5);
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
+ }
// R5: IC data object (preserved).
__ ldr(R6, FieldAddress(R5, ICData::ic_data_offset()));
@@ -1572,16 +1577,18 @@
// Called only from unoptimized code. All relevant registers have been saved.
void StubCode::GenerateDebugStepCheckStub(
Assembler* assembler) {
- // Check single stepping.
- Label not_stepping;
- __ ldr(R1, FieldAddress(CTX, Context::isolate_offset()));
- __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
- __ CompareImmediate(R1, 0);
- __ b(&not_stepping, EQ);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ ldr(R1, FieldAddress(CTX, Context::isolate_offset()));
+ __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
+ __ CompareImmediate(R1, 0);
+ __ b(&not_stepping, EQ);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
+ }
__ Ret();
}
@@ -1821,16 +1828,18 @@
// Return Zero condition flag set if equal.
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
Assembler* assembler) {
- // Check single stepping.
- Label not_stepping;
- __ ldr(R1, FieldAddress(CTX, Context::isolate_offset()));
- __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
- __ CompareImmediate(R1, 0);
- __ b(&not_stepping, EQ);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ ldr(R1, FieldAddress(CTX, Context::isolate_offset()));
+ __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
+ __ CompareImmediate(R1, 0);
+ __ b(&not_stepping, EQ);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
+ }
const Register temp = R2;
const Register left = R1;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698