[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}


CrOS-Libchrome-Original-Commit: 4adda6fd325178b3d3704c8fe1a8a842df7873bd
14 files changed
tree: fdb88183e9a150d4838690ffe5e006999de3ff77
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/