Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: third_party/tcmalloc/chromium/src/malloc_hook.cc

Issue 7865021: Deep-Memory-Profiler (DMP) implementation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed bugs Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profiler.cc ('k') | third_party/tcmalloc/chromium/src/policy » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1b884fa36ee4c554909b854beffb09843c7c60c9 100644
--- a/third_party/tcmalloc/chromium/src/malloc_hook.cc
+++ b/third_party/tcmalloc/chromium/src/malloc_hook.cc
@@ -677,7 +677,10 @@ 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
+ // i += 1; // skip hook caller frame
+ // In deep profiler, we want to know the caller frame to
+ // distinguish mmap from tcmalloc
+
depth -= i; // correct depth
if (depth > max_depth) depth = max_depth;
copy(stack + i, stack + i + depth, result);
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profiler.cc ('k') | third_party/tcmalloc/chromium/src/policy » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698