[tip:perf/core] perf probe: Fix dwarf regs table for x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  7a023fd239498edd269838784f12888147d970da
Gitweb:     http://git.kernel.org/tip/7a023fd239498edd269838784f12888147d970da
Author:     Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Fri, 9 Sep 2016 12:00:08 -0300
Committer:  Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Mon, 12 Sep 2016 10:37:07 -0300

perf probe: Fix dwarf regs table for x86_64

In 293d5b439483 ("perf probe: Support probing on offline cross-arch binary")
DWARF register tables were introduced for many architectures, with the one for
the "dx" register being broken for x86_64, which got noticed by the 'perf test
bpf' testcase, that has this difference from a successful run to one that
fails, with the aforementioned patch:

  -Writing event: p:perf_bpf_probe/func _text+5197232 f_mode=+68(%di):x32 offset=%si:s64 orig=dx:s32
  -Failed to write event: Invalid argument
  -bpf_probe: failed to apply perf probe eventsFailed to add events selected by BPF
  +Writing event: p:perf_bpf_probe/func _text+5197232 f_mode=+68(%di):x32 offset=%si:s64 orig=%dx:s32

Add the missing '%' to '%dx' to fix this.

Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Fixes: 293d5b439483 ("perf probe: Support probing on offline cross-arch binary")
Link: https://lkml.kernel.org/r/20160909145955.GC32585@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
 tools/perf/arch/x86/include/dwarf-regs-table.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/x86/include/dwarf-regs-table.h b/tools/perf/arch/x86/include/dwarf-regs-table.h
index 39ac7cb..9b5e5cb 100644
--- a/tools/perf/arch/x86/include/dwarf-regs-table.h
+++ b/tools/perf/arch/x86/include/dwarf-regs-table.h
@@ -7,7 +7,7 @@ static const char * const x86_32_regstr_tbl[] = {
 };
 
 static const char * const x86_64_regstr_tbl[] = {
-	"%ax", "dx", "%cx", "%bx", "%si", "%di",
+	"%ax", "%dx", "%cx", "%bx", "%si", "%di",
 	"%bp", "%sp", "%r8", "%r9", "%r10", "%r11",
 	"%r12", "%r13", "%r14", "%r15",
 };
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux