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

Unified Diff: third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: json output, but no green dots on trace Created 7 years, 7 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
Index: third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
diff --git a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
index 8e3ee962c7126c9f582c022033b95cd71953902e..ef23d7c8ba0469584b6f817e51760b9ab56ee74e 100644
--- a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
+++ b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
@@ -109,6 +109,14 @@ typedef void (*AddressVisitor)(void* data, const void* ptr);
PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback,
void* data);
+/* Sets a callback function to return a pseudo-stack for application-generated
+ * stacks during heap profiling. The caller must provide a buffer in |stack|
+ * of at least size 32 * sizeof(void*). Returns the number of items copied or
+ * zero.
+ */
+typedef int (*PseudoStackGenerator)(void** stack);
+PERFTOOLS_DLL_DECL void SetPseudoStackGenerator(PseudoStackGenerator callback);
+
#ifdef __cplusplus
} // extern "C"
#endif

Powered by Google App Engine
This is Rietveld 408576698