added build time option --enable/disable-stats to enable/disable stats collection.
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 28 Feb 2011 18:32:19 +0000 (12:32 -0600)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 28 Feb 2011 18:32:19 +0000 (12:32 -0600)
build
src/scripts/configure
src/scripts/configure.in
src/scripts/conv-autoconfig.h.in

diff --git a/build b/build
index 1da8c93f5ac2f6f250bd3a3c5d6ce52fbb4decd7..2b48cb9c12aae0c0ce768b11c7695af4d6bd669b 100755 (executable)
--- a/build
+++ b/build
@@ -567,7 +567,7 @@ then
     echo '#define CMK_OPTIMIZE 1' >> $ConvHeader
     # Prepend optimize so that an explicit -no-optimize still works
     OPTS="-optimize -production $OPTS"
-    CONFIG_OPTS="--disable-controlpoint --disable-tracing --disable-charmdebug --disable-replay --disable-error-checking $CONFIG_OPTS"
+    CONFIG_OPTS="--disable-controlpoint --disable-tracing --disable-charmdebug --disable-replay --disable-error-checking --disable-stats $CONFIG_OPTS"
 fi
 
 # build with Tau
index 8c6aba7ea08b2f03c7ef09873d731f0bc4958780..715a44a49cea33c8183e197888d9769ff3ecefbd 100755 (executable)
@@ -600,6 +600,7 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_error_checking
+enable_stats
 enable_tracing
 enable_charmdebug
 enable_replay
@@ -1219,6 +1220,7 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-error-checking enable error checking
+  --enable-stats          enable statistics collection
   --enable-tracing        enable tracing modules
   --enable-charmdebug     enable charmDebug
   --enable-replay         enable record/replay
@@ -1710,6 +1712,31 @@ _ACEOF
 
 fi
 
+# enable/disable statistics collection
+# Check whether --enable-stats was given.
+if test "${enable_stats+set}" = set; then :
+  enableval=$enable_stats;
+else
+  enable_stats=yes
+fi
+
+
+if test "$enable_stats" = "no"
+then
+  Echo "Statistics collection is disabled"
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_WITH_STATS 0
+_ACEOF
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_WITH_STATS 1
+_ACEOF
+
+fi
+
 # check enable/disable
 # Check whether --enable-tracing was given.
 if test "${enable_tracing+set}" = set; then :
index c4b8cb245a32db9d6a3ad30eaa6b736e2db54598..ba3f205bfd8285cb5726b7b1514cc9310473b41f 100644 (file)
@@ -36,6 +36,20 @@ else
   AC_DEFINE_UNQUOTED(CMK_ERROR_CHECKING, 1, [enable error checking])
 fi
 
+# enable/disable statistics collection
+AC_ARG_ENABLE([stats],
+            [AS_HELP_STRING([--enable-stats],
+              [enable statistics collection])], ,
+            [enable_stats=yes])
+
+if test "$enable_stats" = "no"
+then
+  Echo "Statistics collection is disabled" 
+  AC_DEFINE_UNQUOTED(CMK_WITH_STATS, 0, [disable statistics collection])
+else
+  AC_DEFINE_UNQUOTED(CMK_WITH_STATS, 1, [enable statistics collection])
+fi
+
 # check enable/disable
 AC_ARG_ENABLE([tracing],
             [AS_HELP_STRING([--enable-tracing],
index 5553552d98d4df4e5e4c8f1297fe5322f2afd9bd..53974c17883d03d03ce716fa5a6e43e7c304bc3a 100644 (file)
 /* disable controlpoint */
 #undef CMK_WITH_CONTROLPOINT
 
+/* enable statistics collection */
+#undef CMK_WITH_STATS
+
 /* whether __int64 works */
 #undef CMK___int64_DEFINED