diff options
author | Fedora Python maintainers <python-devel@lists.fedoraproject.org> | 2020-07-15 13:20:52 (GMT) |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2020-09-29 13:59:05 (GMT) |
commit | b8edbe4ca3915ba08d448886bb5e2452698b77a6 (patch) | |
tree | 80f1daec363c0673051b78e0b2de2b832bb49968 | |
parent | c44c76028d28dcfe4a4cc70cd692c3df6a0951f7 (diff) | |
download | cpython-b8edbe4ca3915ba08d448886bb5e2452698b77a6.zip cpython-b8edbe4ca3915ba08d448886bb5e2452698b77a6.tar.gz cpython-b8edbe4ca3915ba08d448886bb5e2452698b77a6.tar.bz2 |
00113-more-configuration-flags.patch
00113 #
Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt
so that if they are enabled, they will be in that build's pyconfig.h, so that
extension modules will reliably use them
Not yet sent upstream
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | pyconfig.h.in | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 19925ce..e0bc200 100644 --- a/configure.ac +++ b/configure.ac @@ -3032,6 +3032,30 @@ else AC_MSG_RESULT(no) fi], [AC_MSG_RESULT(no)]) +AC_MSG_CHECKING(for --with-count-allocs) +AC_ARG_WITH(count-allocs, +[ --with(out)count-allocs enable/disable per-type instance accounting], [ +if test "$withval" != no +then + AC_DEFINE(COUNT_ALLOCS, 1, + [Define to keep records of the number of instances of each type]) + AC_MSG_RESULT(yes) +else AC_MSG_RESULT(no) +fi], +[AC_MSG_RESULT(no)]) + +AC_MSG_CHECKING(for --with-call-profile) +AC_ARG_WITH(call-profile, +[ --with(out)-call-profile enable/disable statistics on function call invocation], [ +if test "$withval" != no +then + AC_DEFINE(CALL_PROFILE, 1, + [Define to keep records on function call invocation]) + AC_MSG_RESULT(yes) +else AC_MSG_RESULT(no) +fi], +[AC_MSG_RESULT(no)]) + # Check for Python-specific malloc support AC_MSG_CHECKING(for --with-pymalloc) AC_ARG_WITH(pymalloc, diff --git a/pyconfig.h.in b/pyconfig.h.in index 6522798..a81dc34 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1169,6 +1169,12 @@ /* Define to profile with the Pentium timestamp counter */ #undef WITH_TSC +/* Define to keep records of the number of instances of each type */ +#undef COUNT_ALLOCS + +/* Define to keep records on function call invocation */ +#undef CALL_PROFILE + /* Define if you want pymalloc to be disabled when running under valgrind */ #undef WITH_VALGRIND |