Skip to content

Commit e44baa3

Browse files
ahunter6acmel
authored andcommitted
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>
1 parent 476d35c commit e44baa3

10 files changed

Lines changed: 14 additions & 20 deletions

File tree

‎tools/perf/builtin-annotate.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ static int process_sample_event(struct perf_tool *tool,
9090
struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool);
9191
struct addr_location al;
9292

93-
if (perf_event__preprocess_sample(event, machine, &al, sample,
94-
machine->symbol_filter) < 0) {
93+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
9594
pr_warning("problem processing %d event, skipping it.\n",
9695
event->header.type);
9796
return -1;

‎tools/perf/builtin-diff.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
319319
{
320320
struct addr_location al;
321321

322-
if (perf_event__preprocess_sample(event, machine, &al, sample, NULL) < 0) {
322+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
323323
pr_warning("problem processing %d event, skipping it.\n",
324324
event->header.type);
325325
return -1;

‎tools/perf/builtin-mem.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ dump_raw_samples(struct perf_tool *tool,
6868
struct addr_location al;
6969
const char *fmt;
7070

71-
if (perf_event__preprocess_sample(event, machine, &al, sample,
72-
NULL) < 0) {
71+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
7372
fprintf(stderr, "problem processing %d event, skipping it.\n",
7473
event->header.type);
7574
return -1;

‎tools/perf/builtin-report.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@ static int process_sample_event(struct perf_tool *tool,
304304
struct addr_location al;
305305
int ret;
306306

307-
if (perf_event__preprocess_sample(event, machine, &al, sample,
308-
machine->symbol_filter) < 0) {
307+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
309308
fprintf(stderr, "problem processing %d event, skipping it.\n",
310309
event->header.type);
311310
return -1;

‎tools/perf/builtin-script.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
520520
return 0;
521521
}
522522

523-
if (perf_event__preprocess_sample(event, machine, &al, sample, 0) < 0) {
523+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
524524
pr_err("problem processing %d event, skipping it.\n",
525525
event->header.type);
526526
return -1;

‎tools/perf/builtin-top.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
716716
if (event->header.misc & PERF_RECORD_MISC_EXACT_IP)
717717
top->exact_samples++;
718718

719-
if (perf_event__preprocess_sample(event, machine, &al, sample,
720-
machine->symbol_filter) < 0 ||
719+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0 ||
721720
al.filtered)
722721
return;
723722

‎tools/perf/tests/hists_link.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
220220
};
221221

222222
if (perf_event__preprocess_sample(&event, machine, &al,
223-
&sample, 0) < 0)
223+
&sample) < 0)
224224
goto out;
225225

226226
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)
244244
};
245245

246246
if (perf_event__preprocess_sample(&event, machine, &al,
247-
&sample, 0) < 0)
247+
&sample) < 0)
248248
goto out;
249249

250250
he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1);

‎tools/perf/util/event.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,7 @@ void thread__find_addr_location(struct thread *thread, struct machine *machine,
683683
int perf_event__preprocess_sample(const union perf_event *event,
684684
struct machine *machine,
685685
struct addr_location *al,
686-
struct perf_sample *sample,
687-
symbol_filter_t filter)
686+
struct perf_sample *sample)
688687
{
689688
u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
690689
struct thread *thread = machine__findnew_thread(machine, event->ip.pid);
@@ -709,7 +708,7 @@ int perf_event__preprocess_sample(const union perf_event *event,
709708
machine__create_kernel_maps(machine);
710709

711710
thread__find_addr_map(thread, machine, cpumode, MAP__FUNCTION,
712-
event->ip.ip, al, filter);
711+
event->ip.ip, al, machine->symbol_filter);
713712
dump_printf(" ...... dso: %s\n",
714713
al->map ? al->map->dso->long_name :
715714
al->level == 'H' ? "[hypervisor]" : "<not found>");
@@ -727,7 +726,8 @@ int perf_event__preprocess_sample(const union perf_event *event,
727726
dso->long_name)))))
728727
goto out_filtered;
729728

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);
731731
}
732732

733733
if (symbol_conf.sym_list &&

‎tools/perf/util/event.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ struct addr_location;
234234
int perf_event__preprocess_sample(const union perf_event *self,
235235
struct machine *machine,
236236
struct addr_location *al,
237-
struct perf_sample *sample,
238-
symbol_filter_t filter);
237+
struct perf_sample *sample);
239238

240239
const char *perf_event__name(unsigned int id);
241240

‎tools/perf/util/session.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,8 +1503,7 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
15031503
int print_oneline = print_opts & PRINT_IP_OPT_ONELINE;
15041504
char s = print_oneline ? ' ' : '\t';
15051505

1506-
if (perf_event__preprocess_sample(event, machine, &al, sample,
1507-
NULL) < 0) {
1506+
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
15081507
error("problem processing %d event, skipping it.\n",
15091508
event->header.type);
15101509
return;

0 commit comments

Comments
 (0)