]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774) (#153456)
authorVictor Stinner <vstinner@python.org>
Thu, 9 Jul 2026 19:51:19 +0000 (21:51 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Jul 2026 19:51:19 +0000 (19:51 +0000)
gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774)

(cherry picked from commit b9e8979dcd563ee913c66802c8544aa050fda2d5)

Co-authored-by: Xiaowei Lu <weixlu420302@gmail.com>
Misc/NEWS.d/next/Build/2026-07-01-17-53-00.gh-issue-152769.Kp7mQ2.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2026-07-01-17-53-00.gh-issue-152769.Kp7mQ2.rst b/Misc/NEWS.d/next/Build/2026-07-01-17-53-00.gh-issue-152769.Kp7mQ2.rst
new file mode 100644 (file)
index 0000000..04a6ef4
--- /dev/null
@@ -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.
index b24bb35148beee1c06ae3ef49085e70ad42e00bd..90f026976d0e54c66f073800a66650a3b0f471d7 100755 (executable)
--- a/configure
+++ b/configure
@@ -14431,6 +14431,10 @@ case $PLATFORM_TRIPLET in #(
     perf_trampoline=yes ;; #(
   aarch64-linux-gnu) :
     perf_trampoline=yes ;; #(
+  x86_64-linux-gnu) :
+    perf_trampoline=yes ;; #(
+  x86_64-linux-musl) :
+    perf_trampoline=yes ;; #(
   darwin) :
     case $MACOSX_DEPLOYMENT_TARGET in #(
   10.[0-9]|10.1[0-1]) :
index 09a985dc9ce0d7dfd28b0a2415cbd205a33c2231..bdb94d6d2803383a8b359c7b07549bb6b9e2bd3f 100644 (file)
@@ -3873,6 +3873,8 @@ AC_MSG_CHECKING([perf trampoline])
 AS_CASE([$PLATFORM_TRIPLET],
   [x86_64-linux-gnu], [perf_trampoline=yes],
   [aarch64-linux-gnu], [perf_trampoline=yes],
+  [x86_64-linux-gnu], [perf_trampoline=yes],
+  [x86_64-linux-musl], [perf_trampoline=yes],
   [darwin], [AS_CASE([$MACOSX_DEPLOYMENT_TARGET],
                 [[10.[0-9]|10.1[0-1]]], [perf_trampoline=no],
                 [perf_trampoline=yes]