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

Unified Diff: base/process_util_posix.cc

Issue 10411047: Type profiler by intercepting 'new' and 'delete' expressions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reflected the comments #17-#19. Created 8 years, 4 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
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 9ea0e41e7167b12857b97d641839435e40697dcb..e5215a0e0134352981ab2815c2f21afe71a21675 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -17,6 +17,7 @@
#include <limits>
#include <set>
+#include "base/allocator/allocated_type_control.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug/debugger.h"
@@ -639,6 +640,9 @@ bool LaunchProcess(const std::vector<std::string>& argv,
}
}
+ // Stop interceptors for allocated type to avoid using locks.
+ StopAllocatedTypeIntercept();
+
if (options.maximize_rlimits) {
// Some resource limits need to be maximal in this child.
std::set<int>::const_iterator resource;
@@ -1107,6 +1111,9 @@ static GetAppOutputInternalResult GetAppOutputInternal(
if (dev_null < 0)
_exit(127);
+ // Stop interceptors for allocated type to avoid using locks.
+ StopAllocatedTypeIntercept();
+
fd_shuffle1.push_back(InjectionArc(pipe_fd[1], STDOUT_FILENO, true));
fd_shuffle1.push_back(InjectionArc(dev_null, STDERR_FILENO, true));
fd_shuffle1.push_back(InjectionArc(dev_null, STDIN_FILENO, true));

Powered by Google App Engine
This is Rietveld 408576698