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:
Skip Montanaro 2004-06-18 02:47:22 +00:00
parent 964c798a94
commit 56f6a4f225
3 changed files with 3118 additions and 1272 deletions

View File

@ -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.

3473
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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)