python / python/cpython

support perf trampoline on -linux-musl

Open
#121,608 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

currently the autotools does the following check

AS_CASE([$PLATFORM_TRIPLET],
  [x86_64-linux-gnu], [perf_trampoline=yes],
  [aarch64-linux-gnu], [perf_trampoline=yes],
  [perf_trampoline=no]
)

simply making it

AS_CASE([$PLATFORM_TRIPLET],
  [x86_64-linux-gnu], [perf_trampoline=yes],
  [x86_64-linux-musl], [perf_trampoline=yes],
  [aarch64-linux-gnu], [perf_trampoline=yes],
  [aarch64-linux-musl], [perf_trampoline=yes],
  [perf_trampoline=no]
)

makes the trampoline build on musl libc systems too, and it seems to work fine: https://img.ayaya.dev/yT9j39Lfeb8u

it doesn't seem like the assembly actually depends on libc support. maybe it should check -linux-* instead?

in any case just adding the above triples seems to work ok, unless i'm missing something, so it would be nice if it was added :)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-122370
  • gh-153424
  • gh-153457

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the autotools check using AS_CASE([$PLATFORM_TRIPLET]) described in the issue, then review linked PRs gh-122370, gh-153424, and gh-153457 first. Confirm the supported musl triples and validate the trampoline build on the affected Linux-musl platforms; done means the build succeeds with perf_trampoline enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.