aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-09-11 10:18:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-04 09:57:06 -0500
commit162f0befda3becc2cc9f44075fccc030e55baec1 (patch)
tree5f8ea7a9a2fcb28d1ab742e73a56497c078a33f9 /tools/perf/util/thread.h
parentb9c5143a012a543c4ee872498d6dbae5c10beb2e (diff)
perf tools: Add time argument on COMM setting
This way we can later delimit a lifecycle for the COMM and map a hist to a precise COMM:timeslice couple. PERF_RECORD_COMM and PERF_RECORD_FORK events that don't have PERF_SAMPLE_TIME samples can only send 0 value as a timestamp and thus should overwrite any previous COMM on a given thread because there is no sensible way to keep track of all the comms lifecycles in a thread without time informations. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Tested-by: Jiri Olsa <jolsa@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-6tyow99vgmmtt9qwr2u2lqd7@git.kernel.org [ Made it cope with PERF_RECORD_MMAP2 ] 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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 6561ad21d9a7..4e9724270a64 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -33,11 +33,11 @@ static inline void thread__exited(struct thread *thread)
33 thread->dead = true; 33 thread->dead = true;
34} 34}
35 35
36int thread__set_comm(struct thread *self, const char *comm); 36int thread__set_comm(struct thread *thread, const char *comm, u64 timestamp);
37int thread__comm_len(struct thread *self); 37int thread__comm_len(struct thread *self);
38const char *thread__comm_str(const struct thread *thread); 38const char *thread__comm_str(const struct thread *thread);
39void thread__insert_map(struct thread *self, struct map *map); 39void thread__insert_map(struct thread *self, struct map *map);
40int thread__fork(struct thread *self, struct thread *parent); 40int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp);
41size_t thread__fprintf(struct thread *thread, FILE *fp); 41size_t thread__fprintf(struct thread *thread, FILE *fp);
42 42
43static inline struct map *thread__find_map(struct thread *self, 43static inline struct map *thread__find_map(struct thread *self,