diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-09-13 03:28:57 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-04 10:16:39 -0500 |
commit | 4dfced359fbc719a35527416f1b4b3999647f68b (patch) | |
tree | bfa501673ebf02c77818e87a374ff9a80bec974e /tools/perf/util/thread.h | |
parent | fedd63d3cdc9004df43b02df5c874b8957992fe8 (diff) |
perf tools: Get current comm instead of last one
At insert time, a hist entry should reference comm at the time otherwise
it'll get the last comm anyway.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-n6pykiiymtgmcjs834go2t8x@git.kernel.org
[ Fixed up const pointer issues ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r-- | tools/perf/util/thread.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 8702c6b4163a..373c055989ed 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
@@ -26,6 +26,7 @@ struct thread { | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | struct machine; | 28 | struct machine; |
29 | struct comm; | ||
29 | 30 | ||
30 | struct thread *thread__new(pid_t pid, pid_t tid); | 31 | struct thread *thread__new(pid_t pid, pid_t tid); |
31 | void thread__delete(struct thread *self); | 32 | void thread__delete(struct thread *self); |
@@ -36,6 +37,7 @@ static inline void thread__exited(struct thread *thread) | |||
36 | 37 | ||
37 | int thread__set_comm(struct thread *thread, const char *comm, u64 timestamp); | 38 | int thread__set_comm(struct thread *thread, const char *comm, u64 timestamp); |
38 | int thread__comm_len(struct thread *self); | 39 | int thread__comm_len(struct thread *self); |
40 | struct comm *thread__comm(const struct thread *thread); | ||
39 | const char *thread__comm_str(const struct thread *thread); | 41 | const char *thread__comm_str(const struct thread *thread); |
40 | void thread__insert_map(struct thread *self, struct map *map); | 42 | void thread__insert_map(struct thread *self, struct map *map); |
41 | int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp); | 43 | int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp); |