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

Unified Diff: base/process_util_posix.cc

Issue 7204002: Increase the KillProcess timeout when running under Valgrind (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
===================================================================
--- base/process_util_posix.cc (revision 84779)
+++ base/process_util_posix.cc (working copy)
@@ -27,6 +27,7 @@
#include "base/process_util.h"
#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
darin (slow to review) 2011/06/17 20:54:42 nit: it seems a bit unintuitive that RunningOnValg
Timur Iskhodzhanov 2011/06/17 21:02:47 That's a good point. However, currently dynamic_an
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
@@ -223,6 +224,13 @@
if (result && wait) {
int tries = 60;
+
+ if (RunningOnValgrind()) {
darin (slow to review) 2011/06/17 20:54:42 OK... In my experience 2x might not even be enoug
Timur Iskhodzhanov 2011/06/17 21:02:47 Totally agree - average Valgrind slowdown is ~20x.
+ // Wait for some extra time when running under Valgrind since the child
+ // processes may take some time doing leak checking.
+ tries *= 2;
+ }
+
// The process may not end immediately due to pending I/O
bool exited = false;
while (tries-- > 0) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698