gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774)

This commit is contained in:
Xiaowei Lu
2026-07-10 03:17:40 +08:00
committed by GitHub
parent fac72f1ee9
commit b9e8979dcd
3 changed files with 14 additions and 0 deletions
@@ -0,0 +1,4 @@
Enable the :ref:`perf profiler <perf_profiling>` trampoline on Alpine Linux with the
musl C library on ``x86_64`` and ``aarch64``. The
trampoline is architecture-specific and does not depend on the C library, so
the same assembly trampoline used for glibc is reused for musl.
Generated Vendored
+6
View File
@@ -14440,9 +14440,15 @@ case $PLATFORM_TRIPLET in #(
x86_64-linux-gnu) :
perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o ;; #(
x86_64-linux-musl) :
perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o ;; #(
aarch64-linux-gnu) :
perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o ;; #(
aarch64-linux-musl) :
perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o ;; #(
darwin) :
case $MACOSX_DEPLOYMENT_TARGET in #(
10.[0-9]|10.1[0-1]) :
+4
View File
@@ -3874,8 +3874,12 @@ PERF_TRAMPOLINE_OBJ=""
AS_CASE([$PLATFORM_TRIPLET],
[x86_64-linux-gnu], [perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o],
[x86_64-linux-musl], [perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o],
[aarch64-linux-gnu], [perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o],
[aarch64-linux-musl], [perf_trampoline=yes
PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o],
[darwin], [AS_CASE([$MACOSX_DEPLOYMENT_TARGET],
[[10.[0-9]|10.1[0-1]]], [perf_trampoline=no],
[perf_trampoline=yes