diff options
author | primiano <primiano@chromium.org> | 2016-01-25 14:21:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-25 22:22:46 +0000 |
commit | d3a81abc8db50ba646915e3ef700c9ac45958c01 (patch) | |
tree | b1e8448350270045421894eb3d719faeebb02817 /content/browser | |
parent | d372eb96f80c84cb73413fa014a35d7de41607d8 (diff) | |
download | chromium_src-d3a81abc8db50ba646915e3ef700c9ac45958c01.zip chromium_src-d3a81abc8db50ba646915e3ef700c9ac45958c01.tar.gz chromium_src-d3a81abc8db50ba646915e3ef700c9ac45958c01.tar.bz2 |
Allocator cleanup: allocator_extension call directly into tcmalloc
After crrev.com/1584893002 base/ can use directly allocator.
The grand plan is to dismantle all the indirection layer such that:
- base is the only thing that knows about allocator-specific details.
- non-base code uses only base abstractions and stops looking
at USE_TCMALLOC build flags.
This CL, specifically, addresses the profiling-related methods moving
the tcmalloc-specific dependencies to base and base only.
Other parts of the codebase will be cleaned up in separate CLs.
Also this CL removes a stale base/debug/OWNERS. That file makes
no sense these days as tracing has been moved to base/trace_event/.
BUG=564618
Review URL: https://codereview.chromium.org/1607303002
Cr-Commit-Position: refs/heads/master@{#371335}
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/zygote_host/zygote_host_impl_linux.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc index 8b5ad76..f61d813 100644 --- a/content/browser/zygote_host/zygote_host_impl_linux.cc +++ b/content/browser/zygote_host/zygote_host_impl_linux.cc @@ -4,6 +4,7 @@ #include "content/browser/zygote_host/zygote_host_impl_linux.h" +#include "base/allocator/allocator_extension.h" #include "base/files/file_enumerator.h" #include "base/process/kill.h" #include "base/process/memory.h" @@ -11,10 +12,6 @@ #include "content/public/browser/content_browser_client.h" #include "sandbox/linux/suid/common/sandbox.h" -#if defined(USE_TCMALLOC) -#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" -#endif - namespace content { // static @@ -104,13 +101,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); |