Perfprofd: Add process name to sampling

To distinguish samples in similarly-named threads (not being uncommon
because of unnamed Java threads or common functionality like GC,
async tasks, etc.), record the name of the process (defined to be
the comm of the process with pid == tid) in program samples.

Currently this is encoded as an index into a ProcessNames table.

Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: I146f9335d9edecba6b7fcefa71a735a185ba2270
6 files changed