Reduce interpret-only compile time.
Before:
39.04user 5.18system 0:29.24elapsed 151%CPU (0avgtext+0avgdata 164176maxresident)k
38.87user 5.16system 0:29.14elapsed 151%CPU (0avgtext+0avgdata 164144maxresident)k
After:
36.26user 3.25system 0:27.00elapsed 146%CPU (0avgtext+0avgdata 162592maxresident)k
36.25user 3.28system 0:26.28elapsed 150%CPU (0avgtext+0avgdata 162688maxresident)k
Disabled implicit stack protection for the compiler, this reduces page faults.
Added support for not timing every method compilation and verification. NanoTime is
slow and adds ~2 seconds of real time. This is currently enabled since people want
to know which methods are slow to compile.
Bug: 16853450
Change-Id: I349ffb3f36db8c437137387aa6914dc17d743f09
diff --git a/runtime/thread.cc b/runtime/thread.cc
index d525c28..f432c9c 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -539,7 +539,9 @@
#endif
// Set stack_end_ to the bottom of the stack saving space of stack overflows
- bool implicit_stack_check = !Runtime::Current()->ExplicitStackOverflowChecks();
+
+ Runtime* runtime = Runtime::Current();
+ bool implicit_stack_check = !runtime->ExplicitStackOverflowChecks() && !runtime->IsCompiler();
ResetDefaultStackEnd();
// Install the protected region if we are doing implicit overflow checks.