mirror of https://github.com/python/cpython
[3.13] gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089) (#120413)
gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089)
(cherry picked from commit 4b1e85bafc
)
Co-authored-by: ixgbe00 <yangwang@iscas.ac.cn>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
d4174fa7ca
commit
d73f856840
|
@ -0,0 +1 @@
|
|||
Support Linux perf profiler to see Python calls on RISC-V architecture
|
|
@ -0,0 +1 @@
|
|||
Support Linux perf profiler to see Python calls on RISC-V architecture.
|
|
@ -22,6 +22,14 @@ _Py_trampoline_func_start:
|
|||
blr x3
|
||||
ldp x29, x30, [sp], 16
|
||||
ret
|
||||
#endif
|
||||
#ifdef __riscv
|
||||
addi sp,sp,-16
|
||||
sd ra,8(sp)
|
||||
jalr a3
|
||||
ld ra,8(sp)
|
||||
addi sp,sp,16
|
||||
jr ra
|
||||
#endif
|
||||
.globl _Py_trampoline_func_end
|
||||
_Py_trampoline_func_end:
|
||||
|
|
|
@ -13133,6 +13133,8 @@ case $PLATFORM_TRIPLET in #(
|
|||
perf_trampoline=yes ;; #(
|
||||
aarch64-linux-gnu) :
|
||||
perf_trampoline=yes ;; #(
|
||||
riscv64-linux-gnu) :
|
||||
perf_trampoline=yes ;; #(
|
||||
*) :
|
||||
perf_trampoline=no
|
||||
;;
|
||||
|
|
|
@ -3641,6 +3641,7 @@ AC_MSG_CHECKING([perf trampoline])
|
|||
AS_CASE([$PLATFORM_TRIPLET],
|
||||
[x86_64-linux-gnu], [perf_trampoline=yes],
|
||||
[aarch64-linux-gnu], [perf_trampoline=yes],
|
||||
[riscv64-linux-gnu], [perf_trampoline=yes],
|
||||
[perf_trampoline=no]
|
||||
)
|
||||
AC_MSG_RESULT([$perf_trampoline])
|
||||
|
|
Loading…
Reference in New Issue