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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 1127523004: Add flag --support_debugger, controls emitting single stepping checks. Disable in --noopt, 6% gain. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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/flow_graph_compiler.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 45631)
+++ 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(int, optimization_counter_threshold);
+DECLARE_FLAG(bool, support_debugger);
// Input parameters:
// LR : return address.
@@ -1347,14 +1348,15 @@
}
#endif // DEBUG
-
- __ Comment("Check single stepping");
Label stepping, done_stepping;
- __ LoadIsolate(R6);
- __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
- __ CompareImmediate(R6, 0);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Comment("Check single stepping");
+ __ LoadIsolate(R6);
+ __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
+ __ CompareImmediate(R6, 0);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
__ Comment("Range feedback collection");
Label not_smi_or_overflow;
@@ -1501,13 +1503,15 @@
__ bx(R2);
}
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ Push(R5); // Preserve IC data.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ Pop(R5);
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ Push(R5); // Preserve IC data.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ Pop(R5);
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
@@ -1645,11 +1649,13 @@
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(R6);
- __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
- __ CompareImmediate(R6, 0);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(R6);
+ __ ldrb(R6, Address(R6, Isolate::single_step_offset()));
+ __ CompareImmediate(R6, 0);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
// R5: IC data object (preserved).
__ ldr(R6, FieldAddress(R5, ICData::ic_data_offset()));
@@ -1679,13 +1685,15 @@
__ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
__ bx(R2);
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ Push(R5); // Preserve IC data.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ Pop(R5);
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ Push(R5); // Preserve IC data.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ Pop(R5);
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
@@ -2030,11 +2038,13 @@
Assembler* assembler) {
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(R1);
- __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
- __ CompareImmediate(R1, 0);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(R1);
+ __ ldrb(R1, Address(R1, Isolate::single_step_offset()));
+ __ CompareImmediate(R1, 0);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
const Register temp = R2;
const Register left = R1;
@@ -2044,11 +2054,13 @@
GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
__ Ret();
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698