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>
This commit is contained in:
Arnaldo Carvalho de Melo
2018-04-26 11:09:10 -03:00
parent e1f2a0d0f2
commit af30bffa2f
6 changed files with 14 additions and 10 deletions

View File

@@ -247,7 +247,7 @@ static int db_ids_from_al(struct db_export *dbe, struct addr_location *al,
*dso_db_id = dso->db_id;
if (!al->sym) {
al->sym = symbol__new(al->addr, 0, 0, "unknown");
al->sym = symbol__new(al->addr, 0, 0, 0, "unknown");
if (al->sym)
dso__insert_symbol(dso, al->map->type, al->sym);
}