| Index: third_party/tcmalloc/chromium/src/malloc_hook.cc
|
| diff --git a/third_party/tcmalloc/chromium/src/malloc_hook.cc b/third_party/tcmalloc/chromium/src/malloc_hook.cc
|
| index f6af7d816179e91afabcc6838ad5fbb99ec1791e..e46d1be888afa4006ac0e7016e2982152c25e5ff 100644
|
| --- a/third_party/tcmalloc/chromium/src/malloc_hook.cc
|
| +++ b/third_party/tcmalloc/chromium/src/malloc_hook.cc
|
| @@ -71,6 +71,8 @@
|
|
|
| using std::copy;
|
|
|
| +DECLARE_bool(deep_heap_profile);
|
| +
|
|
|
| // Declaration of default weak initialization function, that can be overridden
|
| // by linking-in a strong definition (as heap-checker.cc does). This is
|
| @@ -677,7 +679,9 @@ extern "C" int MallocHook_GetCallerStackTrace(void** result, int max_depth,
|
| if (InHookCaller(stack[i])) {
|
| RAW_VLOG(10, "Found hooked allocator at %d: %p <- %p",
|
| i, stack[i], stack[i+1]);
|
| - i += 1; // skip hook caller frame
|
| + if (!FLAGS_deep_heap_profile) {
|
| + i += 1; // skip hook caller frame
|
| + }
|
| depth -= i; // correct depth
|
| if (depth > max_depth) depth = max_depth;
|
| copy(stack + i, stack + i + depth, result);
|
|
|