Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be39db9f authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf symbols: Remove symbol_filter_t machinery

We're not using it anymore, few users were, but we really could do
without it, simplify lots of functions by removing it.

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-1zng8wdznn00iiz08bb7q3vn@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c79c8091
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
	int i = 0;

	map = get_target_map(pev->target, pev->uprobes);
	if (!map || map__load(map, NULL) < 0)
	if (!map || map__load(map) < 0)
		return;

	for (i = 0; i < ntevs; i++) {
+1 −1
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ static int perf_event__inject_buildid(struct perf_tool *tool,
	if (al.map != NULL) {
		if (!al.map->dso->hit) {
			al.map->dso->hit = 1;
			if (map__load(al.map, NULL) >= 0) {
			if (map__load(al.map) >= 0) {
				dso__inject_build_id(al.map->dso, tool, machine);
				/*
				 * If this fails, too bad, let the other side
+4 −6
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ static int build_alloc_func_list(void)
	}

	kernel_map = machine__kernel_map(machine);
	if (map__load(kernel_map, NULL) < 0) {
	if (map__load(kernel_map) < 0) {
		pr_err("cannot load kernel map\n");
		return -ENOENT;
	}
@@ -979,7 +979,7 @@ static void __print_slab_result(struct rb_root *root,
		if (is_caller) {
			addr = data->call_site;
			if (!raw_ip)
				sym = machine__find_kernel_function(machine, addr, &map, NULL);
				sym = machine__find_kernel_function(machine, addr, &map);
		} else
			addr = data->ptr;

@@ -1043,8 +1043,7 @@ static void __print_page_alloc_result(struct perf_session *session, int n_lines)
		char *caller = buf;

		data = rb_entry(next, struct page_stat, node);
		sym = machine__find_kernel_function(machine, data->callsite,
						    &map, NULL);
		sym = machine__find_kernel_function(machine, data->callsite, &map);
		if (sym && sym->name)
			caller = sym->name;
		else
@@ -1086,8 +1085,7 @@ static void __print_page_caller_result(struct perf_session *session, int n_lines
		char *caller = buf;

		data = rb_entry(next, struct page_stat, node);
		sym = machine__find_kernel_function(machine, data->callsite,
						    &map, NULL);
		sym = machine__find_kernel_function(machine, data->callsite, &map);
		if (sym && sym->name)
			caller = sym->name;
		else
+2 −2
Original line number Diff line number Diff line
@@ -522,11 +522,11 @@ static void print_sample_brstacksym(struct perf_sample *sample,

		thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, from, &alf);
		if (alf.map)
			alf.sym = map__find_symbol(alf.map, alf.addr, NULL);
			alf.sym = map__find_symbol(alf.map, alf.addr);

		thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, to, &alt);
		if (alt.map)
			alt.sym = map__find_symbol(alt.map, alt.addr, NULL);
			alt.sym = map__find_symbol(alt.map, alt.addr);

		symbol__fprintf_symname_offs(alf.sym, &alf, stdout);
		putchar('/');
+2 −2
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
	 * Converting addresses for use by objdump requires more information.
	 * map__load() does that.  See map__rip_2objdump() for details.
	 */
	if (map__load(al.map, NULL))
	if (map__load(al.map))
		return -1;

	/* objdump struggles with kcore - try each map only once */
@@ -511,7 +511,7 @@ static int do_test_code_reading(bool try_kcore)

	/* Load kernel map */
	map = machine__kernel_map(machine);
	ret = map__load(map, NULL);
	ret = map__load(map);
	if (ret < 0) {
		pr_debug("map__load failed\n");
		goto out_err;
Loading