perf tools: Introduce regs_query_register_offset() for x86
authorWang Nan <wangnan0@huawei.com>
Sun, 6 Sep 2015 07:13:35 +0000 (07:13 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Sep 2015 12:48:33 +0000 (09:48 -0300)
commitbbbe6bf6037d77816c4a19aaf35f4cecf662b49a
tree760399c41577b0e70ca4ecd32a807b19a625d432
parent63ab024a5b6f295ca17a293ad81b7c728f49a89a
perf tools: Introduce regs_query_register_offset() for x86

regs_query_register_offset() is a helper function which converts
register name like "%rax" to offset of a register in 'struct pt_regs',
which is required by BPF prologue generator. Since the function is
identical, try to reuse the code in arch/x86/kernel/ptrace.c.

Comment inside dwarf-regs.c list the differences between this
implementation and kernel code.

get_arch_regstr() switches to regoffset_table and the old string table
is dropped.

Signed-off-by: He Kuang <hekuang@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1441523623-152703-20-git-send-email-wangnan0@huawei.com
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/Makefile
tools/perf/arch/x86/util/dwarf-regs.c
This page took 0.027458 seconds and 5 git commands to generate.