8000 bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats by markshannon · Pull Request #30116 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats #30116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use --enable-pystats instead of --with-pystats.
  • Loading branch information
markshannon committed Dec 15, 2021
commit eabf35b3d09b1481ca15c748144db07117625360
29 changes: 15 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ enable_shared
enable_profiling
with_pydebug
with_trace_refs
with_pystats
enable_pystats
with_assertions
enable_optimizations
with_lto
Expand Down 10000 Expand Up @@ -1714,6 +1714,7 @@ Optional Features:
no)
--enable-profiling enable C-level code profiling with gprof (default is
no)
--enable-pystats enable internal statistics gathering (default is no)
--enable-optimizations enable expensive, stable optimizations (PGO, etc.)
(default is no)
--enable-loadable-sqlite-extensions
Expand Down Expand Up @@ -1754,7 +1755,6 @@ Optional Packages:
--with-pydebug build with Py_DEBUG defined (default is no)
--with-trace-refs enable tracing references for debugging purpose
(default is no)
--with-pystats enable internal statistics gathering (default is no)
--with-assertions build with C assertions enabled (default is no)
--with-lto=[full|thin|no|yes]
enable Link-Time-Optimization in any build (default
Expand Down Expand Up @@ -6917,26 +6917,27 @@ $as_echo "#define Py_TRACE_REFS 1" >>confdefs.h

fi

# Check for --with-pystats
# --with-pystats
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pystats" >&5
$as_echo_n "checking for --with-pystats... " >&6; }

# Check whether --with-pystats was given.
if test "${with_pystats+set}" = set; then :
withval=$with_pystats;
# Check for --enable-pystats
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-pystats" >&5
$as_echo_n "checking for --enable-pystats... " >&6; }
# Check whether --enable-pystats was given.
if test "${enable_pystats+set}" = set; then :
enableval=$enable_pystats;
else
with_pystats=no
enable_pystats=no

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pystats" >&5
$as_echo "$with_pystats" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pystats" >&5
$as_echo "$enable_pystats" >&6; }

if test "x$enable_pystats" = xyes; then :

if test "$with_pystats" = "yes"
then

$as_echo "#define Py_STATS 1" >>confdefs.h


fi

# Check for --with-assertions.
Expand Down
26 changes: 13 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1387,20 +1387,20 @@ then
AC_DEFINE(Py_TRACE_REFS, 1, [Define if you want to enable tracing references for debugging purpose])
fi

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

if test "$with_pystats" = "yes"
then
AC_DEFINE(Py_STATS, 1, [Define if you want to enable internal statistics gathering])
fi
# 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.])
])

# Check for --with-assertions.
# This allows enabling assertions without Py_DEBUG.
Expand Down
2 changes: 1 addition & 1 deletion pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@
SipHash13: 3, externally defined: 0 */
#undef Py_HASH_ALGORITHM

/* Define if you want to enable internal statistics gathering */
/* Define if you want to enable internal statistics gathering. */
#undef Py_STATS

/* Define if you want to enable tracing references for debugging purpose */
Expand Down
0