Blame SOURCES/00113-more-configuration-flags.patch

ae2451
diff -up Python-2.6.5/configure.ac.more-configuration-flags Python-2.6.5/configure.ac
ae2451
--- Python-2.6.5/configure.ac.more-configuration-flags	2010-05-24 18:51:25.410111792 -0400
ae2451
+++ Python-2.6.5/configure.ac	2010-05-24 18:59:23.954986388 -0400
ae2451
@@ -2515,6 +2515,30 @@ else AC_MSG_RESULT(no)
ae2451
 fi],
ae2451
 [AC_MSG_RESULT(no)])
ae2451
 
ae2451
+AC_MSG_CHECKING(for --with-count-allocs)
ae2451
+AC_ARG_WITH(count-allocs,
ae2451
+[  --with(out)count-allocs  enable/disable per-type instance accounting], [
ae2451
+if test "$withval" != no
ae2451
+then 
ae2451
+  AC_DEFINE(COUNT_ALLOCS, 1,
ae2451
+    [Define to keep records of the number of instances of each type]) 
ae2451
+    AC_MSG_RESULT(yes)
ae2451
+else AC_MSG_RESULT(no)
ae2451
+fi],
ae2451
+[AC_MSG_RESULT(no)])
ae2451
+
ae2451
+AC_MSG_CHECKING(for --with-call-profile)
ae2451
+AC_ARG_WITH(call-profile,
ae2451
+[  --with(out)-call-profile  enable/disable statistics on function call invocation], [
ae2451
+if test "$withval" != no
ae2451
+then 
ae2451
+  AC_DEFINE(CALL_PROFILE, 1, 
ae2451
+    [Define to keep records on function call invocation]) 
ae2451
+    AC_MSG_RESULT(yes)
ae2451
+else AC_MSG_RESULT(no)
ae2451
+fi],
ae2451
+[AC_MSG_RESULT(no)])
ae2451
+
ae2451
 # Check for Python-specific malloc support
ae2451
 AC_MSG_CHECKING(for --with-pymalloc)
ae2451
 AC_ARG_WITH(pymalloc,
ae2451
diff -up Python-2.6.5/pyconfig.h.in.more-configuration-flags Python-2.6.5/pyconfig.h.in
ae2451
--- Python-2.6.5/pyconfig.h.in.more-configuration-flags	2010-05-24 18:51:45.677988086 -0400
ae2451
+++ Python-2.6.5/pyconfig.h.in	2010-05-24 19:00:44.163987730 -0400
ae2451
@@ -1019,6 +1019,12 @@
ae2451
 /* Define to profile with the Pentium timestamp counter */
ae2451
 #undef WITH_TSC
ae2451
 
ae2451
+/* Define to keep records of the number of instances of each type */
ae2451
+#undef COUNT_ALLOCS
ae2451
+
ae2451
+/* Define to keep records on function call invocation */
ae2451
+#undef CALL_PROFILE
ae2451
+
ae2451
 /* Define if you want pymalloc to be disabled when running under valgrind */
ae2451
 #undef WITH_VALGRIND
ae2451