diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-01 17:53:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-05 10:14:50 -0400 |
commit | 0890e97c20333c439a9bda6a94dd16ed5f508429 (patch) | |
tree | 97547f589b9e54e28d03d846ca4b240592b30c8a | |
parent | b6220212d48a9bfbc694d10b38dbdfbaab81f4a0 (diff) |
perf machine: Remove machine->symbol_filter and friends
Including machines__set_symbol_filter(), not used anymore.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-7o1qgmrpvzuis4a9f0t8mnri@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/event.c | 8 | ||||
-rw-r--r-- | tools/perf/util/intel-bts.c | 2 | ||||
-rw-r--r-- | tools/perf/util/intel-pt.c | 4 | ||||
-rw-r--r-- | tools/perf/util/machine.c | 21 | ||||
-rw-r--r-- | tools/perf/util/machine.h | 4 |
5 files changed, 7 insertions, 32 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index e20438b784be..2f91183f2779 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -1286,7 +1286,7 @@ try_again: | |||
1286 | * must be done prior to using kernel maps. | 1286 | * must be done prior to using kernel maps. |
1287 | */ | 1287 | */ |
1288 | if (load_map) | 1288 | if (load_map) |
1289 | map__load(al->map, machine->symbol_filter); | 1289 | map__load(al->map, NULL); |
1290 | al->addr = al->map->map_ip(al->map, al->addr); | 1290 | al->addr = al->map->map_ip(al->map, al->addr); |
1291 | } | 1291 | } |
1292 | } | 1292 | } |
@@ -1297,8 +1297,7 @@ void thread__find_addr_location(struct thread *thread, | |||
1297 | { | 1297 | { |
1298 | thread__find_addr_map(thread, cpumode, type, addr, al); | 1298 | thread__find_addr_map(thread, cpumode, type, addr, al); |
1299 | if (al->map != NULL) | 1299 | if (al->map != NULL) |
1300 | al->sym = map__find_symbol(al->map, al->addr, | 1300 | al->sym = map__find_symbol(al->map, al->addr, NULL); |
1301 | thread->mg->machine->symbol_filter); | ||
1302 | else | 1301 | else |
1303 | al->sym = NULL; | 1302 | al->sym = NULL; |
1304 | } | 1303 | } |
@@ -1359,8 +1358,7 @@ int machine__resolve(struct machine *machine, struct addr_location *al, | |||
1359 | al->filtered |= (1 << HIST_FILTER__DSO); | 1358 | al->filtered |= (1 << HIST_FILTER__DSO); |
1360 | } | 1359 | } |
1361 | 1360 | ||
1362 | al->sym = map__find_symbol(al->map, al->addr, | 1361 | al->sym = map__find_symbol(al->map, al->addr, NULL); |
1363 | machine->symbol_filter); | ||
1364 | } | 1362 | } |
1365 | 1363 | ||
1366 | if (symbol_conf.sym_list && | 1364 | if (symbol_conf.sym_list && |
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 749e6f2e37ca..240b095eddba 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c | |||
@@ -346,7 +346,7 @@ static int intel_bts_get_next_insn(struct intel_bts_queue *btsq, u64 ip) | |||
346 | goto out_put; | 346 | goto out_put; |
347 | 347 | ||
348 | /* Load maps to ensure dso->is_64_bit has been updated */ | 348 | /* Load maps to ensure dso->is_64_bit has been updated */ |
349 | map__load(al.map, machine->symbol_filter); | 349 | map__load(al.map, NULL); |
350 | 350 | ||
351 | x86_64 = al.map->dso->is_64_bit; | 351 | x86_64 = al.map->dso->is_64_bit; |
352 | 352 | ||
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 551ff6f640be..d594052c8184 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c | |||
@@ -477,7 +477,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn, | |||
477 | start_ip = *ip; | 477 | start_ip = *ip; |
478 | 478 | ||
479 | /* Load maps to ensure dso->is_64_bit has been updated */ | 479 | /* Load maps to ensure dso->is_64_bit has been updated */ |
480 | map__load(al.map, machine->symbol_filter); | 480 | map__load(al.map, NULL); |
481 | 481 | ||
482 | x86_64 = al.map->dso->is_64_bit; | 482 | x86_64 = al.map->dso->is_64_bit; |
483 | 483 | ||
@@ -1294,7 +1294,7 @@ static u64 intel_pt_switch_ip(struct intel_pt *pt, u64 *ptss_ip) | |||
1294 | if (!map) | 1294 | if (!map) |
1295 | return 0; | 1295 | return 0; |
1296 | 1296 | ||
1297 | if (map__load(map, machine->symbol_filter)) | 1297 | if (map__load(map, NULL)) |
1298 | return 0; | 1298 | return 0; |
1299 | 1299 | ||
1300 | start = dso__first_symbol(map->dso, MAP__FUNCTION); | 1300 | start = dso__first_symbol(map->dso, MAP__FUNCTION); |
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index cb6388dbdd98..7940ddc98f8c 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c | |||
@@ -41,7 +41,6 @@ int machine__init(struct machine *machine, const char *root_dir, pid_t pid) | |||
41 | 41 | ||
42 | machine->pid = pid; | 42 | machine->pid = pid; |
43 | 43 | ||
44 | machine->symbol_filter = NULL; | ||
45 | machine->id_hdr_size = 0; | 44 | machine->id_hdr_size = 0; |
46 | machine->kptr_restrict_warned = false; | 45 | machine->kptr_restrict_warned = false; |
47 | machine->comm_exec = false; | 46 | machine->comm_exec = false; |
@@ -148,7 +147,6 @@ void machines__init(struct machines *machines) | |||
148 | { | 147 | { |
149 | machine__init(&machines->host, "", HOST_KERNEL_ID); | 148 | machine__init(&machines->host, "", HOST_KERNEL_ID); |
150 | machines->guests = RB_ROOT; | 149 | machines->guests = RB_ROOT; |
151 | machines->symbol_filter = NULL; | ||
152 | } | 150 | } |
153 | 151 | ||
154 | void machines__exit(struct machines *machines) | 152 | void machines__exit(struct machines *machines) |
@@ -172,8 +170,6 @@ struct machine *machines__add(struct machines *machines, pid_t pid, | |||
172 | return NULL; | 170 | return NULL; |
173 | } | 171 | } |
174 | 172 | ||
175 | machine->symbol_filter = machines->symbol_filter; | ||
176 | |||
177 | while (*p != NULL) { | 173 | while (*p != NULL) { |
178 | parent = *p; | 174 | parent = *p; |
179 | pos = rb_entry(parent, struct machine, rb_node); | 175 | pos = rb_entry(parent, struct machine, rb_node); |
@@ -189,21 +185,6 @@ struct machine *machines__add(struct machines *machines, pid_t pid, | |||
189 | return machine; | 185 | return machine; |
190 | } | 186 | } |
191 | 187 | ||
192 | void machines__set_symbol_filter(struct machines *machines, | ||
193 | symbol_filter_t symbol_filter) | ||
194 | { | ||
195 | struct rb_node *nd; | ||
196 | |||
197 | machines->symbol_filter = symbol_filter; | ||
198 | machines->host.symbol_filter = symbol_filter; | ||
199 | |||
200 | for (nd = rb_first(&machines->guests); nd; nd = rb_next(nd)) { | ||
201 | struct machine *machine = rb_entry(nd, struct machine, rb_node); | ||
202 | |||
203 | machine->symbol_filter = symbol_filter; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | void machines__set_comm_exec(struct machines *machines, bool comm_exec) | 188 | void machines__set_comm_exec(struct machines *machines, bool comm_exec) |
208 | { | 189 | { |
209 | struct rb_node *nd; | 190 | struct rb_node *nd; |
@@ -2115,7 +2096,7 @@ int machine__get_kernel_start(struct machine *machine) | |||
2115 | */ | 2096 | */ |
2116 | machine->kernel_start = 1ULL << 63; | 2097 | machine->kernel_start = 1ULL << 63; |
2117 | if (map) { | 2098 | if (map) { |
2118 | err = map__load(map, machine->symbol_filter); | 2099 | err = map__load(map, NULL); |
2119 | if (map->start) | 2100 | if (map->start) |
2120 | machine->kernel_start = map->start; | 2101 | machine->kernel_start = map->start; |
2121 | } | 2102 | } |
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 20739f746bc4..b9e5588499c5 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h | |||
@@ -41,7 +41,6 @@ struct machine { | |||
41 | struct map_groups kmaps; | 41 | struct map_groups kmaps; |
42 | struct map *vmlinux_maps[MAP__NR_TYPES]; | 42 | struct map *vmlinux_maps[MAP__NR_TYPES]; |
43 | u64 kernel_start; | 43 | u64 kernel_start; |
44 | symbol_filter_t symbol_filter; | ||
45 | pid_t *current_tid; | 44 | pid_t *current_tid; |
46 | union { /* Tool specific area */ | 45 | union { /* Tool specific area */ |
47 | void *priv; | 46 | void *priv; |
@@ -110,7 +109,6 @@ typedef void (*machine__process_t)(struct machine *machine, void *data); | |||
110 | struct machines { | 109 | struct machines { |
111 | struct machine host; | 110 | struct machine host; |
112 | struct rb_root guests; | 111 | struct rb_root guests; |
113 | symbol_filter_t symbol_filter; | ||
114 | }; | 112 | }; |
115 | 113 | ||
116 | void machines__init(struct machines *machines); | 114 | void machines__init(struct machines *machines); |
@@ -128,8 +126,6 @@ struct machine *machines__findnew(struct machines *machines, pid_t pid); | |||
128 | void machines__set_id_hdr_size(struct machines *machines, u16 id_hdr_size); | 126 | void machines__set_id_hdr_size(struct machines *machines, u16 id_hdr_size); |
129 | char *machine__mmap_name(struct machine *machine, char *bf, size_t size); | 127 | char *machine__mmap_name(struct machine *machine, char *bf, size_t size); |
130 | 128 | ||
131 | void machines__set_symbol_filter(struct machines *machines, | ||
132 | symbol_filter_t symbol_filter); | ||
133 | void machines__set_comm_exec(struct machines *machines, bool comm_exec); | 129 | void machines__set_comm_exec(struct machines *machines, bool comm_exec); |
134 | 130 | ||
135 | struct machine *machine__new_host(void); | 131 | struct machine *machine__new_host(void); |