From 4adda6fd325178b3d3704c8fe1a8a842df7873bd Mon Sep 17 00:00:00 2001 From: ruuda Date: Wed, 25 Nov 2015 07:19:49 -0800 Subject: [Tracing] Make heap profiler type info a string Instead of keeping a 16-bit "type ID" to do type profiling, the heap profiler will just keep a |const char*| with the type name. The type names are deduplicated at dump time, so in the trace log heap dumps still reference types by ID, and there is one dictionary at the end that maps type IDs to their names. Internally, a null pointer type name is used to indicate "unknown type". It is dumped in the trace as type name "[unknown]", so it requires no special treatment from the UI. (Contrary to previous intent.) The mapping dictionary follows the same convention as the current "stackFrames" dictionary: it is one metadata event per process, with name "typeNames". The args of this event contain a dictionary that maps type IDs to their name. This is part of the heap profiler in chrome://tracing. BUG=524631 Review URL: https://codereview.chromium.org/1467453003 Cr-Commit-Position: refs/heads/master@{#361660} --- base/trace_event/winheap_dump_provider_win_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/trace_event/winheap_dump_provider_win_unittest.cc') diff --git a/base/trace_event/winheap_dump_provider_win_unittest.cc b/base/trace_event/winheap_dump_provider_win_unittest.cc index fac002f..c74a7b7 100644 --- a/base/trace_event/winheap_dump_provider_win_unittest.cc +++ b/base/trace_event/winheap_dump_provider_win_unittest.cc @@ -14,7 +14,7 @@ namespace base { namespace trace_event { TEST(WinHeapDumpProviderTest, OnMemoryDump) { - ProcessMemoryDump pmd(new MemoryDumpSessionState(nullptr)); + ProcessMemoryDump pmd(new MemoryDumpSessionState(nullptr, nullptr)); MemoryDumpArgs dump_args = {MemoryDumpLevelOfDetail::DETAILED}; WinHeapDumpProvider* winheap_dump_provider = -- cgit v1.1