[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-Original-Commit-Position: refs/heads/master@{#384521}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 533c402f8b21e503ebcaf3f0de427f41076b4de1
1 file changed
tree: 7a20ca46432909bc5d17ccac9c09691e57ba1b1e
  1. trace_event_common.h