Thanks for having a look!
-- Vitaly 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/09 17:00:21, Vyacheslav Egorov wrote:
Wild idea: when going idle we stop profiler. Why don't we reset it's
state when
we later restart it?
We should experiment with this.
I agree. As we discussed, we should revisit the heuristics behind Reset(). http://codereview.chromium.org/6826026/diff/1/src/runtime-profiler.cc#newcode349 src/runtime-profiler.cc:349: state_window_ticks_ = Min(kStateWindowSize, state_window_ticks_ + 1); On 2011/04/09 17:00:21, Vyacheslav Egorov wrote:
Our RuntimeProfiler is full of magic and very hard to grok. Lets start
adding
comments.
For example here you can mention that when we start profiling we don't
have
enough ticks for full window (kStateWindowSize) so to calculate proper
ratio we
have to use smaller window size equal to amount of ticks we got.
It's not too late to make it readable :) Added a comment covering this aspect. http://codereview.chromium.org/6826026/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
