diff options
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 80c9e062bd5b..70f1075cc5b0 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -152,7 +152,7 @@ static int parse_source(struct sym_entry *syme) | |||
152 | /* | 152 | /* |
153 | * We can't annotate with just /proc/kallsyms | 153 | * We can't annotate with just /proc/kallsyms |
154 | */ | 154 | */ |
155 | if (map->dso->origin == DSO__ORIG_KERNEL) { | 155 | if (map->dso->symtab_type == SYMTAB__KALLSYMS) { |
156 | pr_err("Can't annotate %s: No vmlinux file was found in the " | 156 | pr_err("Can't annotate %s: No vmlinux file was found in the " |
157 | "path\n", sym->name); | 157 | "path\n", sym->name); |
158 | sleep(1); | 158 | sleep(1); |
@@ -515,24 +515,25 @@ static void handle_keypress(struct perf_session *session, int c) | |||
515 | break; | 515 | break; |
516 | case 'E': | 516 | case 'E': |
517 | if (top.evlist->nr_entries > 1) { | 517 | if (top.evlist->nr_entries > 1) { |
518 | int counter; | ||
518 | fprintf(stderr, "\nAvailable events:"); | 519 | fprintf(stderr, "\nAvailable events:"); |
519 | 520 | ||
520 | list_for_each_entry(top.sym_evsel, &top.evlist->entries, node) | 521 | list_for_each_entry(top.sym_evsel, &top.evlist->entries, node) |
521 | fprintf(stderr, "\n\t%d %s", top.sym_evsel->idx, event_name(top.sym_evsel)); | 522 | fprintf(stderr, "\n\t%d %s", top.sym_evsel->idx, event_name(top.sym_evsel)); |
522 | 523 | ||
523 | prompt_integer(&top.sym_counter, "Enter details event counter"); | 524 | prompt_integer(&counter, "Enter details event counter"); |
524 | 525 | ||
525 | if (top.sym_counter >= top.evlist->nr_entries) { | 526 | if (counter >= top.evlist->nr_entries) { |
526 | top.sym_evsel = list_entry(top.evlist->entries.next, struct perf_evsel, node); | 527 | top.sym_evsel = list_entry(top.evlist->entries.next, struct perf_evsel, node); |
527 | top.sym_counter = 0; | ||
528 | fprintf(stderr, "Sorry, no such event, using %s.\n", event_name(top.sym_evsel)); | 528 | fprintf(stderr, "Sorry, no such event, using %s.\n", event_name(top.sym_evsel)); |
529 | sleep(1); | 529 | sleep(1); |
530 | break; | 530 | break; |
531 | } | 531 | } |
532 | list_for_each_entry(top.sym_evsel, &top.evlist->entries, node) | 532 | list_for_each_entry(top.sym_evsel, &top.evlist->entries, node) |
533 | if (top.sym_evsel->idx == top.sym_counter) | 533 | if (top.sym_evsel->idx == counter) |
534 | break; | 534 | break; |
535 | } else top.sym_counter = 0; | 535 | } else |
536 | top.sym_evsel = list_entry(top.evlist->entries.next, struct perf_evsel, node); | ||
536 | break; | 537 | break; |
537 | case 'f': | 538 | case 'f': |
538 | prompt_integer(&top.count_filter, "Enter display event count filter"); | 539 | prompt_integer(&top.count_filter, "Enter display event count filter"); |
@@ -675,7 +676,7 @@ static int symbol_filter(struct map *map, struct symbol *sym) | |||
675 | 676 | ||
676 | for (i = 0; skip_symbols[i]; i++) { | 677 | for (i = 0; skip_symbols[i]; i++) { |
677 | if (!strcmp(skip_symbols[i], name)) { | 678 | if (!strcmp(skip_symbols[i], name)) { |
678 | syme->skip = 1; | 679 | sym->ignore = true; |
679 | break; | 680 | break; |
680 | } | 681 | } |
681 | } | 682 | } |
@@ -768,7 +769,7 @@ static void perf_event__process_sample(const union perf_event *event, | |||
768 | struct symbol *sym = sym_entry__symbol(top.sym_filter_entry); | 769 | struct symbol *sym = sym_entry__symbol(top.sym_filter_entry); |
769 | 770 | ||
770 | pr_err("Can't annotate %s", sym->name); | 771 | pr_err("Can't annotate %s", sym->name); |
771 | if (top.sym_filter_entry->map->dso->origin == DSO__ORIG_KERNEL) { | 772 | if (top.sym_filter_entry->map->dso->symtab_type == SYMTAB__KALLSYMS) { |
772 | pr_err(": No vmlinux file was found in the path:\n"); | 773 | pr_err(": No vmlinux file was found in the path:\n"); |
773 | machine__fprintf_vmlinux_path(machine, stderr); | 774 | machine__fprintf_vmlinux_path(machine, stderr); |
774 | } else | 775 | } else |
@@ -778,10 +779,9 @@ static void perf_event__process_sample(const union perf_event *event, | |||
778 | } | 779 | } |
779 | 780 | ||
780 | syme = symbol__priv(al.sym); | 781 | syme = symbol__priv(al.sym); |
781 | if (!syme->skip) { | 782 | if (!al.sym->ignore) { |
782 | struct perf_evsel *evsel; | 783 | struct perf_evsel *evsel; |
783 | 784 | ||
784 | syme->origin = origin; | ||
785 | evsel = perf_evlist__id2evsel(top.evlist, sample->id); | 785 | evsel = perf_evlist__id2evsel(top.evlist, sample->id); |
786 | assert(evsel != NULL); | 786 | assert(evsel != NULL); |
787 | syme->count[evsel->idx]++; | 787 | syme->count[evsel->idx]++; |