diff --git a/bazel/PPROF.md b/bazel/PPROF.md index 8345eedb9fce2..443665785ae26 100644 --- a/bazel/PPROF.md +++ b/bazel/PPROF.md @@ -10,7 +10,7 @@ specific place yourself. Static linking is already available (because of a `HeapProfilerDump()` call inside -[`Envoy::Profiler::Heap::forceLink()`](https://github.com/envoyproxy/envoy/blob/master/source/common/profiler/profiler.cc#L21-L26)). +[`Envoy::Profiler::Heap::stopProfiler())`](https://github.com/envoyproxy/envoy/blob/master/source/common/profiler/profiler.cc#L32-L39)). ### Compiling a statically-linked Envoy diff --git a/source/common/profiler/profiler.cc b/source/common/profiler/profiler.cc index 74fb9478cba35..b3ef32ca832ba 100644 --- a/source/common/profiler/profiler.cc +++ b/source/common/profiler/profiler.cc @@ -38,13 +38,6 @@ bool Heap::stopProfiler() { return true; } -void Heap::forceLink() { - // Currently this is here to force the inclusion of the heap profiler during static linking. - // Without this call the heap profiler will not be included and cannot be started via env - // variable. In the future we can add admin support. - HeapProfilerDump(""); -} - } // namespace Profiler } // namespace Envoy diff --git a/source/common/profiler/profiler.h b/source/common/profiler/profiler.h index d61ff851058cf..fdf4b20ee8f96 100644 --- a/source/common/profiler/profiler.h +++ b/source/common/profiler/profiler.h @@ -60,9 +60,6 @@ class Heap { * @return bool whether the file is dumped */ static bool stopProfiler(); - -private: - static void forceLink(); }; } // namespace Profiler