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; 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. http://codereview.chromium.org/6826026/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
