diff options
author | sgjesse@google.com <sgjesse@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-10 08:50:51 +0000 |
---|---|---|
committer | sgjesse@google.com <sgjesse@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-10 08:50:51 +0000 |
commit | a6097f42da3ca39a295826a80a5ec65f578ac5ad (patch) | |
tree | 894241d36921747046ded293243aac0b6422e481 /chrome/test/automation | |
parent | ebaf26ce325e21df4619ab95cc0399bc88f30d05 (diff) | |
download | chromium_src-a6097f42da3ca39a295826a80a5ec65f578ac5ad.zip chromium_src-a6097f42da3ca39a295826a80a5ec65f578ac5ad.tar.gz chromium_src-a6097f42da3ca39a295826a80a5ec65f578ac5ad.tar.bz2 |
Add options to enable stressing of the V8 crankshaft optimizations when running reliability tests
To do stress testing V8 crankshaft optimizations the same JavaScript code needs to be run a number of times first without optimizations and then with different levels of optimizations. V8 has a stress test API which can provide information on how many times to run the same code and set the optimization level for each run.
This change adds an automation message to tell the V8 instance in the renderer:
* which type of stress test to conduct
* the number of times the page is loaded.
The two options --stress-opt and --stress-deopt have been added the reliability test runner. When one of these options is used the reliability test runner will load each page several times and notify the render using the new automation messages.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5594008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 8 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index bb8d9cc..646e7a8 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -780,6 +780,14 @@ void TabProxy::SaveAsAsync() { sender_->Send(new AutomationMsg_SaveAsAsync(handle_)); } +void TabProxy::JavaScriptStressTestControl(int cmd, int param) { + if (!is_valid()) + return; + + sender_->Send(new AutomationMsg_JavaScriptStressTestControl( + 0, handle_, cmd, param)); +} + void TabProxy::AddObserver(TabProxyDelegate* observer) { AutoLock lock(list_lock_); observers_list_.AddObserver(observer); diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 63c7f79..f8aaf6f 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -404,6 +404,12 @@ class TabProxy : public AutomationResourceProxy, void StopAsync(); void SaveAsAsync(); + // Notify the JavaScript engine in the render to change its parameters + // while performing stress testing. See + // |ViewHostMsg_JavaScriptStressTestControl_Commands| in render_messages.h + // for information on the arguments. + void JavaScriptStressTestControl(int cmd, int param); + // Calls delegates void AddObserver(TabProxyDelegate* observer); void RemoveObserver(TabProxyDelegate* observer); |