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

Unified Diff: third_party/tcmalloc/chromium/src/heap-profile-table.h

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup, run in all renderers Created 7 years, 6 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/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[]);
« no previous file with comments | « third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h ('k') | third_party/tcmalloc/chromium/src/heap-profile-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698