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

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 1607303002: Allocator cleanup: allocator_extension call directly into tcmalloc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_dep_alloc
Patch Set: Created 4 years, 11 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
« base/debug/OWNERS ('K') | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index f439e0690da19ffecebbc5912d838b969e6ed791..319ea14481abd2e23afea7265f40c5e6e4b6ce9a 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "base/allocator/allocator_extension.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/environment.h"
@@ -49,10 +50,6 @@
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/switches.h"
-#if defined(USE_TCMALLOC)
-#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
-#endif
-
namespace content {
namespace {
@@ -484,13 +481,12 @@ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
}
if (use_suid_sandbox_for_adj_oom_score_ && !selinux) {
-#if defined(USE_TCMALLOC)
// If heap profiling is running, these processes are not exiting, at least
// on ChromeOS. The easiest thing to do is not launch them when profiling.
// TODO(stevenjb): Investigate further and fix.
- if (IsHeapProfilerRunning())
+ if (base::allocator::IsHeapProfilerRunning())
return;
-#endif
+
std::vector<std::string> adj_oom_score_cmdline;
adj_oom_score_cmdline.push_back(sandbox_binary_);
adj_oom_score_cmdline.push_back(sandbox::kAdjustOOMScoreSwitch);
« base/debug/OWNERS ('K') | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698