Index: third_party/tcmalloc/chromium/src/heap-profile-table.h |
diff --git a/third_party/tcmalloc/chromium/src/heap-profile-table.h b/third_party/tcmalloc/chromium/src/heap-profile-table.h |
index c2ad39f9138f4049fc9de2e45a385a8e1819e687..139c1110a39aa1c42e1b179f73b7ec35c2ff93a2 100644 |
--- a/third_party/tcmalloc/chromium/src/heap-profile-table.h |
+++ b/third_party/tcmalloc/chromium/src/heap-profile-table.h |
@@ -184,6 +184,11 @@ class HeapProfileTable { |
// We do not provision for 0-terminating 'buf'. |
int FillOrderedProfile(char buf[], int size) const; |
+ // Fill pseudo-stack profile data into buffer 'buf' of size 'size' and |
+ // return the actual size occupied by the dump in 'buf'. The output is |
+ // JSON formatted. 'buf' will not be zero-terminated. |
+ int FillPseudoStackProfile(char buf[], int size) const; |
+ |
// Cleanup any old profile files matching prefix + ".*" + kFileExt. |
static void CleanupOldProfiles(const char* prefix); |
@@ -368,6 +373,15 @@ class HeapProfileTable { |
const char* extra, |
Stats* profile_stats); |
+ // Unparse bucket b and print its portion of profile dump into buf. |
+ // We return the amount of space in buf that we use. We start printing |
+ // at buf + buflen, and promise not to go beyond buf + bufsize. |
+ // We do not provision for 0-terminating 'buf'. Output is in JSON format. |
+ static int UnparsePseudoStackBucket( |
+ const Bucket& b, |
+ char* buf, int buflen, int bufsize, |
+ Stats* profile_stats); |
+ |
// Get the bucket for the caller stack trace 'key' of depth 'depth' |
// creating the bucket if needed. |
Bucket* GetBucket(int depth, const void* const key[]); |