diff options
Diffstat (limited to 'tools/perf/builtin-annotate.c')
| -rw-r--r-- | tools/perf/builtin-annotate.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 2e2855a685c6..e656e25f1c14 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
| @@ -51,11 +51,6 @@ struct sym_priv { | |||
| 51 | struct sym_ext *ext; | 51 | struct sym_ext *ext; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | static struct symbol_conf symbol_conf = { | ||
| 55 | .priv_size = sizeof(struct sym_priv), | ||
| 56 | .try_vmlinux_path = true, | ||
| 57 | }; | ||
| 58 | |||
| 59 | static const char *sym_hist_filter; | 54 | static const char *sym_hist_filter; |
| 60 | 55 | ||
| 61 | static int symbol_filter(struct map *map __used, struct symbol *sym) | 56 | static int symbol_filter(struct map *map __used, struct symbol *sym) |
| @@ -464,10 +459,10 @@ static struct perf_event_ops event_ops = { | |||
| 464 | 459 | ||
| 465 | static int __cmd_annotate(void) | 460 | static int __cmd_annotate(void) |
| 466 | { | 461 | { |
| 467 | struct perf_session *session = perf_session__new(input_name, O_RDONLY, | ||
| 468 | force, &symbol_conf); | ||
| 469 | int ret; | 462 | int ret; |
| 463 | struct perf_session *session; | ||
| 470 | 464 | ||
| 465 | session = perf_session__new(input_name, O_RDONLY, force); | ||
| 471 | if (session == NULL) | 466 | if (session == NULL) |
| 472 | return -ENOMEM; | 467 | return -ENOMEM; |
| 473 | 468 | ||
| @@ -523,7 +518,10 @@ static const struct option options[] = { | |||
| 523 | 518 | ||
| 524 | int cmd_annotate(int argc, const char **argv, const char *prefix __used) | 519 | int cmd_annotate(int argc, const char **argv, const char *prefix __used) |
| 525 | { | 520 | { |
| 526 | if (symbol__init(&symbol_conf) < 0) | 521 | symbol_conf.priv_size = sizeof(struct sym_priv); |
| 522 | symbol_conf.try_vmlinux_path = true; | ||
| 523 | |||
| 524 | if (symbol__init() < 0) | ||
| 527 | return -1; | 525 | return -1; |
| 528 | 526 | ||
| 529 | argc = parse_options(argc, argv, options, annotate_usage, 0); | 527 | argc = parse_options(argc, argv, options, annotate_usage, 0); |
