diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 5de405d45230..75183a4518e6 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -150,13 +150,13 @@ static int add_event_total(struct perf_session *session, | |||
150 | return 0; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
153 | static int process_sample_event(event_t *event, struct perf_session *session) | 153 | static int process_sample_event(event_t *event, struct sample_data *sample, |
154 | struct perf_session *session) | ||
154 | { | 155 | { |
155 | struct sample_data data = { .period = 1, }; | ||
156 | struct addr_location al; | 156 | struct addr_location al; |
157 | struct perf_event_attr *attr; | 157 | struct perf_event_attr *attr; |
158 | 158 | ||
159 | if (event__preprocess_sample(event, session, &al, &data, NULL) < 0) { | 159 | if (event__preprocess_sample(event, session, &al, sample, NULL) < 0) { |
160 | fprintf(stderr, "problem processing %d event, skipping it.\n", | 160 | fprintf(stderr, "problem processing %d event, skipping it.\n", |
161 | event->header.type); | 161 | event->header.type); |
162 | return -1; | 162 | return -1; |
@@ -165,14 +165,14 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
165 | if (al.filtered || (hide_unresolved && al.sym == NULL)) | 165 | if (al.filtered || (hide_unresolved && al.sym == NULL)) |
166 | return 0; | 166 | return 0; |
167 | 167 | ||
168 | if (perf_session__add_hist_entry(session, &al, &data)) { | 168 | if (perf_session__add_hist_entry(session, &al, sample)) { |
169 | pr_debug("problem incrementing symbol period, skipping event\n"); | 169 | pr_debug("problem incrementing symbol period, skipping event\n"); |
170 | return -1; | 170 | return -1; |
171 | } | 171 | } |
172 | 172 | ||
173 | attr = perf_header__find_attr(data.id, &session->header); | 173 | attr = perf_header__find_attr(sample->id, &session->header); |
174 | 174 | ||
175 | if (add_event_total(session, &data, attr)) { | 175 | if (add_event_total(session, sample, attr)) { |
176 | pr_debug("problem adding event period\n"); | 176 | pr_debug("problem adding event period\n"); |
177 | return -1; | 177 | return -1; |
178 | } | 178 | } |
@@ -180,7 +180,8 @@ static int process_sample_event(event_t *event, struct perf_session *session) | |||
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | 182 | ||
183 | static int process_read_event(event_t *event, struct perf_session *session __used) | 183 | static int process_read_event(event_t *event, struct sample_data *sample __used, |
184 | struct perf_session *session __used) | ||
184 | { | 185 | { |
185 | struct perf_event_attr *attr; | 186 | struct perf_event_attr *attr; |
186 | 187 | ||
@@ -243,6 +244,8 @@ static struct perf_event_ops event_ops = { | |||
243 | .event_type = event__process_event_type, | 244 | .event_type = event__process_event_type, |
244 | .tracing_data = event__process_tracing_data, | 245 | .tracing_data = event__process_tracing_data, |
245 | .build_id = event__process_build_id, | 246 | .build_id = event__process_build_id, |
247 | .ordered_samples = true, | ||
248 | .ordering_requires_timestamps = true, | ||
246 | }; | 249 | }; |
247 | 250 | ||
248 | extern volatile int session_done; | 251 | extern volatile int session_done; |
@@ -307,7 +310,7 @@ static int __cmd_report(void) | |||
307 | 310 | ||
308 | signal(SIGINT, sig_handler); | 311 | signal(SIGINT, sig_handler); |
309 | 312 | ||
310 | session = perf_session__new(input_name, O_RDONLY, force, false); | 313 | session = perf_session__new(input_name, O_RDONLY, force, false, &event_ops); |
311 | if (session == NULL) | 314 | if (session == NULL) |
312 | return -ENOMEM; | 315 | return -ENOMEM; |
313 | 316 | ||
@@ -442,6 +445,8 @@ static const struct option options[] = { | |||
442 | "dump raw trace in ASCII"), | 445 | "dump raw trace in ASCII"), |
443 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, | 446 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, |
444 | "file", "vmlinux pathname"), | 447 | "file", "vmlinux pathname"), |
448 | OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, | ||
449 | "file", "kallsyms pathname"), | ||
445 | OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), | 450 | OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), |
446 | OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules, | 451 | OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules, |
447 | "load module symbols - WARNING: use only with -k and LIVE kernel"), | 452 | "load module symbols - WARNING: use only with -k and LIVE kernel"), |
@@ -478,6 +483,8 @@ static const struct option options[] = { | |||
478 | "columns '.' is reserved."), | 483 | "columns '.' is reserved."), |
479 | OPT_BOOLEAN('U', "hide-unresolved", &hide_unresolved, | 484 | OPT_BOOLEAN('U', "hide-unresolved", &hide_unresolved, |
480 | "Only display entries resolved to a symbol"), | 485 | "Only display entries resolved to a symbol"), |
486 | OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory", | ||
487 | "Look for files with symbols relative to this directory"), | ||
481 | OPT_END() | 488 | OPT_END() |
482 | }; | 489 | }; |
483 | 490 | ||