Migrate TaskAnnotator IPC decoration to use constexpr hashes.

This vastly simplifies the backend pipeline needed to symbolize IPC
messages, requiring a simple lookup table rather than symbolization
followed by source code parsing. It also means the raw IPC message
IDs are constant across Chrome versions/builds/platforms, which
facilitates aggregation.

The impact on binary size is roughly a nop; on some platforms slightly
better, on some slightly worse. The overall impact is still about
the same.

BUG=950668

Change-Id: I13661059db79c1b091afdf68daed14325a18f26a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1615386
Reviewed-by: François Doray <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Reviewed-by: oysteine <[email protected]>
Commit-Queue: Chris Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#664578}
diff --git a/base/pending_task.h b/base/pending_task.h
index 45ed675..eca97320 100644
--- a/base/pending_task.h
+++ b/base/pending_task.h
@@ -59,14 +59,14 @@
   std::array<const void*, kTaskBacktraceLength> task_backtrace = {};
 
   // The context of the IPC message that was being handled when this task was
-  // posted. This is a program counter that is set within the scope of an IPC
-  // handler and when symbolized uniquely identifies the message being
+  // posted. This is a hash of the IPC message name that is set within the scope
+  // of an IPC handler and when symbolized uniquely identifies the message being
   // processed. This property is also propagated from one PendingTask to the
   // next. For example, if pending task A was posted while handling an IPC,
   // and pending task B was posted from within pending task A, then pending task
-  // B will inherit the |ipc_program_counter| of pending task A. In some sense
-  // this can be interpreted as a "root" task backtrace frame.
-  const void* ipc_program_counter = nullptr;
+  // B will inherit the |ipc_hash| of pending task A. In some sense this can be
+  // interpreted as a "root" task backtrace frame.
+  uint32_t ipc_hash = 0;
 
   // Secondary sort key for run time.
   int sequence_num = 0;