Chromium Code Reviews| 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..e432bc77ed42cfc5e67f1ced578a5a79482a0a4a 100644 |
| --- a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h |
| +++ b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h |
| @@ -68,6 +68,8 @@ extern "C" { |
| /* Start profiling and arrange to write profile data to file names |
| * of the form: "prefix.0000", "prefix.0001", ... |
| + * |prefix| may be NULL, which prevents writing to disk. This is useful for |
| + * applications that exclusively use GetHeapProfile(). |
|
Dai Mikurube (NOT FULLTIME)
2013/06/19 04:34:03
This comment looks confusing. The existing profil
James Cook
2013/06/29 00:02:42
Updated the comment. I think the system considers
|
| */ |
| PERFTOOLS_DLL_DECL void HeapProfilerStart(const char* prefix); |
| @@ -109,6 +111,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 |