allow developers to more easily build a profiling version of the interpreter
and modules by configuring with the --enable-profiling flag.
This commit is contained in:
parent
964c798a94
commit
56f6a4f225
|
@ -515,6 +515,9 @@ Tools/Demos
|
|||
Build
|
||||
-----
|
||||
|
||||
- Profiling using gprof is now available if Python is configured with
|
||||
--enable-profiling.
|
||||
|
||||
- Profiling the VM using the Pentium TSC is now possible if Python
|
||||
is configured --with-tsc.
|
||||
|
||||
|
|
18
configure.in
18
configure.in
|
@ -485,6 +485,24 @@ then
|
|||
fi
|
||||
AC_MSG_RESULT($enable_shared)
|
||||
|
||||
AC_MSG_CHECKING(for --enable-profiling)
|
||||
AC_ARG_ENABLE(profiling,
|
||||
AC_HELP_STRING(--enable-profiling, enable C-level code profiling),
|
||||
[ac_save_cc="$CC"
|
||||
CC="$CC -pg"
|
||||
AC_TRY_RUN([int main() { return 0; }],
|
||||
ac_enable_profiling="yes",
|
||||
ac_enable_profiling="no",
|
||||
ac_enable_profiling="no")
|
||||
CC="$ac_save_cc"])
|
||||
AC_MSG_RESULT($ac_enable_profiling)
|
||||
|
||||
case "$ac_enable_profiling" in
|
||||
"yes")
|
||||
BASECFLAGS="-pg $BASECFLAGS"
|
||||
LDFLAGS="-pg $LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(LDLIBRARY)
|
||||
|
||||
|
|
Loading…
Reference in New Issue