Skip to content

Add aarch64/Graviton support to PyPerf#48

Open
AGSaidi wants to merge 1 commit into
Granulate:feature/update-offsets-for-python313from
AGSaidi:feature/aarch64-pyperf-support
Open

Add aarch64/Graviton support to PyPerf#48
AGSaidi wants to merge 1 commit into
Granulate:feature/update-offsets-for-python313from
AGSaidi:feature/aarch64-pyperf-support

Conversation

@AGSaidi
Copy link
Copy Markdown

@AGSaidi AGSaidi commented May 12, 2026

Add architecture-specific code paths for aarch64 in the PyPerf eBPF Python profiler. This removes the 'Unsupported platform' error on aarch64 and enables PyPerf to profile Python processes on ARM64/aarch64.

Changes:

  • PyPerfBPFProgram.cc: aarch64 TLS access via TPIDR_EL0, user-mode detection via pstate, register mapping (pc/x29), no red zone
  • PyPerfNativeStackTrace.cc: libunwind aarch64 register handling
  • PyPerf.cc/PyPerfProfiler: --pthread-struct-size argument
  • CMakeLists.txt: conditional libunwind-aarch64 linking

Tested on AWS Graviton (m9g.metal-48xl), kernel 6.17, Ubuntu 24.04, glibc 2.39, Python 3.12.

Co-developed-by: Kiro (Amazon Q Developer Agent)

Add architecture-specific code paths for aarch64 in the PyPerf eBPF
Python profiler. This removes the 'Unsupported platform' error on
aarch64 and enables PyPerf to profile Python processes on ARM64/Graviton.

Changes:
- PyPerfBPFProgram.cc: aarch64 TLS access via TPIDR_EL0, user-mode
  detection via pstate, register mapping (pc/x29), no red zone
- PyPerfNativeStackTrace.cc: libunwind aarch64 register handling
- PyPerf.cc/PyPerfProfiler: --pthread-struct-size argument
- CMakeLists.txt: conditional libunwind-aarch64 linking

Tested on AWS Graviton (m9g.metal-48xl), kernel 6.17, Ubuntu 24.04,
glibc 2.39, Python 3.12.

Co-developed-by: Kiro (Amazon Q Developer Agent)
Signed-off-by: Ali Saidi <alisaidi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant