diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-09-11 10:18:24 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-04 09:57:06 -0500 |
commit | 162f0befda3becc2cc9f44075fccc030e55baec1 (patch) | |
tree | 5f8ea7a9a2fcb28d1ab742e73a56497c078a33f9 /tools/perf/tests | |
parent | b9c5143a012a543c4ee872498d6dbae5c10beb2e (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/tests')
-rw-r--r-- | tools/perf/tests/code-reading.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/hists_link.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index e3fedfa2906e..49ccc3b2995e 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -276,7 +276,7 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist, | |||
276 | return process_sample_event(machine, evlist, event, state); | 276 | return process_sample_event(machine, evlist, event, state); |
277 | 277 | ||
278 | if (event->header.type < PERF_RECORD_MAX) | 278 | if (event->header.type < PERF_RECORD_MAX) |
279 | return machine__process_event(machine, event); | 279 | return machine__process_event(machine, event, NULL); |
280 | 280 | ||
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index 4475b0ff76e5..6c337e653540 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c | |||
@@ -93,7 +93,7 @@ static struct machine *setup_fake_machine(struct machines *machines) | |||
93 | if (thread == NULL) | 93 | if (thread == NULL) |
94 | goto out; | 94 | goto out; |
95 | 95 | ||
96 | thread__set_comm(thread, fake_threads[i].comm); | 96 | thread__set_comm(thread, fake_threads[i].comm, 0); |
97 | } | 97 | } |
98 | 98 | ||
99 | for (i = 0; i < ARRAY_SIZE(fake_mmap_info); i++) { | 99 | for (i = 0; i < ARRAY_SIZE(fake_mmap_info); i++) { |
@@ -110,7 +110,7 @@ static struct machine *setup_fake_machine(struct machines *machines) | |||
110 | strcpy(fake_mmap_event.mmap.filename, | 110 | strcpy(fake_mmap_event.mmap.filename, |
111 | fake_mmap_info[i].filename); | 111 | fake_mmap_info[i].filename); |
112 | 112 | ||
113 | machine__process_mmap_event(machine, &fake_mmap_event); | 113 | machine__process_mmap_event(machine, &fake_mmap_event, NULL); |
114 | } | 114 | } |
115 | 115 | ||
116 | for (i = 0; i < ARRAY_SIZE(fake_symbols); i++) { | 116 | for (i = 0; i < ARRAY_SIZE(fake_symbols); i++) { |