The Python test suite now pass on Alpine Linux (musl C library)

@vstinner Hello again!

I noticed that on Alpine, perf can’t collect Python function-level hotspot info. The reason is that the perf trampoline isn’t enabled.

The trampoline is a CPU-architecture-specific feature and has little to do with OS/libc, so I simply modified configure to reuse the same trampoline as glibc. It appears to work: function-level hotspots are now successfully collected, and several perf-related tests (test_perf_profiler, test_perfmaps, test_samply_profiler) are now PASS (they were previously SKIP).

What do you think about this? If OK, I’d be happy to open an issue. I’ve previously contributed to Eclipse Jifa (a perf tool for Java), so I have some background in profiling.

That said, I’ve only tested on the latest Alpine + musl, so it still needs to be verified on older versions as well. The aarch64 platform also needs to be tested separately (since trampoline is architecture-specific).

1 Like