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

Unified Diff: runtime/vm/stub_code_mips.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_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
===================================================================
--- runtime/vm/stub_code_mips.cc (revision 45631)
+++ runtime/vm/stub_code_mips.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:
// RA : return address.
@@ -1454,12 +1455,14 @@
#endif // DEBUG
- __ Comment("Check single stepping");
Label stepping, done_stepping;
- __ LoadIsolate(T0);
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchNotEqual(T0, Immediate(0), &stepping);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Comment("Check single stepping");
+ __ LoadIsolate(T0);
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchNotEqual(T0, Immediate(0), &stepping);
+ __ Bind(&done_stepping);
+ }
__ Comment("Range feedback collection");
Label not_smi_or_overflow;
@@ -1643,17 +1646,19 @@
}
// Call single step callback in debugger.
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
- __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ lw(S5, Address(SP, 1 * kWordSize));
- __ addiu(SP, SP, Immediate(2 * kWordSize));
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ lw(S5, Address(SP, 1 * kWordSize));
+ __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
@@ -1783,10 +1788,12 @@
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(T0);
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchNotEqual(T0, Immediate(0), &stepping);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(T0);
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchNotEqual(T0, Immediate(0), &stepping);
+ __ Bind(&done_stepping);
+ }
// S5: IC data object (preserved).
__ lw(T0, FieldAddress(S5, ICData::ic_data_offset()));
@@ -1818,17 +1825,19 @@
__ jr(T4);
// Call single step callback in debugger.
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
- __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ lw(S5, Address(SP, 1 * kWordSize));
- __ addiu(SP, SP, Immediate(2 * kWordSize));
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ lw(S5, Address(SP, 1 * kWordSize));
+ __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
@@ -2221,10 +2230,12 @@
Assembler* assembler) {
// Check single stepping.
Label stepping, done_stepping;
- __ LoadIsolate(T0);
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchNotEqual(T0, Immediate(0), &stepping);
- __ Bind(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ LoadIsolate(T0);
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchNotEqual(T0, Immediate(0), &stepping);
+ __ Bind(&done_stepping);
+ }
const Register temp1 = T2;
const Register temp2 = T3;
@@ -2236,15 +2247,17 @@
__ Ret();
// Call single step callback in debugger.
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-1 * kWordSize));
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ addiu(SP, SP, Immediate(1 * kWordSize));
- __ LeaveStubFrame();
- __ b(&done_stepping);
+ if (FLAG_support_debugger) {
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-1 * kWordSize));
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ addiu(SP, SP, Immediate(1 * kWordSize));
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
+ }
}
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698