调整gperftools中Heap Profiler输出字符串缓冲区大小到1<<22,并升级gperftools.

* heap profiler工具中定义的Heap文件输出缓冲区过小(1<<20),当使用内存较多时无法正确输出Heap文件。通过Patch的方式调整。
  * 升级gperftools到最新稳定版本2.8。
This commit is contained in:
Qiuwen Lu
2020-10-15 15:51:45 +08:00
parent 90ac86a10c
commit 24f79a5a20
4 changed files with 17 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index 33a25ac..4d750bb 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -151,7 +151,7 @@ static void ProfilerFree(void* p) {
}
// We use buffers of this size in DoGetHeapProfile.
-static const int kProfileBufferSize = 1 << 20;
+static const int kProfileBufferSize = 1 << 22;
// This is a last-ditch buffer we use in DumpProfileLocked in case we
// can't allocate more memory from ProfilerMalloc. We expect this