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

Unified Diff: runtime/vm/stub_code_arm64.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/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
===================================================================
--- runtime/vm/stub_code_arm64.cc (revision 45631)
+++ runtime/vm/stub_code_arm64.cc (working copy)
@@ -26,6 +26,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.
@@ -1392,14 +1393,16 @@
}
#endif // DEBUG
- __ Comment("Check single stepping");
Label stepping, done_stepping;
- __ LoadIsolate(R6, kNoPP);
- __ LoadFromOffset(
- R6, R6, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
- __ CompareRegisters(R6, ZR);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Comment("Check single stepping");
+ __ LoadIsolate(R6, kNoPP);
+ __ LoadFromOffset(
+ R6, R6, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
+ __ CompareRegisters(R6, ZR);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
__ Comment("Range feedback collection");
Label not_smi_or_overflow;
@@ -1563,13 +1566,15 @@
__ br(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);
+ }
}
@@ -1697,12 +1702,14 @@
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(R6, kNoPP);
- __ LoadFromOffset(
- R6, R6, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
- __ CompareImmediate(R6, 0, kNoPP);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(R6, kNoPP);
+ __ LoadFromOffset(
+ R6, R6, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
+ __ CompareImmediate(R6, 0, kNoPP);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
// R5: IC data object (preserved).
__ LoadFieldFromOffset(R6, R5, ICData::ic_data_offset(), kNoPP);
@@ -1734,13 +1741,15 @@
R2, R2, Instructions::HeaderSize() - kHeapObjectTag, kNoPP);
__ br(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);
+ }
}
@@ -2079,12 +2088,14 @@
Assembler* assembler) {
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(R1, kNoPP);
- __ LoadFromOffset(
- R1, R1, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
- __ CompareImmediate(R1, 0, kNoPP);
- __ b(&stepping, NE);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(R1, kNoPP);
+ __ LoadFromOffset(
+ R1, R1, Isolate::single_step_offset(), kNoPP, kUnsignedByte);
+ __ CompareImmediate(R1, 0, kNoPP);
+ __ b(&stepping, NE);
+ __ Bind(&done_stepping);
+ }
const Register left = R1;
const Register right = R0;
@@ -2093,11 +2104,13 @@
GenerateIdenticalWithNumberCheckStub(assembler, left, right);
__ 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698