[tracing] Adding task information to heap profiler

This CL adds more information to the malloc heap profiler added in
crrev.com/1675183006. The heap profiler only shows trace events and all
the tasks show up as "MessageLoop::Runtask".

This CL does:
 - Moves TRACE_TASK_EXECUTION macro from task_annotator to
   trace_event.h.
 - Adds extra scoped trace event to track the task context in heap
   profiler.
 - The folder where the task was posted from is used to categorize
   allocations.
 - Uses the type_name for context temporarily till we define a new
   context dimension for allocations.

BUG=594803

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

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


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