perf tools: Remove filter parameter of perf_event__preprocess_sample()
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 8 Aug 2013 11:32:25 +0000 (14:32 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 12 Aug 2013 13:31:11 +0000 (10:31 -0300)
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>
tools/perf/builtin-annotate.c
tools/perf/builtin-diff.c
tools/perf/builtin-mem.c
tools/perf/builtin-report.c
tools/perf/builtin-script.c
tools/perf/builtin-top.c
tools/perf/tests/hists_link.c
tools/perf/util/event.c
tools/perf/util/event.h
tools/perf/util/session.c

index 9754cb140a59a94f7bfbc735445d9c35d0d5fa54..f988d380c52f4c87b7f30cf042608a85c025c845 100644 (file)
@@ -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 addr_location al;
 
-       if (perf_event__preprocess_sample(event, machine, &al, sample,
-                                         machine->symbol_filter) < 0) {
+       if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
                pr_warning("problem processing %d event, skipping it.\n",
                           event->header.type);
                return -1;
index 93de3ac177c57cf284aad97e80ce68d74aa21ae9..f28799e94f2a4bbbb1226da3cd78b908c7b1f610 100644 (file)
@@ -319,7 +319,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
 {
        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",
                           event->header.type);
                return -1;
index f96168c769c244c493d06ac90bb3e1743f0c81de..706a1faa9559e27dc515850017a29d5c10780b43 100644 (file)
@@ -68,8 +68,7 @@ dump_raw_samples(struct perf_tool *tool,
        struct addr_location al;
        const char *fmt;
 
-       if (perf_event__preprocess_sample(event, machine, &al, sample,
-                               NULL) < 0) {
+       if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
                fprintf(stderr, "problem processing %d event, skipping it.\n",
                                event->header.type);
                return -1;
index f06a5a228c7c071a7a1c4efbe79730a17f8efb68..958a56a0e39e7f8a0ca14bbc52db3e5bdab4e0c4 100644 (file)
@@ -304,8 +304,7 @@ static int process_sample_event(struct perf_tool *tool,
        struct addr_location al;
        int ret;
 
-       if (perf_event__preprocess_sample(event, machine, &al, sample,
-                                         machine->symbol_filter) < 0) {
+       if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
                fprintf(stderr, "problem processing %d event, skipping it.\n",
                        event->header.type);
                return -1;
index 33b2d830eabdab42a593d003adb847febc35adf9..a7d623f39c46dbee5934a8dc18eb66fe735a292e 100644 (file)
@@ -520,7 +520,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
                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",
                       event->header.type);
                return -1;
index a63ade22cbc23d4821c0816b9c2472c724a639c3..e37521fc715a7313df807380376c326ab5d3e6bd 100644 (file)
@@ -716,8 +716,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
        if (event->header.misc & PERF_RECORD_MISC_EXACT_IP)
                top->exact_samples++;
 
-       if (perf_event__preprocess_sample(event, machine, &al, sample,
-                                         machine->symbol_filter) < 0 ||
+       if (perf_event__preprocess_sample(event, machine, &al, sample) < 0 ||
            al.filtered)
                return;
 
index 89085a9615e2f0878c975dc93403f74e345740f5..50bfb01183eace93ece9f9c73b7154608c506f1a 100644 (file)
@@ -220,7 +220,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
                        };
 
                        if (perf_event__preprocess_sample(&event, machine, &al,
-                                                         &sample, 0) < 0)
+                                                         &sample) < 0)
                                goto out;
 
                        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)
                        };
 
                        if (perf_event__preprocess_sample(&event, machine, &al,
-                                                         &sample, 0) < 0)
+                                                         &sample) < 0)
                                goto out;
 
                        he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1);
index cc7c0c9c9ea67bbc52e0d6dca83176f30130fc1d..f3cf771d362e051f3b822da71f4e85910b01c818 100644 (file)
@@ -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,
                                  struct machine *machine,
                                  struct addr_location *al,
-                                 struct perf_sample *sample,
-                                 symbol_filter_t filter)
+                                 struct perf_sample *sample)
 {
        u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
        struct thread *thread = machine__findnew_thread(machine, event->ip.pid);
@@ -709,7 +708,7 @@ int perf_event__preprocess_sample(const union perf_event *event,
                machine__create_kernel_maps(machine);
 
        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",
                    al->map ? al->map->dso->long_name :
                        al->level == 'H' ? "[hypervisor]" : "<not found>");
@@ -727,7 +726,8 @@ int perf_event__preprocess_sample(const union perf_event *event,
                                                   dso->long_name)))))
                        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 &&
index 6119a649d8611237ab576c003315f6a11bcd036b..15db071d96b568693c360645f4757c5e23c54ad1 100644 (file)
@@ -234,8 +234,7 @@ struct addr_location;
 int perf_event__preprocess_sample(const union perf_event *self,
                                  struct machine *machine,
                                  struct addr_location *al,
-                                 struct perf_sample *sample,
-                                 symbol_filter_t filter);
+                                 struct perf_sample *sample);
 
 const char *perf_event__name(unsigned int id);
 
index 4d9028eef34a9f5ae0ca827044c507e11244bea4..de16a77368591054b01951b7b94720be353e88af 100644 (file)
@@ -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;
        char s = print_oneline ? ' ' : '\t';
 
-       if (perf_event__preprocess_sample(event, machine, &al, sample,
-                                         NULL) < 0) {
+       if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
                error("problem processing %d event, skipping it.\n",
                        event->header.type);
                return;