diff options
author | Andreas Gampe <agampe@google.com> | 2018-01-15 17:49:53 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2018-01-19 14:29:01 -0800 |
commit | 3f4cdae63fe239d3cc3b9516578a56455ec3d3e6 (patch) | |
tree | 4b27af6b2f06440347abc77998fc527417d238b9 /perfprofd/perf_profile.proto | |
parent | 901c1cccb0610b21e5ba7904f15b64756ddf635f (diff) | |
download | extras-3f4cdae63fe239d3cc3b9516578a56455ec3d3e6.tar.gz |
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
Diffstat (limited to 'perfprofd/perf_profile.proto')
-rw-r--r-- | perfprofd/perf_profile.proto | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perfprofd/perf_profile.proto b/perfprofd/perf_profile.proto index 8981eadc..65c9c39a 100644 --- a/perfprofd/perf_profile.proto +++ b/perfprofd/perf_profile.proto @@ -63,6 +63,11 @@ message LoadModuleSamples { repeated RangeSample range_samples = 3; } +// A table of program names. +message ProcessNames { + repeated string name = 1; +} + // All samples for a program. message ProgramSamples { // Name of the program. @@ -70,6 +75,9 @@ message ProgramSamples { // Load module profiles. repeated LoadModuleSamples modules = 2; + + // Index into ProcessNames for the name of the process. + optional uint32 process_name_id = 3; } // A compressed representation of a perf profile, which contains samples from @@ -95,6 +103,9 @@ message AndroidPerfProfile { // List of all load modules. repeated LoadModule load_modules = 4; + // Table of process names. + optional ProcessNames process_names = 11; + // is device screen on at point when profile is collected? optional bool display_on = 5; |