Chromium Code Reviews| 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); |