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) { |