diff options
Diffstat (limited to 'tools/perf/util/thread_map.h')
-rw-r--r-- | tools/perf/util/thread_map.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h index 6b0cd2dc006b..af679d8a50f8 100644 --- a/tools/perf/util/thread_map.h +++ b/tools/perf/util/thread_map.h @@ -7,6 +7,7 @@ struct thread_map_data { pid_t pid; + char *comm; }; struct thread_map { @@ -44,4 +45,11 @@ thread_map__set_pid(struct thread_map *map, int thread, pid_t pid) { map->map[thread].pid = pid; } + +static inline char *thread_map__comm(struct thread_map *map, int thread) +{ + return map->map[thread].comm; +} + +void thread_map__read_comms(struct thread_map *threads); #endif /* __PERF_THREAD_MAP_H */ |