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