ARM64: add perf support
cover ARM64: add perf support
From: Jean Pihet <[email protected]>
Add perf support for the AARCH64 architecture. This includes the support for:
- AARCH64 perf registers definition and hooks,
- compat mode registers use, i.e. profiling a 32-bit binary on a 64-bit system,
- unwinding using the dwarf information from the .debug_frame section of the ELF binary; only in 64-bit mode,
- unwinding using the frame pointer information; in 64-bit and compat modes.
ToDo:
- add support for unwinding using the dwarf information in compat mode. This requires some changes to the libunwind code.
Tested on ARMv7 and ARMv8 platforms. The compat mode has been tested on ARMv8 using statically built 32-bit binaries.
Jean Pihet (3):
ARM64: perf: add support for perf registers API
ARM64: perf: wire up perf_regs and unwind support
ARM64: perf: add support for frame pointer unwinding in compat mode
arch/arm64/Kconfig | 2 + arch/arm64/include/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 40 ++++++++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 75 +++++++++++++++++++++++--- arch/arm64/kernel/perf_regs.c | 46 ++++++++++++++++ tools/perf/arch/arm64/Makefile | 7 +++ tools/perf/arch/arm64/include/perf_regs.h | 88 +++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/dwarf-regs.c | 81 ++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/unwind.c | 82 ++++++++++++++++++++++++++++ tools/perf/config/Makefile | 8 ++- 12 files changed, 423 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/perf_regs.h create mode 100644 arch/arm64/kernel/perf_regs.c create mode 100644 tools/perf/arch/arm64/Makefile create mode 100644 tools/perf/arch/arm64/include/perf_regs.h create mode 100644 tools/perf/arch/arm64/util/dwarf-regs.c create mode 100644 tools/perf/arch/arm64/util/unwind.c
Signature · 1 line
1.7.11.7
Quoted 36 lines · * [email protected] <[email protected]> wrote:
From: Jean Pihet <[email protected]>
Add perf support for the AARCH64 architecture. This includes the support for:
- AARCH64 perf registers definition and hooks,
- compat mode registers use, i.e. profiling a 32-bit binary on a 64-bit system,
- unwinding using the dwarf information from the .debug_frame section of the ELF binary; only in 64-bit mode,
- unwinding using the frame pointer information; in 64-bit and compat modes.ToDo:
- add support for unwinding using the dwarf information in compat mode. This requires some changes to the libunwind code.Tested on ARMv7 and ARMv8 platforms. The compat mode has been tested on ARMv8 using statically built 32-bit binaries.
Jean Pihet (3):
ARM64: perf: add support for perf registers API
ARM64: perf: wire upperf_regsand unwind support
ARM64: perf: add support for frame pointer unwinding in compat modearch/arm64/Kconfig | 2 + arch/arm64/include/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 40 ++++++++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 75 +++++++++++++++++++++++--- arch/arm64/kernel/perf_regs.c | 46 ++++++++++++++++ tools/perf/arch/arm64/Makefile | 7 +++ tools/perf/arch/arm64/include/perf_regs.h | 88 +++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/dwarf-regs.c | 81 ++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/unwind.c | 82 ++++++++++++++++++++++++++++
Quoted 8 lines
tools/perf/config/Makefile | 8 ++- 12 files changed, 423 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/perf_regs.h create mode 100644 arch/arm64/kernel/perf_regs.c create mode 100644 tools/perf/arch/arm64/Makefile create mode 100644 tools/perf/arch/arm64/include/perf_regs.h create mode 100644 tools/perf/arch/arm64/util/dwarf-regs.c create mode 100644 tools/perf/arch/arm64/util/unwind.c
Arnaldo, AFAICS the main merging complexity will probably be on the perf tooling side, so if you are happy with these bits, mind picking them up into your tree?
Thanks,
Ingo
Quoted 46 lines · Ingo Molnar
Quoted 36 lines · * [email protected] <[email protected]> wrote:
From: Jean Pihet <[email protected]>
Add perf support for the AARCH64 architecture. This includes the support for:
- AARCH64 perf registers definition and hooks,
- compat mode registers use, i.e. profiling a 32-bit binary on a 64-bit system,
- unwinding using the dwarf information from the .debug_frame section of the ELF binary; only in 64-bit mode,
- unwinding using the frame pointer information; in 64-bit and compat modes.ToDo:
- add support for unwinding using the dwarf information in compat mode. This requires some changes to the libunwind code.Tested on ARMv7 and ARMv8 platforms. The compat mode has been tested on ARMv8 using statically built 32-bit binaries.
Jean Pihet (3):
ARM64: perf: add support for perf registers API
ARM64: perf: wire upperf_regsand unwind support
ARM64: perf: add support for frame pointer unwinding in compat modearch/arm64/Kconfig | 2 + arch/arm64/include/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 40 ++++++++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 75 +++++++++++++++++++++++--- arch/arm64/kernel/perf_regs.c | 46 ++++++++++++++++ tools/perf/arch/arm64/Makefile | 7 +++ tools/perf/arch/arm64/include/perf_regs.h | 88 +++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/dwarf-regs.c | 81 ++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/unwind.c | 82 ++++++++++++++++++++++++++++Quoted 8 lines
tools/perf/config/Makefile | 8 ++- 12 files changed, 423 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/perf_regs.h create mode 100644 arch/arm64/kernel/perf_regs.c create mode 100644 tools/perf/arch/arm64/Makefile create mode 100644 tools/perf/arch/arm64/include/perf_regs.h create mode 100644 tools/perf/arch/arm64/util/dwarf-regs.c create mode 100644 tools/perf/arch/arm64/util/unwind.c
Quoted 3 lines
Arnaldo, AFAICS the main merging complexity will probably be on the perf tooling side, so if you are happy with these bits, mind picking them up into your tree?
Hold your horses! I've got a few review comments on the series...
Will
Quoted 47 lines · Will Deacon
Quoted 46 lines · Ingo Molnar
Quoted 44 lines · * [email protected] <[email protected]> wrote:
From: Jean Pihet <[email protected]>
Add perf support for the AARCH64 architecture. This includes the support for:
- AARCH64 perf registers definition and hooks,
- compat mode registers use, i.e. profiling a 32-bit binary on a 64-bit system,
- unwinding using the dwarf information from the .debug_frame section of the ELF binary; only in 64-bit mode,
- unwinding using the frame pointer information; in 64-bit and compat modes.ToDo:
- add support for unwinding using the dwarf information in compat mode. This requires some changes to the libunwind code.Tested on ARMv7 and ARMv8 platforms. The compat mode has been tested on ARMv8 using statically built 32-bit binaries.
Jean Pihet (3):
ARM64: perf: add support for perf registers API
ARM64: perf: wire upperf_regsand unwind support
ARM64: perf: add support for frame pointer unwinding in compat modearch/arm64/Kconfig | 2 + arch/arm64/include/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 40 ++++++++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 75 +++++++++++++++++++++++--- arch/arm64/kernel/perf_regs.c | 46 ++++++++++++++++ tools/perf/arch/arm64/Makefile | 7 +++ tools/perf/arch/arm64/include/perf_regs.h | 88 +++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/dwarf-regs.c | 81 ++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/unwind.c | 82 ++++++++++++++++++++++++++++ tools/perf/config/Makefile | 8 ++- 12 files changed, 423 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/perf_regs.h create mode 100644 arch/arm64/kernel/perf_regs.c create mode 100644 tools/perf/arch/arm64/Makefile create mode 100644 tools/perf/arch/arm64/include/perf_regs.h create mode 100644 tools/perf/arch/arm64/util/dwarf-regs.c create mode 100644 tools/perf/arch/arm64/util/unwind.c
Quoted 5 lines
Quoted 3 lines
Arnaldo, AFAICS the main merging complexity will probably be on the perf tooling side, so if you are happy with these bits, mind picking them up into your tree?
Hold your horses! I've got a few review comments on the series...
Sure :-)
Thanks,
Ingo
Hi Will, Ingo,
The series has been updated after the comments and re-submitted.
Thanks!
Jean
Quoted 66 lines · Ingo Molnar
Quoted 47 lines · Will Deacon
Quoted 46 lines · Ingo Molnar
Quoted 44 lines · * [email protected] <[email protected]> wrote:
From: Jean Pihet <[email protected]>
Add perf support for the AARCH64 architecture. This includes the support for:
- AARCH64 perf registers definition and hooks,
- compat mode registers use, i.e. profiling a 32-bit binary on a 64-bit system,
- unwinding using the dwarf information from the .debug_frame section of the ELF binary; only in 64-bit mode,
- unwinding using the frame pointer information; in 64-bit and compat modes.ToDo:
- add support for unwinding using the dwarf information in compat mode. This requires some changes to the libunwind code.Tested on ARMv7 and ARMv8 platforms. The compat mode has been tested on ARMv8 using statically built 32-bit binaries.
Jean Pihet (3):
ARM64: perf: add support for perf registers API
ARM64: perf: wire upperf_regsand unwind support
ARM64: perf: add support for frame pointer unwinding in compat modearch/arm64/Kconfig | 2 + arch/arm64/include/asm/ptrace.h | 1 + arch/arm64/include/uapi/asm/Kbuild | 1 + arch/arm64/include/uapi/asm/perf_regs.h | 40 ++++++++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/perf_event.c | 75 +++++++++++++++++++++++--- arch/arm64/kernel/perf_regs.c | 46 ++++++++++++++++ tools/perf/arch/arm64/Makefile | 7 +++ tools/perf/arch/arm64/include/perf_regs.h | 88 +++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/dwarf-regs.c | 81 ++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/unwind.c | 82 ++++++++++++++++++++++++++++ tools/perf/config/Makefile | 8 ++- 12 files changed, 423 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/perf_regs.h create mode 100644 arch/arm64/kernel/perf_regs.c create mode 100644 tools/perf/arch/arm64/Makefile create mode 100644 tools/perf/arch/arm64/include/perf_regs.h create mode 100644 tools/perf/arch/arm64/util/dwarf-regs.c create mode 100644 tools/perf/arch/arm64/util/unwind.cQuoted 5 lines
Quoted 3 lines
Arnaldo, AFAICS the main merging complexity will probably be on the perf tooling side, so if you are happy with these bits, mind picking them up into your tree?
Hold your horses! I've got a few review comments on the series...
Sure :-)
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/