Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Issue 6826026: Fix JS ratio computation on startup. (Closed)

Created:
9 years, 8 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix JS ratio computation on startup. Committed: http://code.google.com/p/v8/source/detail?r=7562

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -11 lines) Patch
M src/runtime-profiler.h View 3 chunks +6 lines, -7 lines 0 comments Download
M src/runtime-profiler.cc View 2 chunks +7 lines, -4 lines 6 comments Download

Messages

Total messages: 6 (0 generated)
Vitaly Repeshko
9 years, 8 months ago (2011-04-09 09:02:47 UTC) #1
Vitaly Repeshko
9 years, 8 months ago (2011-04-09 16:46:47 UTC) #2
Vyacheslav Egorov (Chromium)
LGTM 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; Wild idea: when going idle ...
9 years, 8 months ago (2011-04-09 17:00:21 UTC) #3
Vitaly Repeshko
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] = ...
9 years, 8 months ago (2011-04-10 08:13:27 UTC) #4
Kasper Lund
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 ...
9 years, 8 months ago (2011-04-11 06:10:06 UTC) #5
Vitaly Repeshko
9 years, 8 months ago (2011-04-11 19:43:53 UTC) #6
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.

Powered by Google App Engine
This is Rietveld 408576698