Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / tools / perf / util / db-export.c
index f8e3057..8d96c80 100644 (file)
@@ -260,8 +260,7 @@ static int db_ids_from_al(struct db_export *dbe, struct addr_location *al,
                if (!al->sym) {
                        al->sym = symbol__new(al->addr, 0, 0, "unknown");
                        if (al->sym)
-                               symbols__insert(&dso->symbols[al->map->type],
-                                               al->sym);
+                               dso__insert_symbol(dso, al->map->type, al->sym);
                }
 
                if (al->sym) {
@@ -325,10 +324,11 @@ static struct call_path *call_path_from_sample(struct db_export *dbe,
                al.sym = node->sym;
                al.map = node->map;
                al.machine = machine;
-               if (al.map)
-                       al.addr = al.map->map_ip(al.map, node->ip);
-               else
-                       al.addr = node->ip;
+               al.addr = node->ip;
+
+               if (al.map && !al.sym)
+                       al.sym = dso__find_symbol(al.map->dso, MAP__FUNCTION,
+                                                 al.addr);
 
                db_ids_from_al(dbe, &al, &dso_db_id, &sym_db_id, &offset);