KEMBAR78
bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats by markshannon · Pull Request #30116 · python/cpython · GitHub
Skip to content

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Dec 15, 2021

  • Adds --with-pystats configure option to #define Py_STATS.
  • Replaces various specialization stats gathering options with Py_STATS.

https://bugs.python.org/issue46072

@markshannon
Copy link
Member Author

@tiran, could you check that my changes to the configure and configure.ac files are sane?

@tiran
Copy link
Member

tiran commented Dec 15, 2021

I think this should be an enable flag rather than a with flag. AC_ARG_WITH is for Optional Packages, AC_ARG_ENABLE is for Optional Features. We don't use with and enable consistently in our configure file.

# Check for --enable-pystats
AC_MSG_CHECKING([for --enable-pystats])
AC_ARG_ENABLE([pystats],
  [AS_HELP_STRING(
    [--enable-pystats],
    [enable internal statistics gathering (default is no)])],,
  [enable_pystats=no]
)
AC_MSG_RESULT([$enable_pystats])

AS_VAR_IF([enable_pystats], [yes], [
  AC_DEFINE([Py_STATS], [1], [Define if you want to enable internal statistics gathering.])
])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants