Reviewers: danno,
Message:
PTAL.
The "magic number" in here isn't chosen specifically; the important thing is
that functions affected by this new rule get compiled eventually, but late.
Real-world JS code shouldn't ever hit this case anyway.
Description:
Soften --type-info-threshold by eventually optimizing all functions
(but waiting very long if they don't have enough type feedback).
Please review this at https://chromiumcodereview.appspot.com/9834005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/runtime-profiler.cc
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index
de9bf401ba41e5c3118ff6aa52fb77913eef22e7..ed457c624a4126ed6b9aab040ca8af6157ed1038
100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -290,7 +290,12 @@ void RuntimeProfiler::OptimizeNow() {
// If this particular function hasn't had any ICs patched for
enough
// ticks, optimize it now.
Optimize(function, "hot and stable");
+ } else if (ticks >= 100) {
+ // If this function does not have enough type info, but has
+ // seen a huge number of ticks, optimize it as it is.
+ Optimize(function, "not much type info but very hot");
} else {
+ function->shared()->set_profiler_ticks(ticks + 1);
if (FLAG_trace_opt_verbose) {
PrintF("[not yet optimizing ");
function->PrintName();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev