#include "debug.h"
#include "dso.h"
+#include "event.h"
#include "hist.h"
#include "sort.h"
#include "machine.h"
return -1;
}
call->ip = cursor_node->ip;
- call->ms.sym = cursor_node->sym;
- call->ms.map = map__get(cursor_node->map);
+ call->ms = cursor_node->ms;
+ map__get(call->ms.map);
call->srcline = cursor_node->srcline;
if (cursor_node->branch) {
/* otherwise fall-back to symbol-based comparison below */
__fallthrough;
case CCKEY_FUNCTION:
- if (node->sym && cnode->ms.sym) {
+ if (node->ms.sym && cnode->ms.sym) {
/*
* Compare inlined frames based on their symbol name
* because different inlined frames will have the same
* symbol start. Otherwise do a faster comparison based
* on the symbol start address.
*/
- if (cnode->ms.sym->inlined || node->sym->inlined) {
+ if (cnode->ms.sym->inlined || node->ms.sym->inlined) {
match = match_chain_strings(cnode->ms.sym->name,
- node->sym->name);
+ node->ms.sym->name);
if (match != MATCH_ERROR)
break;
} else {
match = match_chain_dso_addresses(cnode->ms.map, cnode->ms.sym->start,
- node->map, node->sym->start);
+ node->ms.map, node->ms.sym->start);
break;
}
}
__fallthrough;
case CCKEY_ADDRESS:
default:
- match = match_chain_dso_addresses(cnode->ms.map, cnode->ip, node->map, node->ip);
+ match = match_chain_dso_addresses(cnode->ms.map, cnode->ip, node->ms.map, node->ip);
break;
}
int err = 0;
list_for_each_entry_safe(list, next_list, &src->val, list) {
- callchain_cursor_append(cursor, list->ip,
- list->ms.map, list->ms.sym,
+ callchain_cursor_append(cursor, list->ip, &list->ms,
false, NULL, 0, 0, 0, list->srcline);
list_del_init(&list->list);
map__zput(list->ms.map);
}
int callchain_cursor_append(struct callchain_cursor *cursor,
- u64 ip, struct map *map, struct symbol *sym,
+ u64 ip, struct map_symbol *ms,
bool branch, struct branch_flags *flags,
int nr_loop_iter, u64 iter_cycles, u64 branch_from,
const char *srcline)
}
node->ip = ip;
- map__zput(node->map);
- node->map = map__get(map);
- node->sym = sym;
+ map__zput(node->ms.map);
+ node->ms = *ms;
+ map__get(node->ms.map);
node->branch = branch;
node->nr_loop_iter = nr_loop_iter;
node->iter_cycles = iter_cycles;
int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
bool hide_unresolved)
{
- al->map = node->map;
- al->sym = node->sym;
+ al->mg = node->ms.mg;
+ al->map = node->ms.map;
+ al->sym = node->ms.sym;
al->srcline = node->srcline;
al->addr = node->ip;
goto out;
}
- if (al->map->groups == &al->machine->kmaps) {
- if (machine__is_host(al->machine)) {
+ if (al->mg == &al->mg->machine->kmaps) {
+ if (machine__is_host(al->mg->machine)) {
al->cpumode = PERF_RECORD_MISC_KERNEL;
al->level = 'k';
} else {
al->level = 'g';
}
} else {
- if (machine__is_host(al->machine)) {
+ if (machine__is_host(al->mg->machine)) {
al->cpumode = PERF_RECORD_MISC_USER;
al->level = '.';
} else if (perf_guest) {
if (node == NULL)
break;
- rc = callchain_cursor_append(dst, node->ip, node->map, node->sym,
+ rc = callchain_cursor_append(dst, node->ip, &node->ms,
node->branch, &node->branch_flags,
node->nr_loop_iter,
node->iter_cycles,
cursor->last = &cursor->first;
for (node = cursor->first; node != NULL; node = node->next)
- map__zput(node->map);
+ map__zput(node->ms.map);
}