diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-08-08 07:32:25 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-08-12 09:31:11 -0400 |
commit | e44baa3ea1eaa09d7d247a9b245fcff06561bf96 (patch) | |
tree | e5ce4f6122f60dc2738a381b36775233503f35e5 | |
parent | 476d35c2f3a48f81691daad06bc9668c516428d9 (diff) |
perf tools: Remove filter parameter of perf_event__preprocess_sample()
Now that the symbol filter is recorded on the machine there is no need
to pass it to perf_event__preprocess_sample(). So remove it.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1375961547-30267-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-annotate.c | 3 | ||||
-rw-r--r-- | tools/perf/builtin-diff.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-mem.c | 3 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 3 | ||||
-rw-r--r-- | tools/perf/builtin-script.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 3 | ||||
-rw-r--r-- | tools/perf/tests/hists_link.c | 4 | ||||
-rw-r--r-- | tools/perf/util/event.c | 8 | ||||
-rw-r--r-- | tools/perf/util/event.h | 3 | ||||
-rw-r--r-- | tools/perf/util/session.c | 3 |
10 files changed, 14 insertions, 20 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 9754cb140a59..f988d380c52f 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -90,8 +90,7 @@ static int process_sample_event(struct perf_tool *tool, | |||
90 | struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); | 90 | struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); |
91 | struct addr_location al; | 91 | struct addr_location al; |
92 | 92 | ||
93 | if (perf_event__preprocess_sample(event, machine, &al, sample, | 93 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
94 | machine->symbol_filter) < 0) { | ||
95 | pr_warning("problem processing %d event, skipping it.\n", | 94 | pr_warning("problem processing %d event, skipping it.\n", |
96 | event->header.type); | 95 | event->header.type); |
97 | return -1; | 96 | return -1; |
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 93de3ac177c5..f28799e94f2a 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -319,7 +319,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused, | |||
319 | { | 319 | { |
320 | struct addr_location al; | 320 | struct addr_location al; |
321 | 321 | ||
322 | if (perf_event__preprocess_sample(event, machine, &al, sample, NULL) < 0) { | 322 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
323 | pr_warning("problem processing %d event, skipping it.\n", | 323 | pr_warning("problem processing %d event, skipping it.\n", |
324 | event->header.type); | 324 | event->header.type); |
325 | return -1; | 325 | return -1; |
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index f96168c769c2..706a1faa9559 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c | |||
@@ -68,8 +68,7 @@ dump_raw_samples(struct perf_tool *tool, | |||
68 | struct addr_location al; | 68 | struct addr_location al; |
69 | const char *fmt; | 69 | const char *fmt; |
70 | 70 | ||
71 | if (perf_event__preprocess_sample(event, machine, &al, sample, | 71 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
72 | NULL) < 0) { | ||
73 | fprintf(stderr, "problem processing %d event, skipping it.\n", | 72 | fprintf(stderr, "problem processing %d event, skipping it.\n", |
74 | event->header.type); | 73 | event->header.type); |
75 | return -1; | 74 | return -1; |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index f06a5a228c7c..958a56a0e39e 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -304,8 +304,7 @@ static int process_sample_event(struct perf_tool *tool, | |||
304 | struct addr_location al; | 304 | struct addr_location al; |
305 | int ret; | 305 | int ret; |
306 | 306 | ||
307 | if (perf_event__preprocess_sample(event, machine, &al, sample, | 307 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
308 | machine->symbol_filter) < 0) { | ||
309 | fprintf(stderr, "problem processing %d event, skipping it.\n", | 308 | fprintf(stderr, "problem processing %d event, skipping it.\n", |
310 | event->header.type); | 309 | event->header.type); |
311 | return -1; | 310 | return -1; |
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 33b2d830eabd..a7d623f39c46 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -520,7 +520,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, | |||
520 | return 0; | 520 | return 0; |
521 | } | 521 | } |
522 | 522 | ||
523 | if (perf_event__preprocess_sample(event, machine, &al, sample, 0) < 0) { | 523 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
524 | pr_err("problem processing %d event, skipping it.\n", | 524 | pr_err("problem processing %d event, skipping it.\n", |
525 | event->header.type); | 525 | event->header.type); |
526 | return -1; | 526 | return -1; |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index a63ade22cbc2..e37521fc715a 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -716,8 +716,7 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
716 | if (event->header.misc & PERF_RECORD_MISC_EXACT_IP) | 716 | if (event->header.misc & PERF_RECORD_MISC_EXACT_IP) |
717 | top->exact_samples++; | 717 | top->exact_samples++; |
718 | 718 | ||
719 | if (perf_event__preprocess_sample(event, machine, &al, sample, | 719 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0 || |
720 | machine->symbol_filter) < 0 || | ||
721 | al.filtered) | 720 | al.filtered) |
722 | return; | 721 | return; |
723 | 722 | ||
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index 89085a9615e2..50bfb01183ea 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c | |||
@@ -220,7 +220,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine) | |||
220 | }; | 220 | }; |
221 | 221 | ||
222 | if (perf_event__preprocess_sample(&event, machine, &al, | 222 | if (perf_event__preprocess_sample(&event, machine, &al, |
223 | &sample, 0) < 0) | 223 | &sample) < 0) |
224 | goto out; | 224 | goto out; |
225 | 225 | ||
226 | he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); | 226 | he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); |
@@ -244,7 +244,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine) | |||
244 | }; | 244 | }; |
245 | 245 | ||
246 | if (perf_event__preprocess_sample(&event, machine, &al, | 246 | if (perf_event__preprocess_sample(&event, machine, &al, |
247 | &sample, 0) < 0) | 247 | &sample) < 0) |
248 | goto out; | 248 | goto out; |
249 | 249 | ||
250 | he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); | 250 | he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index cc7c0c9c9ea6..f3cf771d362e 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -683,8 +683,7 @@ void thread__find_addr_location(struct thread *thread, struct machine *machine, | |||
683 | int perf_event__preprocess_sample(const union perf_event *event, | 683 | int perf_event__preprocess_sample(const union perf_event *event, |
684 | struct machine *machine, | 684 | struct machine *machine, |
685 | struct addr_location *al, | 685 | struct addr_location *al, |
686 | struct perf_sample *sample, | 686 | struct perf_sample *sample) |
687 | symbol_filter_t filter) | ||
688 | { | 687 | { |
689 | u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 688 | u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
690 | struct thread *thread = machine__findnew_thread(machine, event->ip.pid); | 689 | struct thread *thread = machine__findnew_thread(machine, event->ip.pid); |
@@ -709,7 +708,7 @@ int perf_event__preprocess_sample(const union perf_event *event, | |||
709 | machine__create_kernel_maps(machine); | 708 | machine__create_kernel_maps(machine); |
710 | 709 | ||
711 | thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION, | 710 | thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION, |
712 | event->ip.ip, al, filter); | 711 | event->ip.ip, al, machine->symbol_filter); |
713 | dump_printf(" ...... dso: %s\n", | 712 | dump_printf(" ...... dso: %s\n", |
714 | al->map ? al->map->dso->long_name : | 713 | al->map ? al->map->dso->long_name : |
715 | al->level == 'H' ? "[hypervisor]" : "<not found>"); | 714 | al->level == 'H' ? "[hypervisor]" : "<not found>"); |
@@ -727,7 +726,8 @@ int perf_event__preprocess_sample(const union perf_event *event, | |||
727 | dso->long_name))))) | 726 | dso->long_name))))) |
728 | goto out_filtered; | 727 | goto out_filtered; |
729 | 728 | ||
730 | al->sym = map__find_symbol(al->map, al->addr, filter); | 729 | al->sym = map__find_symbol(al->map, al->addr, |
730 | machine->symbol_filter); | ||
731 | } | 731 | } |
732 | 732 | ||
733 | if (symbol_conf.sym_list && | 733 | if (symbol_conf.sym_list && |
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 6119a649d861..15db071d96b5 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -234,8 +234,7 @@ struct addr_location; | |||
234 | int perf_event__preprocess_sample(const union perf_event *self, | 234 | int perf_event__preprocess_sample(const union perf_event *self, |
235 | struct machine *machine, | 235 | struct machine *machine, |
236 | struct addr_location *al, | 236 | struct addr_location *al, |
237 | struct perf_sample *sample, | 237 | struct perf_sample *sample); |
238 | symbol_filter_t filter); | ||
239 | 238 | ||
240 | const char *perf_event__name(unsigned int id); | 239 | const char *perf_event__name(unsigned int id); |
241 | 240 | ||
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 4d9028eef34a..de16a7736859 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1503,8 +1503,7 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event, | |||
1503 | int print_oneline = print_opts & PRINT_IP_OPT_ONELINE; | 1503 | int print_oneline = print_opts & PRINT_IP_OPT_ONELINE; |
1504 | char s = print_oneline ? ' ' : '\t'; | 1504 | char s = print_oneline ? ' ' : '\t'; |
1505 | 1505 | ||
1506 | if (perf_event__preprocess_sample(event, machine, &al, sample, | 1506 | if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { |
1507 | NULL) < 0) { | ||
1508 | error("problem processing %d event, skipping it.\n", | 1507 | error("problem processing %d event, skipping it.\n", |
1509 | event->header.type); | 1508 | event->header.type); |
1510 | return; | 1509 | return; |