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

Issue 7274024: Suspend runtime profiler as soon as we exit JS. (Closed)

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

Description

Suspend runtime profiler as soon as we exit JS. Lots of web pages have really frequently firing timers that keep the profiler thread spinning if we require a period of JS inactivity before suspending the profiler. While it's possible to throttle it by increasing the sleep delay and adjusting the duration of the required inactive period, it seemed much simpler to just stop it immediately on exiting JS. Stopping the profiler this way effectively turned off two optimization heuristics: 1) eager optimization (it's reset on waking up the profiler and now the profiler wakes up much more frequently) and 2) optimization throttling based on JS to non-JS state ratio (the ratio is now 100%). I removed these two heuristics and found no performance regressions so far. R=ager@chromium.org BUG=crbug.com/77625 TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8472

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -227 lines) Patch
M src/compilation-cache.h View 2 chunks +0 lines, -10 lines 0 comments Download
M src/compilation-cache.cc View 3 chunks +2 lines, -47 lines 2 comments Download
M src/compiler.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M src/isolate.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/isolate.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/runtime.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime-profiler.h View 6 chunks +2 lines, -21 lines 0 comments Download
M src/runtime-profiler.cc View 9 chunks +7 lines, -136 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Vitaly Repeshko
9 years, 5 months ago (2011-06-28 13:07:18 UTC) #1
Mads Ager (chromium)
LGTM! Nice simplifications. I think we need to just try this out and keep our ...
9 years, 5 months ago (2011-06-28 13:46:40 UTC) #2
Kasper Lund
DBC: http://codereview.chromium.org/7274024/diff/1/src/compilation-cache.cc File src/compilation-cache.cc (left): http://codereview.chromium.org/7274024/diff/1/src/compilation-cache.cc#oldcode482 src/compilation-cache.cc:482: uint32_t hash = function->SourceHash(); It would be nice ...
9 years, 5 months ago (2011-06-28 13:49:45 UTC) #3
Vitaly Repeshko
9 years, 5 months ago (2011-06-29 15:10:32 UTC) #4
Thanks guys! This is now landed.


-- Vitaly

http://codereview.chromium.org/7274024/diff/1/src/compilation-cache.cc
File src/compilation-cache.cc (left):

http://codereview.chromium.org/7274024/diff/1/src/compilation-cache.cc#oldcod...
src/compilation-cache.cc:482: uint32_t hash = function->SourceHash();
On 2011/06/28 13:49:45, Kasper Lund wrote:
> It would be nice if you could get rid of JSFunction::SourceHash too. It's
pretty
> weird and AFAIK only used for this code.

Removed.

Powered by Google App Engine
This is Rietveld 408576698