[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
abarth at webkit.org
abarth at webkit.org
Wed Mar 17 17:59:26 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 202f91dc1c71a32a33dde455a4a6978aa3594d8c
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 25 18:16:20 2010 +0000
2010-02-25 Adam Barth <abarth at webkit.org>
Reviewed by David Levin.
EWS leaks memory slowly
https://bugs.webkit.org/show_bug.cgi?id=35395
The EWS bots leak memory very slowly. If you run them for about a
month, each one will take up around 1 GB of virutal memory. If you run
several of them on one machine, you'll eventually exhaust all available
memory and grind the bots to a halt.
This patch introduces a --exit-after-iteration option to the queues so
that we run them for a finite amount of time. Once they exit and
restart, they'll reclaim the leaked memory. I'm not sure how many
iterations I'll end up running them for. I'll need to sort that out
operationally, but my initial guess is around 1000.
* Scripts/webkitpy/commands/queues.py:
* Scripts/webkitpy/commands/queues_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e38c5ce..44f1879 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2010-02-25 Adam Barth <abarth at webkit.org>
+
+ Reviewed by David Levin.
+
+ EWS leaks memory slowly
+ https://bugs.webkit.org/show_bug.cgi?id=35395
+
+ The EWS bots leak memory very slowly. If you run them for about a
+ month, each one will take up around 1 GB of virutal memory. If you run
+ several of them on one machine, you'll eventually exhaust all available
+ memory and grind the bots to a halt.
+
+ This patch introduces a --exit-after-iteration option to the queues so
+ that we run them for a finite amount of time. Once they exit and
+ restart, they'll reclaim the leaked memory. I'm not sure how many
+ iterations I'll end up running them for. I'll need to sort that out
+ operationally, but my initial guess is around 1000.
+
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queues_unittest.py:
+
2010-02-25 Jarkko Sakkinen <jarkko.sakkinen at tieto.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues.py b/WebKitTools/Scripts/webkitpy/commands/queues.py
index 6ea1c48..fe2bc66 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queues.py
@@ -57,8 +57,10 @@ class AbstractQueue(Command, QueueEngineDelegate):
def __init__(self, options=None): # Default values should never be collections (like []) as default values are shared between invocations
options_list = (options or []) + [
make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"),
+ make_option("--exit-after-iteration", action="store", type="int", dest="iterations", default=None, help="Stop running the queue after iterating this number of times."),
]
Command.__init__(self, "Run the %s" % self.name, options=options_list)
+ self._iteration_count = 0
def _cc_watchers(self, bug_id):
try:
@@ -95,7 +97,8 @@ class AbstractQueue(Command, QueueEngineDelegate):
log("Running WebKit %s." % self.name)
def should_continue_work_queue(self):
- return True
+ self._iteration_count += 1
+ return not self.options.iterations or self._iteration_count <= self.options.iterations
def next_work_item(self):
raise NotImplementedError, "subclasses must implement"
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
index 87cd645..a589102 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
@@ -31,6 +31,7 @@ import os
from webkitpy.commands.commandtest import CommandsTest
from webkitpy.commands.queues import *
from webkitpy.commands.queuestest import QueuesTest
+from webkitpy.mock import Mock
from webkitpy.mock_bugzillatool import MockBugzillaTool
from webkitpy.outputcapture import OutputCapture
@@ -65,6 +66,23 @@ class AbstractQueueTest(CommandsTest):
self._assert_run_webkit_patch([1])
self._assert_run_webkit_patch(["one", 2])
+ def test_iteration_count(self):
+ queue = TestQueue()
+ queue.options = Mock()
+ queue.options.iterations = 3
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertFalse(queue.should_continue_work_queue())
+
+ def test_no_iteration_count(self):
+ queue = TestQueue()
+ queue.options = Mock()
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertTrue(queue.should_continue_work_queue())
+ self.assertTrue(queue.should_continue_work_queue())
+
class AbstractReviewQueueTest(CommandsTest):
def test_patch_collection_delegate_methods(self):
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list