Title: [123464] trunk
- Revision
- 123464
- Author
- [email protected]
- Date
- 2012-07-24 06:14:46 -0700 (Tue, 24 Jul 2012)
Log Message
[Qt] Add quirks for running the web process in a profiler shell, like valgrind
https://bugs.webkit.org/show_bug.cgi?id=87672
Reviewed by Jocelyn Turcotte.
Source/WebKit2:
If environment variables QT_WEBKIT_WEB_PROCESS_COMMAND_PREFIX
and/or QT_WEBKIT_PLUGIN_PROCESS_COMMAND_PREFIX are set, use their
values as the prefix of the command when launching the child process.
Example usage:
export QT_WEB_PROCESS_COMMAND_PREFIX="valgrind --smc-check=all"
./MiniBrowser http://somepage.html
./WebKitTestRunner --no-timeout-at-all some_layouttest.html
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
Tools:
Add --no-timeout-at-all command line switch to not time out no matter how
long the web process does it's job. --no-timeout is not enough for profiling
purposes because it only affects the timeout when we are waiting for the end
of the test. We use another timeout to control how much we wait for the web
process to initialize before and reset after the test and it could also easily
expire when running under valgrind. We should keep the behavior of --no-timeout
to not disable this timout check because --no-timeout is used by performace tests
and those should not wait for the web process to initialize and reset more than
normal tests.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize):
(WTR::TestController::runUntil):
* WebKitTestRunner/TestController.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (123463 => 123464)
--- trunk/Source/WebKit2/ChangeLog 2012-07-24 12:38:02 UTC (rev 123463)
+++ trunk/Source/WebKit2/ChangeLog 2012-07-24 13:14:46 UTC (rev 123464)
@@ -1,3 +1,21 @@
+2012-07-24 Balazs Kelemen <[email protected]>
+
+ [Qt] Add quirks for running the web process in a profiler shell, like valgrind
+ https://bugs.webkit.org/show_bug.cgi?id=87672
+
+ Reviewed by Jocelyn Turcotte.
+
+ If environment variables QT_WEBKIT_WEB_PROCESS_COMMAND_PREFIX
+ and/or QT_WEBKIT_PLUGIN_PROCESS_COMMAND_PREFIX are set, use their
+ values as the prefix of the command when launching the child process.
+ Example usage:
+ export QT_WEB_PROCESS_COMMAND_PREFIX="valgrind --smc-check=all"
+ ./MiniBrowser http://somepage.html
+ ./WebKitTestRunner --no-timeout-at-all some_layouttest.html
+
+ * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
+ (WebKit::ProcessLauncher::launchProcess):
+
2012-07-23 Oswald Buddenhagen <[email protected]>
[Qt] Fix compilation against namespaced Qt
Modified: trunk/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp (123463 => 123464)
--- trunk/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp 2012-07-24 12:38:02 UTC (rev 123463)
+++ trunk/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp 2012-07-24 13:14:46 UTC (rev 123464)
@@ -101,9 +101,15 @@
void ProcessLauncher::launchProcess()
{
- QString commandLine = QLatin1String("%1 %2");
- commandLine = commandLine.arg(m_launchOptions.processType == WebProcess ?
- executablePathOfWebProcess() : executablePathOfPluginProcess());
+ QString commandLine = QLatin1String("%1 %2 %3");
+ if (m_launchOptions.processType == WebProcess) {
+ QByteArray webProcessPrefix = qgetenv("QT_WEBKIT2_WP_CMD_PREFIX");
+ commandLine = commandLine.arg(QLatin1String(webProcessPrefix.constData())).arg(QString(executablePathOfWebProcess()));
+ } else if (m_launchOptions.processType == PluginProcess) {
+ QByteArray pluginProcessPrefix = qgetenv("QT_WEBKIT2_PP_CMD_PREFIX");
+ commandLine = commandLine.arg(QLatin1String(pluginProcessPrefix.constData())).arg(QString(executablePathOfPluginProcess()));
+ } else
+ ASSERT_NOT_REACHED();
#if OS(DARWIN)
// Create the listening port.
Modified: trunk/Tools/ChangeLog (123463 => 123464)
--- trunk/Tools/ChangeLog 2012-07-24 12:38:02 UTC (rev 123463)
+++ trunk/Tools/ChangeLog 2012-07-24 13:14:46 UTC (rev 123464)
@@ -1,3 +1,26 @@
+2012-07-24 Balazs Kelemen <[email protected]>
+
+ [Qt] Add quirks for running the web process in a profiler shell, like valgrind
+ https://bugs.webkit.org/show_bug.cgi?id=87672
+
+ Reviewed by Jocelyn Turcotte.
+
+ Add --no-timeout-at-all command line switch to not time out no matter how
+ long the web process does it's job. --no-timeout is not enough for profiling
+ purposes because it only affects the timeout when we are waiting for the end
+ of the test. We use another timeout to control how much we wait for the web
+ process to initialize before and reset after the test and it could also easily
+ expire when running under valgrind. We should keep the behavior of --no-timeout
+ to not disable this timout check because --no-timeout is used by performace tests
+ and those should not wait for the web process to initialize and reset more than
+ normal tests.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::initialize):
+ (WTR::TestController::runUntil):
+ * WebKitTestRunner/TestController.h:
+
2012-07-24 Peter Beverloo <[email protected]>
[Chromium] Fix a class/struct mismatch error in TestDelegate.h (showing up on clang)
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (123463 => 123464)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2012-07-24 12:38:02 UTC (rev 123463)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2012-07-24 13:14:46 UTC (rev 123464)
@@ -78,6 +78,7 @@
, m_shortTimeout(defaultShortTimeout)
, m_noTimeout(defaultNoTimeout)
, m_useWaitToDumpWatchdogTimer(true)
+ , m_forceNoTimeout(false)
, m_didPrintWebProcessCrashedMessage(false)
, m_shouldExitWhenWebProcessCrashes(true)
, m_beforeUnloadReturnValue(true)
@@ -260,6 +261,12 @@
continue;
}
+ if (argument == "--no-timeout-at-all") {
+ m_useWaitToDumpWatchdogTimer = false;
+ m_forceNoTimeout = true;
+ continue;
+ }
+
if (argument == "--pixel-tests") {
m_dumpPixels = true;
continue;
@@ -560,18 +567,20 @@
void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration)
{
- double timeout;
- switch (timeoutDuration) {
- case ShortTimeout:
- timeout = m_shortTimeout;
- break;
- case LongTimeout:
- timeout = m_longTimeout;
- break;
- case NoTimeout:
- default:
- timeout = m_noTimeout;
- break;
+ double timeout = m_noTimeout;
+ if (!m_forceNoTimeout) {
+ switch (timeoutDuration) {
+ case ShortTimeout:
+ timeout = m_shortTimeout;
+ break;
+ case LongTimeout:
+ timeout = m_longTimeout;
+ break;
+ case NoTimeout:
+ default:
+ timeout = m_noTimeout;
+ break;
+ }
}
platformRunUntil(done, timeout);
Modified: trunk/Tools/WebKitTestRunner/TestController.h (123463 => 123464)
--- trunk/Tools/WebKitTestRunner/TestController.h 2012-07-24 12:38:02 UTC (rev 123463)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2012-07-24 13:14:46 UTC (rev 123464)
@@ -129,6 +129,7 @@
double m_shortTimeout;
double m_noTimeout;
bool m_useWaitToDumpWatchdogTimer;
+ bool m_forceNoTimeout;
bool m_didPrintWebProcessCrashedMessage;
bool m_shouldExitWhenWebProcessCrashes;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes