Reland of "Add thread-local allocation context for tracing"

This is a reland of https://crrev.com/1340013002.

Original issue's description:
> This introduces a thread-local context that can be used for heap
> profiling. It contains a pseudo stack where trace events are the
> stack frames. There is a fast early-out in case capturing context
> is disabled.
>
> This is a prerequisite for the heap profiler in chrome://tracing. It
> will log allocations with context obtained from the system introduced
> here.
>
> This is intended to replace the tcmalloc-specific heap profiler in
> base/trace_event/trace_event_memory and its pseudo stack once the heap
> profiler lands.
>
> BUG=524631
>
> Committed: https://crrev.com/abff8221c8d35916a8d7e12845ba61bc5c48aff8
> Cr-Commit-Position: refs/heads/master@{#350799}

BUG=524631
TBR=primiano@chromium.org

Review URL: https://codereview.chromium.org/1368993002

Cr-Commit-Position: refs/heads/master@{#350880}


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