Chromium Code Reviews| Index: base/trace_event/heap_profiler_allocation_context.h |
| diff --git a/base/trace_event/heap_profiler_allocation_context.h b/base/trace_event/heap_profiler_allocation_context.h |
| index c5f1fdfa750e18686b18a387a6cfd4c63a9552a9..68921634560c2ed48fbb113fd07522f38012ab60 100644 |
| --- a/base/trace_event/heap_profiler_allocation_context.h |
| +++ b/base/trace_event/heap_profiler_allocation_context.h |
| @@ -52,17 +52,17 @@ bool BASE_EXPORT operator==(const Backtrace& lhs, const Backtrace& rhs); |
| // static lifetime. |
| struct BASE_EXPORT AllocationContext { |
| public: |
| - // A type ID is a number that is unique for every C++ type. A type ID is |
| - // stored instead of the type name to avoid inflating the binary with type |
| - // name strings. There is an out of band lookup table mapping IDs to the type |
| - // names. A value of 0 means that the type is not known. |
| - using TypeId = uint16_t; |
| - |
| - // An allocation context with empty backtrace and type ID 0 (unknown type). |
| + // An allocation context with empty backtrace and unknown type. |
| static AllocationContext Empty(); |
| Backtrace backtrace; |
| - TypeId type_id; |
| + |
| + // Type name of the type stored in the allocated memory, as returned by |
|
Primiano Tucci (use gerrit)
2015/11/23 15:46:48
I'd remove the "as returned by typeid(T)" as it is
Ruud van Asseldonk
2015/11/23 18:23:26
Done.
|
| + // |typeid(T).name()|. A null pointer indicates "unknown type". Grouping is |
| + // done by comparing pointers, not by deep string comparison. In a component |
| + // build, where a type name can have a string literal in several dynamic |
| + // libraries, this may distort grouping. |
| + const char* type_name; |
|
Primiano Tucci (use gerrit)
2015/11/23 15:46:47
in a follow up CL we might just hash this as well
Ruud van Asseldonk
2015/11/23 18:23:26
We could if it turns out to be an issue, but my ex
|
| private: |
| friend class AllocationContextTracker; |