Suspend runtime profiler as soon as we exit JS.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 29 Jun 2011 14:56:08 +0000 (14:56 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 29 Jun 2011 14:56:08 +0000 (14:56 +0000)
commit90c9f1b989b57e34d7e1fa5e0530c8df318011d6
treea3233128e09cdd6f5ff32b8426ecb91c90c68e23
parentd2f08851f05c92bed4e74509f625816e9c136203
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

Review URL: http://codereview.chromium.org/7274024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/compilation-cache.cc
src/compilation-cache.h
src/compiler.cc
src/isolate.cc
src/isolate.h
src/objects.cc
src/objects.h
src/runtime-profiler.cc
src/runtime-profiler.h
src/runtime.cc