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

Commit 80c345b2 authored by Milian Wolff's avatar Milian Wolff Committed by Arnaldo Carvalho de Melo
Browse files

perf util: Take elf_name as const string in dso__demangle_sym



The input string is not modified and thus can be passed in as a pointer
to const data.

Signed-off-by: default avatarMilian Wolff <milian.wolff@kdab.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yao Jin <yao.jin@linux.intel.com>
Link: http://lkml.kernel.org/r/20170806212446.24925-3-milian.wolff@kdab.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e498f336
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -391,7 +391,7 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *
	return 0;
}

char *dso__demangle_sym(struct dso *dso, int kmodule, char *elf_name)
char *dso__demangle_sym(struct dso *dso, int kmodule, const char *elf_name)
{
	return demangle_sym(dso, kmodule, elf_name);
}
+1 −1
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ void symbol__elf_init(void)

char *dso__demangle_sym(struct dso *dso __maybe_unused,
			int kmodule __maybe_unused,
			char *elf_name __maybe_unused)
			const char *elf_name __maybe_unused)
{
	return NULL;
}
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss,
				struct map *map);

char *dso__demangle_sym(struct dso *dso, int kmodule, char *elf_name);
char *dso__demangle_sym(struct dso *dso, int kmodule, const char *elf_name);

void __symbols__insert(struct rb_root *symbols, struct symbol *sym, bool kernel);
void symbols__insert(struct rb_root *symbols, struct symbol *sym);