gh-149800: Split perf trampoline assembly into per-architecture files#149894
Conversation
|
I believe this is a candidate for skip-news since it's refactoring. I've tested the combinations on x86_64 and aarch64. Final binary has the proper hardware protections when used and gnu notes, perf tests pass, -Xperf and -Xperf_jit works fine through my testing and also for completeness I tested out of tree builds and they are fine as well. For the build part I haven't tested the macOS, I don't have access to a machine, this needs to be verified. I followed there a similar convention as the jit_shim object. Noting that the RISC-V support is broken, hence the lack of configure target, I just moved the assembly to its own file, I plan to provide a PR to fix it in the future, but hopefully after the implementation of automatic generation of dwarf info. |
|
!buildbot perf |
|
🤖 New build scheduled with the buildbot fleet by @pablogsal for commit 25df308 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149894%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
Seems this broke JIT CI on mac https://github.com/python/cpython/actions/runs/26359470542/job/77592208454?pr=150160 |
|
looking into it |
…nGH-149894 follow-up) After the perf trampoline assembly was split into per-architecture files, the macOS universal2 build failed at the lipo step: fatal error: lipo: Python/asm_trampoline_aarch64.o and Python/asm_trampoline_x86_64.o have the same architectures (x86_64) and can't be in the same fat output file PY_CORE_CFLAGS on universal2 contains "-arch arm64 -arch x86_64", so each .S file was assembled into a fat .o containing both slices (with one slice empty because of the #ifdef guards). lipo then refused to merge two fat objects that share architectures. Compile each per-arch object with a single -arch flag before merging.
Sorry for the messup, seems the original fixup for Mac didn't work properly, though the CI back then passed for some reason. |
Uh oh!
There was an error while loading. Please reload this page.