http://codereview.chromium.org/6826026/diff/1/src/runtime-profiler.cc File src/runtime-profiler.cc (right):
http://codereview.chromium.org/6826026/diff/1/src/runtime-profiler.cc#newcode135 src/runtime-profiler.cc:135: state_counts_[IN_NON_JS_STATE] = kStateWindowSize; On 2011/04/11 06:10:06, Kasper Lund wrote:
Before this change, we were intentionally being less aggressive in our optimizations initially (slow start). It could definitely be that the
rest of
our heuristics have changed so much that it doesn't matter anymore,
but it would
be nice to verify that this doesn't force us to optimize too much
stuff when
loading real web apps.
Somehow the new code bothers me a bit. Because the
state_counts_[IN_JS_STATE] is
initialized to zero, you can compute the JS ratio by dividing with state_window_ticks_ but you cannot do the same for the non-JS ratio
(initialized
to kStateWindowSize). Would it be cleaner if
state_counts_[IN_NON_JS_STATE] was
initialized to zero too and only do state_counts_[old_state]-- when state_window_ticks_ indicated a full window? That way you could also
get rid of
the STATIC_ASSERT and the memset.
The slow start is still here, because even if we optimize a lot, we spend quite some time just compiling stuff and it's a separate VM state. So it's not like we immediately jump to 100% of JS ratio. I'm not quite happy with the window update code either. I'll work more on it. http://codereview.chromium.org/6826026/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
