mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)
⚠️ ⚠️ Note for reviewers, hackers and fellow systems/low-level/compiler engineers ⚠️ ⚠️ If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**. If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.
This commit is contained in:
parent
0f733fffe8
commit
6d791a9736
24 changed files with 1412 additions and 2 deletions
30
configure
generated
vendored
30
configure
generated
vendored
|
@ -861,6 +861,7 @@ LIBEXPAT_CFLAGS
|
|||
TZPATH
|
||||
LIBUUID_LIBS
|
||||
LIBUUID_CFLAGS
|
||||
PERF_TRAMPOLINE_OBJ
|
||||
SHLIBS
|
||||
CFLAGSFORSHARED
|
||||
LINKFORSHARED
|
||||
|
@ -11498,6 +11499,35 @@ esac
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
|
||||
$as_echo "$SHLIBS" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking perf trampoline" >&5
|
||||
$as_echo_n "checking perf trampoline... " >&6; }
|
||||
case $PLATFORM_TRIPLET in #(
|
||||
x86_64-linux-gnu) :
|
||||
perf_trampoline=yes ;; #(
|
||||
aarch64-linux-gnu) :
|
||||
perf_trampoline=yes ;; #(
|
||||
*) :
|
||||
perf_trampoline=no
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perf_trampoline" >&5
|
||||
$as_echo "$perf_trampoline" >&6; }
|
||||
|
||||
if test "x$perf_trampoline" = xyes; then :
|
||||
|
||||
|
||||
$as_echo "#define PY_HAVE_PERF_TRAMPOLINE 1" >>confdefs.h
|
||||
|
||||
PERF_TRAMPOLINE_OBJ=Objects/asm_trampoline.o
|
||||
|
||||
if test "x$Py_DEBUG" = xtrue; then :
|
||||
|
||||
as_fn_append BASECFLAGS " -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# checks for libraries
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue