Commit e44baa3e authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

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: default avatarAdrian 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 476d35c2
...@@ -90,8 +90,7 @@ static int process_sample_event(struct perf_tool *tool, ...@@ -90,8 +90,7 @@ static int process_sample_event(struct perf_tool *tool,
struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool);
struct addr_location al; struct addr_location al;
if (perf_event__preprocess_sample(event, machine, &al, sample, if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
machine->symbol_filter) < 0) {
pr_warning("problem processing %d event, skipping it.\n", pr_warning("problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
......
...@@ -319,7 +319,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused, ...@@ -319,7 +319,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
{ {
struct addr_location al; struct addr_location al;
if (perf_event__preprocess_sample(event, machine, &al, sample, NULL) < 0) { if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
pr_warning("problem processing %d event, skipping it.\n", pr_warning("problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
......
...@@ -68,8 +68,7 @@ dump_raw_samples(struct perf_tool *tool, ...@@ -68,8 +68,7 @@ dump_raw_samples(struct perf_tool *tool,
struct addr_location al; struct addr_location al;
const char *fmt; const char *fmt;
if (perf_event__preprocess_sample(event, machine, &al, sample, if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
NULL) < 0) {
fprintf(stderr, "problem processing %d event, skipping it.\n", fprintf(stderr, "problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
......
...@@ -304,8 +304,7 @@ static int process_sample_event(struct perf_tool *tool, ...@@ -304,8 +304,7 @@ static int process_sample_event(struct perf_tool *tool,
struct addr_location al; struct addr_location al;
int ret; int ret;
if (perf_event__preprocess_sample(event, machine, &al, sample, if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
machine->symbol_filter) < 0) {
fprintf(stderr, "problem processing %d event, skipping it.\n", fprintf(stderr, "problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
......
...@@ -520,7 +520,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, ...@@ -520,7 +520,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
return 0; return 0;
} }
if (perf_event__preprocess_sample(event, machine, &al, sample, 0) < 0) { if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
pr_err("problem processing %d event, skipping it.\n", pr_err("problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
......
...@@ -716,8 +716,7 @@ static void perf_event__process_sample(struct perf_tool *tool, ...@@ -716,8 +716,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
if (event->header.misc & PERF_RECORD_MISC_EXACT_IP) if (event->header.misc & PERF_RECORD_MISC_EXACT_IP)
top->exact_samples++; top->exact_samples++;
if (perf_event__preprocess_sample(event, machine, &al, sample, if (perf_event__preprocess_sample(event, machine, &al, sample) < 0 ||
machine->symbol_filter) < 0 ||
al.filtered) al.filtered)
return; return;
......
...@@ -220,7 +220,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine) ...@@ -220,7 +220,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
}; };
if (perf_event__preprocess_sample(&event, machine, &al, if (perf_event__preprocess_sample(&event, machine, &al,
&sample, 0) < 0) &sample) < 0)
goto out; goto out;
he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); 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,7 +244,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
}; };
if (perf_event__preprocess_sample(&event, machine, &al, if (perf_event__preprocess_sample(&event, machine, &al,
&sample, 0) < 0) &sample) < 0)
goto out; goto out;
he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1); he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1);
......
...@@ -683,8 +683,7 @@ void thread__find_addr_location(struct thread *thread, struct machine *machine, ...@@ -683,8 +683,7 @@ void thread__find_addr_location(struct thread *thread, struct machine *machine,
int perf_event__preprocess_sample(const union perf_event *event, int perf_event__preprocess_sample(const union perf_event *event,
struct machine *machine, struct machine *machine,
struct addr_location *al, struct addr_location *al,
struct perf_sample *sample, struct perf_sample *sample)
symbol_filter_t filter)
{ {
u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
struct thread *thread = machine__findnew_thread(machine, event->ip.pid); 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,7 +708,7 @@ int perf_event__preprocess_sample(const union perf_event *event,
machine__create_kernel_maps(machine); machine__create_kernel_maps(machine);
thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION, thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION,
event->ip.ip, al, filter); event->ip.ip, al, machine->symbol_filter);
dump_printf(" ...... dso: %s\n", dump_printf(" ...... dso: %s\n",
al->map ? al->map->dso->long_name : al->map ? al->map->dso->long_name :
al->level == 'H' ? "[hypervisor]" : "<not found>"); al->level == 'H' ? "[hypervisor]" : "<not found>");
...@@ -727,7 +726,8 @@ int perf_event__preprocess_sample(const union perf_event *event, ...@@ -727,7 +726,8 @@ int perf_event__preprocess_sample(const union perf_event *event,
dso->long_name))))) dso->long_name)))))
goto out_filtered; goto out_filtered;
al->sym = map__find_symbol(al->map, al->addr, filter); al->sym = map__find_symbol(al->map, al->addr,
machine->symbol_filter);
} }
if (symbol_conf.sym_list && if (symbol_conf.sym_list &&
......
...@@ -234,8 +234,7 @@ struct addr_location; ...@@ -234,8 +234,7 @@ struct addr_location;
int perf_event__preprocess_sample(const union perf_event *self, int perf_event__preprocess_sample(const union perf_event *self,
struct machine *machine, struct machine *machine,
struct addr_location *al, struct addr_location *al,
struct perf_sample *sample, struct perf_sample *sample);
symbol_filter_t filter);
const char *perf_event__name(unsigned int id); const char *perf_event__name(unsigned int id);
......
...@@ -1503,8 +1503,7 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event, ...@@ -1503,8 +1503,7 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
int print_oneline = print_opts & PRINT_IP_OPT_ONELINE; int print_oneline = print_opts & PRINT_IP_OPT_ONELINE;
char s = print_oneline ? ' ' : '\t'; char s = print_oneline ? ' ' : '\t';
if (perf_event__preprocess_sample(event, machine, &al, sample, if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
NULL) < 0) {
error("problem processing %d event, skipping it.\n", error("problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment