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

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: stop interceptors in an entire child process 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..4f47b5e5ce2fe7d4bc83cdb1fcf63c74f64e66ac 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -33,6 +33,10 @@
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
+#ifdef USE_ALLOCATED_TYPE
+#include "base/allocator/allocated_type_tcmalloc.h"
+#endif
+
#if defined(OS_CHROMEOS)
#include <sys/ioctl.h>
#endif
@@ -639,6 +643,10 @@ bool LaunchProcess(const std::vector<std::string>& argv,
}
}
+#ifdef USE_ALLOCATED_TYPE
+ // Stop interceptors for allocated type to avoid using locks.
+ StopAllocatedTypeIntercept();
+#endif
Dai Mikurube (NOT FULLTIME) 2012/08/07 11:35:55 Note: I kept #ifdef here since the file has just t
jar (doing other things) 2012/08/07 17:07:34 Readers can't skip the ifdef without trying to fig
Dai Mikurube (NOT FULLTIME) 2012/08/08 06:16:23 Ok, done in base/allocator/allocated_type_tcmalloc
if (options.maximize_rlimits) {
// Some resource limits need to be maximal in this child.
std::set<int>::const_iterator resource;
@@ -1107,6 +1115,10 @@ static GetAppOutputInternalResult GetAppOutputInternal(
if (dev_null < 0)
_exit(127);
+#ifdef USE_ALLOCATED_TYPE
+ // Stop interceptors for allocated type to avoid using locks.
+ StopAllocatedTypeIntercept();
+#endif
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