diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 3aa3a3b987ad..e4121acb4f88 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -3921,6 +3921,13 @@ retry: op_loc->offset, dl); } + /* This CPU access in kernel - pretend PC-relative addressing */ + if (map__dso(ms->map)->kernel && arch__is(arch, "x86") && + op_loc->segment == INSN_SEG_X86_GS && op_loc->imm) { + dloc.var_addr = op_loc->offset; + op_loc->reg1 = DWARF_REG_PC; + } + mem_type = find_data_type(&dloc); if (mem_type) istat->good++; |