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

Unified Diff: base/trace_event/heap_profiler_allocation_context.h

Issue 1467453003: [Tracing] Make heap profiler type info a string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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
« no previous file with comments | « base/trace_event/BUILD.gn ('k') | base/trace_event/heap_profiler_allocation_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6a46d03e73b644799b345563d4e6707e75aba6d5 100644
--- a/base/trace_event/heap_profiler_allocation_context.h
+++ b/base/trace_event/heap_profiler_allocation_context.h
@@ -52,17 +52,16 @@ 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. 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;
private:
friend class AllocationContextTracker;
« no previous file with comments | « base/trace_event/BUILD.gn ('k') | base/trace_event/heap_profiler_allocation_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698