struct addr_location *al,
struct sample_data *data)
{
- struct symbol **syms = NULL, *parent = NULL;
+ struct map_symbol *syms = NULL;
+ struct symbol *parent = NULL;
bool hit;
int err;
struct hist_entry *he;
struct resolved_ip {
- u64 ip;
- struct symbol *sym;
+ u64 ip;
+ struct map_symbol ms;
};
struct resolved_chain {
return;
}
call->ip = chain->ips[i].ip;
- call->sym = chain->ips[i].sym;
+ call->ms = chain->ips[i].ms;
list_add_tail(&call->list, &node->val);
}
node->val_nr = chain->nr - start;
if (i == chain->nr)
break;
- sym = chain->ips[i].sym;
+ sym = chain->ips[i].ms.sym;
- if (cnode->sym && sym) {
- if (cnode->sym->start != sym->start)
+ if (cnode->ms.sym && sym) {
+ if (cnode->ms.sym->start != sym->start)
break;
} else if (cnode->ip != chain->ips[i].ip)
break;
return 0;
}
-static void
-filter_context(struct ip_callchain *old, struct resolved_chain *new,
- struct symbol **syms)
+static void filter_context(struct ip_callchain *old, struct resolved_chain *new,
+ struct map_symbol *syms)
{
int i, j = 0;
continue;
new->ips[j].ip = old->ips[i];
- new->ips[j].sym = syms[i];
+ new->ips[j].ms = syms[i];
j++;
}
int append_chain(struct callchain_node *root, struct ip_callchain *chain,
- struct symbol **syms)
+ struct map_symbol *syms)
{
struct resolved_chain *filtered;
struct callchain_list {
u64 ip;
- struct symbol *sym;
+ struct map_symbol ms;
struct list_head list;
};
int register_callchain_param(struct callchain_param *param);
int append_chain(struct callchain_node *root, struct ip_callchain *chain,
- struct symbol **syms);
+ struct map_symbol *syms);
#endif /* __PERF_CALLCHAIN_H */
} else
ret += fprintf(fp, "%s", " ");
}
- if (chain->sym)
- ret += fprintf(fp, "%s\n", chain->sym->name);
+ if (chain->ms.sym)
+ ret += fprintf(fp, "%s\n", chain->ms.sym->name);
else
ret += fprintf(fp, "%p\n", (void *)(long)chain->ip);
}
strcpy(rem_sq_bracket->name, "[...]");
- rem_hits.sym = rem_sq_bracket;
+ rem_hits.ms.sym = rem_sq_bracket;
}
static size_t __callchain__fprintf_graph(FILE *fp, struct callchain_node *self,
} else
ret += callchain__fprintf_left_margin(fp, left_margin);
- if (chain->sym)
- ret += fprintf(fp, " %s\n", chain->sym->name);
+ if (chain->ms.sym)
+ ret += fprintf(fp, " %s\n", chain->ms.sym->name);
else
ret += fprintf(fp, " %p\n", (void *)(long)chain->ip);
}
list_for_each_entry(chain, &self->val, list) {
if (chain->ip >= PERF_CONTEXT_MAX)
continue;
- if (chain->sym)
- ret += fprintf(fp, " %s\n", chain->sym->name);
+ if (chain->ms.sym)
+ ret += fprintf(fp, " %s\n", chain->ms.sym->name);
else
ret += fprintf(fp, " %p\n",
(void *)(long)chain->ip);
static char *callchain_list__sym_name(struct callchain_list *self,
char *bf, size_t bfsize)
{
- if (self->sym)
- return self->sym->name;
+ if (self->ms.sym)
+ return self->ms.sym->name;
snprintf(bf, bfsize, "%#Lx", self->ip);
return bf;
indexes[depth + 2] = NEWT_ARG_LAST;
++chain_idx;
}
- newt_checkbox_tree__add(tree, str, chain->sym, indexes);
+ newt_checkbox_tree__add(tree, str, chain->ms.sym, indexes);
free(alloc_str);
++printed;
}
continue;
str = callchain_list__sym_name(chain, ipstr, sizeof(ipstr));
- newt_checkbox_tree__add(tree, str, chain->sym, indexes);
+ newt_checkbox_tree__add(tree, str, chain->ms.sym, indexes);
}
indexes[1] = parent_idx;
return 0;
}
-struct symbol **perf_session__resolve_callchain(struct perf_session *self,
- struct thread *thread,
- struct ip_callchain *chain,
- struct symbol **parent)
+struct map_symbol *perf_session__resolve_callchain(struct perf_session *self,
+ struct thread *thread,
+ struct ip_callchain *chain,
+ struct symbol **parent)
{
u8 cpumode = PERF_RECORD_MISC_USER;
- struct symbol **syms = NULL;
+ struct map_symbol *syms = NULL;
unsigned int i;
if (symbol_conf.use_callchain) {
*parent = al.sym;
if (!symbol_conf.use_callchain)
break;
- syms[i] = al.sym;
+ syms[i].map = al.map;
+ syms[i].sym = al.sym;
}
}
int perf_session__process_events(struct perf_session *self,
struct perf_event_ops *event_ops);
-struct symbol **perf_session__resolve_callchain(struct perf_session *self,
- struct thread *thread,
- struct ip_callchain *chain,
- struct symbol **parent);
+struct map_symbol *perf_session__resolve_callchain(struct perf_session *self,
+ struct thread *thread,
+ struct ip_callchain *chain,
+ struct symbol **parent);
bool perf_session__has_traces(struct perf_session *self, const char *msg);