aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.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/machine.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/machine.h')
-rw-r--r--tools/perf/util/machine.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 4c1f5d567f54..2389ba81fafe 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -40,13 +40,20 @@ struct map *machine__kernel_map(struct machine *machine, enum map_type type)
40 40
41struct thread *machine__find_thread(struct machine *machine, pid_t tid); 41struct thread *machine__find_thread(struct machine *machine, pid_t tid);
42 42
43int machine__process_comm_event(struct machine *machine, union perf_event *event); 43int machine__process_comm_event(struct machine *machine, union perf_event *event,
44int machine__process_exit_event(struct machine *machine, union perf_event *event); 44 struct perf_sample *sample);
45int machine__process_fork_event(struct machine *machine, union perf_event *event); 45int machine__process_exit_event(struct machine *machine, union perf_event *event,
46int machine__process_lost_event(struct machine *machine, union perf_event *event); 46 struct perf_sample *sample);
47int machine__process_mmap_event(struct machine *machine, union perf_event *event); 47int machine__process_fork_event(struct machine *machine, union perf_event *event,
48int machine__process_mmap2_event(struct machine *machine, union perf_event *event); 48 struct perf_sample *sample);
49int machine__process_event(struct machine *machine, union perf_event *event); 49int machine__process_lost_event(struct machine *machine, union perf_event *event,
50 struct perf_sample *sample);
51int machine__process_mmap_event(struct machine *machine, union perf_event *event,
52 struct perf_sample *sample);
53int machine__process_mmap2_event(struct machine *machine, union perf_event *event,
54 struct perf_sample *sample);
55int machine__process_event(struct machine *machine, union perf_event *event,
56 struct perf_sample *sample);
50 57
51typedef void (*machine__process_t)(struct machine *machine, void *data); 58typedef void (*machine__process_t)(struct machine *machine, void *data);
52 59