diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-06-04 07:02:07 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-06-05 08:35:19 -0400 |
commit | 41a37e20178b081193b08b228030d8f562bfee62 (patch) | |
tree | 126bc2f2f11231955fad89bf2ef6e83969b6325e /tools/perf/builtin-report.c | |
parent | 45d8e8025a2b2a6996be92d769fb6763bfb3cbae (diff) |
perf tools: Make event__preprocess_sample parse the sample
Simplifying the tools that were using both in sequence and allowing
upcoming simplifications, such as Arun's patch to sort by cpus.
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 207da1849800..371a3c995806 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -155,31 +155,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
155 | struct addr_location al; | 155 | struct addr_location al; |
156 | struct perf_event_attr *attr; | 156 | struct perf_event_attr *attr; |
157 | 157 | ||
158 | event__parse_sample(event, session->sample_type, &data); | 158 | if (event__preprocess_sample(event, session, &al, &data, NULL) < 0) { |
159 | |||
160 | dump_printf("(IP, %d): %d/%d: %#Lx period: %Ld cpu:%d\n", | ||
161 | event->header.misc, data.pid, data.tid, data.ip, | ||
162 | data.period, data.cpu); | ||
163 | |||
164 | if (session->sample_type & PERF_SAMPLE_CALLCHAIN) { | ||
165 | unsigned int i; | ||
166 | |||
167 | dump_printf("... chain: nr:%Lu\n", data.callchain->nr); | ||
168 | |||
169 | if (!ip_callchain__valid(data.callchain, event)) { | ||
170 | pr_debug("call-chain problem with event, " | ||
171 | "skipping it.\n"); | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | if (dump_trace) { | ||
176 | for (i = 0; i < data.callchain->nr; i++) | ||
177 | dump_printf("..... %2d: %016Lx\n", | ||
178 | i, data.callchain->ips[i]); | ||
179 | } | ||
180 | } | ||
181 | |||
182 | if (event__preprocess_sample(event, session, &al, NULL) < 0) { | ||
183 | fprintf(stderr, "problem processing %d event, skipping it.\n", | 159 | fprintf(stderr, "problem processing %d event, skipping it.\n", |
184 | event->header.type); | 160 | event->header.type); |
185 | return -1; | 161 | return -1; |