| Index: third_party/tcmalloc/chromium/src/deep-heap-profile.cc
|
| diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
|
| index f89d8ce90e3c7d8f267aa2222be281cb9319fefa..ab57a186d5f12ddc4c5263d4b7d66458e85bf1e2 100644
|
| --- a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
|
| +++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
|
| @@ -229,7 +229,9 @@ DeepHeapProfile::~DeepHeapProfile() {
|
|
|
| // Global malloc() should not be used in this function.
|
| // Use LowLevelAlloc if required.
|
| -int DeepHeapProfile::FillOrderedProfile(char raw_buffer[], int buffer_size) {
|
| +int DeepHeapProfile::FillOrderedProfile(char raw_buffer[],
|
| + int buffer_size,
|
| + const char* reason) {
|
| TextBuffer buffer(raw_buffer, buffer_size);
|
| TextBuffer global_buffer(profiler_buffer_, kProfilerBufferSize);
|
|
|
| @@ -275,6 +277,12 @@ int DeepHeapProfile::FillOrderedProfile(char raw_buffer[], int buffer_size) {
|
| buffer.AppendUnsignedLong(time_value, 0);
|
| buffer.AppendChar('\n');
|
|
|
| + if (reason != NULL) {
|
| + buffer.AppendString("Reason: ", 0);
|
| + buffer.AppendString(reason, 0);
|
| + buffer.AppendChar('\n');
|
| + }
|
| +
|
| // Fill buffer with the global stats.
|
| buffer.AppendString(kMMapListHeader, 0);
|
|
|
|
|