提交 08f6680e 编写于 作者: A Arnaldo Carvalho de Melo

perf tools: Add a 'struct map_groups' pointer to 'struct map_symbol'

And fill it whenever we setup a a 'struct map_symbol', now we need to
use it, next cset.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-fzwfcnddenz1o7uj1fzw3g46@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 93fcce96
...@@ -1106,6 +1106,7 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp ...@@ -1106,6 +1106,7 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp
int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node, int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
bool hide_unresolved) bool hide_unresolved)
{ {
al->mg = node->ms.mg;
al->map = node->ms.map; al->map = node->ms.map;
al->sym = node->ms.sym; al->sym = node->ms.sym;
al->srcline = node->srcline; al->srcline = node->srcline;
......
...@@ -692,6 +692,7 @@ __hists__add_entry(struct hists *hists, ...@@ -692,6 +692,7 @@ __hists__add_entry(struct hists *hists,
.ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0, .ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0,
}, },
.ms = { .ms = {
.mg = al->mg,
.map = al->map, .map = al->map,
.sym = al->sym, .sym = al->sym,
}, },
...@@ -759,6 +760,7 @@ struct hist_entry *hists__add_entry_block(struct hists *hists, ...@@ -759,6 +760,7 @@ struct hist_entry *hists__add_entry_block(struct hists *hists,
.block_info = block_info, .block_info = block_info,
.hists = hists, .hists = hists,
.ms = { .ms = {
.mg = al->mg,
.map = al->map, .map = al->map,
.sym = al->sym, .sym = al->sym,
}, },
...@@ -893,6 +895,7 @@ iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al) ...@@ -893,6 +895,7 @@ iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
if (iter->curr >= iter->total) if (iter->curr >= iter->total)
return 0; return 0;
al->mg = bi[i].to.ms.mg;
al->map = bi[i].to.ms.map; al->map = bi[i].to.ms.map;
al->sym = bi[i].to.ms.sym; al->sym = bi[i].to.ms.sym;
al->addr = bi[i].to.addr; al->addr = bi[i].to.addr;
...@@ -1069,6 +1072,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter, ...@@ -1069,6 +1072,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
.comm = thread__comm(al->thread), .comm = thread__comm(al->thread),
.ip = al->addr, .ip = al->addr,
.ms = { .ms = {
.mg = al->mg,
.map = al->map, .map = al->map,
.sym = al->sym, .sym = al->sym,
}, },
......
...@@ -1968,6 +1968,7 @@ static void ip__resolve_ams(struct thread *thread, ...@@ -1968,6 +1968,7 @@ static void ip__resolve_ams(struct thread *thread,
ams->addr = ip; ams->addr = ip;
ams->al_addr = al.addr; ams->al_addr = al.addr;
ams->ms.mg = al.mg;
ams->ms.sym = al.sym; ams->ms.sym = al.sym;
ams->ms.map = al.map; ams->ms.map = al.map;
ams->phys_addr = 0; ams->phys_addr = 0;
...@@ -1985,6 +1986,7 @@ static void ip__resolve_data(struct thread *thread, ...@@ -1985,6 +1986,7 @@ static void ip__resolve_data(struct thread *thread,
ams->addr = addr; ams->addr = addr;
ams->al_addr = al.addr; ams->al_addr = al.addr;
ams->ms.mg = al.mg;
ams->ms.sym = al.sym; ams->ms.sym = al.sym;
ams->ms.map = al.map; ams->ms.map = al.map;
ams->phys_addr = phys_addr; ams->phys_addr = phys_addr;
...@@ -2101,6 +2103,7 @@ static int add_callchain_ip(struct thread *thread, ...@@ -2101,6 +2103,7 @@ static int add_callchain_ip(struct thread *thread,
iter_cycles = iter->cycles; iter_cycles = iter->cycles;
} }
ms.mg = al.mg;
ms.map = al.map; ms.map = al.map;
ms.sym = al.sym; ms.sym = al.sym;
srcline = callchain_srcline(&ms, al.addr); srcline = callchain_srcline(&ms, al.addr);
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
#include <linux/types.h> #include <linux/types.h>
struct map_groups;
struct map; struct map;
struct symbol; struct symbol;
struct map_symbol { struct map_symbol {
struct map_groups *mg;
struct map *map; struct map *map;
struct symbol *sym; struct symbol *sym;
}; };
......
...@@ -81,6 +81,7 @@ static int entry(u64 ip, struct unwind_info *ui) ...@@ -81,6 +81,7 @@ static int entry(u64 ip, struct unwind_info *ui)
return -1; return -1;
e->ip = ip; e->ip = ip;
e->ms.mg = al.mg;
e->ms.map = al.map; e->ms.map = al.map;
e->ms.sym = al.sym; e->ms.sym = al.sym;
......
...@@ -578,6 +578,7 @@ static int entry(u64 ip, struct thread *thread, ...@@ -578,6 +578,7 @@ static int entry(u64 ip, struct thread *thread,
e.ms.sym = thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al); e.ms.sym = thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al);
e.ip = ip; e.ip = ip;
e.ms.map = al.map; e.ms.map = al.map;
e.ms.mg = al.mg;
pr_debug("unwind: %s:ip = 0x%" PRIx64 " (0x%" PRIx64 ")\n", pr_debug("unwind: %s:ip = 0x%" PRIx64 " (0x%" PRIx64 ")\n",
al.sym ? al.sym->name : "''", al.sym ? al.sym->name : "''",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册