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

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

Issue 10825075: Classify memory usage by allocated type in Deep Memory Profiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactored. Created 8 years, 4 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/deep-heap-profile.h
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.h b/third_party/tcmalloc/chromium/src/deep-heap-profile.h
index 5a5ae8eb857efb9ebd1338f836a0294a8266bd41..be213b26c8f110ae35a04c79600041ebb01fc8d0 100644
--- a/third_party/tcmalloc/chromium/src/deep-heap-profile.h
+++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.h
@@ -26,6 +26,10 @@
#include "config.h"
+#if defined(PROFILING_ALLOCATED_TYPE)
+#include <typeinfo>
+#endif
+
#if defined(__linux__)
#define DEEP_HEAP_PROFILE 1
#endif
@@ -87,6 +91,9 @@ class DeepHeapProfile {
#ifdef DEEP_HEAP_PROFILE
struct DeepBucket {
Bucket* bucket;
+#if defined(PROFILING_ALLOCATED_TYPE)
+ const std::type_info* type;
M-A Ruel 2012/08/19 02:40:00 Note that type_info won't be useful on Windows sin
Dai Mikurube (NOT FULLTIME) 2012/08/20 10:35:27 I know. PROFILING_ALLOCATED_TYPE is always used w
+#endif
size_t committed_size;
bool is_mmap;
int id; // Unique ID of the bucket.
@@ -208,7 +215,11 @@ class DeepHeapProfile {
// Get the DeepBucket object corresponding to the given |bucket|.
// DeepBucket is an extension to Bucket which is declared above.
- DeepBucket* GetDeepBucket(Bucket* bucket, bool is_mmap, DeepBucket** table);
+ DeepBucket* GetDeepBucket(Bucket* bucket, bool is_mmap,
+#if defined(PROFILING_ALLOCATED_TYPE)
+ const std::type_info* type,
+#endif
+ DeepBucket** table);
// Reset committed_size member variables in DeepBucket objects to 0.
void ResetCommittedSize(DeepBucket** deep_table);

Powered by Google App Engine
This is Rietveld 408576698