diff options
author | Ben Murdoch <benm@google.com> | 2013-07-25 10:06:34 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2013-07-25 10:06:34 +0100 |
commit | bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3 (patch) | |
tree | 51387d1614b16fcf107004649d44707d271da339 /third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h | |
parent | 8a142c18176c4e279012cb218f060cfc3df087c5 (diff) | |
download | chromium_org-bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3.tar.gz |
Merge from Chromium at DEPS revision r213605
This commit was generated by merge_to_master.py.
Change-Id: I5ef9e03bf077dac295a7904f06b3cb6dec9fe213
Diffstat (limited to 'third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h')
-rw-r--r-- | third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h index 8e3ee962c7..c2f16997aa 100644 --- a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h +++ b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h @@ -68,9 +68,24 @@ extern "C" { /* Start profiling and arrange to write profile data to file names * of the form: "prefix.0000", "prefix.0001", ... + * + * If |prefix| is NULL then dumps will not be written to disk. Applications + * can use GetHeapProfile() to get profile data, but HeapProfilerDump() will do + * nothing. */ PERFTOOLS_DLL_DECL void HeapProfilerStart(const char* prefix); +/* Start profiling with a callback function that returns application-generated + * stacks. Profiles are not written to disk, but may be obtained via + * GetHeapProfile(). The callback: + * 1. May optionally skip the first |skip_count| items on the stack. + * 2. Must provide a |stack| buffer of at least size 32 * sizeof(void*). + * 3. Must return the number of items copied or zero. + */ +typedef int (*StackGeneratorFunction)(int skip_count, void** stack); +PERFTOOLS_DLL_DECL void HeapProfilerWithPseudoStackStart( + StackGeneratorFunction callback); + /* Returns non-zero if we are currently profiling the heap. (Returns * an int rather than a bool so it's usable from C.) This is true * between calls to HeapProfilerStart() and HeapProfilerStop(), and |