aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 11:09:10 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:18 -0300
commitaf30bffa2f9aa73a648ea932ed468dc3031ac1f9 (patch)
tree61db7980d38450b1c88fb836121e0345683f1c05 /tools/perf/util/symbol.h
parentperf map: Remove map_type arg from map_groups__find() (diff)
downloadwireguard-linux-af30bffa2f9aa73a648ea932ed468dc3031ac1f9.tar.xz
wireguard-linux-af30bffa2f9aa73a648ea932ed468dc3031ac1f9.zip
perf symbols: Store the ELF symbol type in the symbol struct
There is code that needs to see if a resolved address is a function, so, since we're going to ditch the MAP__{FUNCTION,VARIABLE} split, store that info in the per symbol struct. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-9ugwxz0i8ryg5702rx8u5q6z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r--tools/perf/util/symbol.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 2b985ff2e725..3e2ac485c6d9 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -57,7 +57,8 @@ struct symbol {
u64 start;
u64 end;
u16 namelen;
- u8 binding;
+ u8 type:4;
+ u8 binding:4;
u8 idle:1;
u8 ignore:1;
u8 inlined:1;
@@ -292,7 +293,7 @@ void symbol__exit(void);
void symbol__elf_init(void);
int symbol__annotation_init(void);
-struct symbol *symbol__new(u64 start, u64 len, u8 binding, const char *name);
+struct symbol *symbol__new(u64 start, u64 len, u8 binding, u8 type, const char *name);
size_t __symbol__fprintf_symname_offs(const struct symbol *sym,
const struct addr_location *al,
bool unknown_as_addr,