opt_getloadingtime. Only defined for ENABLE_STATISTICS.
(getcompilingtime): Renamed to opt_getcompilingtime.
Only defined for ENABLE_STATISTICS.
* src/vm/loader.c (getloadingtime, getcompilingtime): Renamed.
* src/vm/jit/jit.c: Likewise.
* src/vm/linker.c: Likewise.
* src/native/vm/VMClassLoader.c: Likewise.
* src/vm/vm.c (OPT_TIME): Only defined for ENABLE_STATISTICS.
* configure.ac (--enable-statistics): Now statistics are disabled by
default.
dnl check for statistics
AC_MSG_CHECKING(whether statistics generation should be enabled)
AC_ARG_ENABLE([statistics],
- [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])],
+ [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
[case "${enableval}" in
- no) ENABLE_STATISTICS=no;;
- *) ENABLE_STATISTICS=yes;;
+ yes) ENABLE_STATISTICS=yes;;
+ *) ENABLE_STATISTICS=no;;
esac],
- [ENABLE_STATISTICS=yes])
+ [ENABLE_STATISTICS=no])
AC_MSG_RESULT(${ENABLE_STATISTICS})
AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
Christian Thalinger
Edwin Steiner
- $Id: VMClassLoader.c 4692 2006-03-28 10:21:40Z twisti $
+ $Id: VMClassLoader.c 4834 2006-04-25 12:25:43Z edwin $
*/
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_start();
#endif
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_stop();
#endif
Christian Thalinger
Christian Ullrich
- $Id: jit.c 4805 2006-04-21 10:54:24Z twisti $
+ $Id: jit.c 4834 2006-04-25 12:25:43Z edwin $
*/
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_start();
#endif
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_stop();
#endif
Edwin Steiner
Christian Thalinger
- $Id: linker.c 4829 2006-04-24 17:16:45Z edwin $
+ $Id: linker.c 4834 2006-04-25 12:25:43Z edwin $
*/
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_stop();
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_start();
#endif
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_stop();
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_start();
#endif
Edwin Steiner
Christian Thalinger
- $Id: loader.c 4829 2006-04-24 17:16:45Z edwin $
+ $Id: loader.c 4834 2006-04-25 12:25:43Z edwin $
*/
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_stop();
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_start();
#endif
#if defined(ENABLE_STATISTICS)
/* measure time */
- if (getloadingtime)
+ if (opt_getloadingtime)
loadingtime_stop();
- if (getcompilingtime)
+ if (opt_getcompilingtime)
compilingtime_start();
#endif
Changes:
- $Id: options.c 4833 2006-04-25 12:00:58Z edwin $
+ $Id: options.c 4834 2006-04-25 12:25:43Z edwin $
*/
bool makeinitializations = true;
-bool getloadingtime = false; /* to measure the runtime */
-bool getcompilingtime = false; /* compute compile time */
-
+#if defined(ENABLE_STATISTICS)
bool opt_stat = false;
+bool opt_getloadingtime = false; /* to measure the runtime */
+bool opt_getcompilingtime = false; /* compute compile time */
+#endif
#if defined(ENABLE_VERIFIER)
bool opt_verify = true; /* true if classfiles should be verified */
#endif
Changes:
- $Id: options.h 4833 2006-04-25 12:00:58Z edwin $
+ $Id: options.h 4834 2006-04-25 12:25:43Z edwin $
*/
extern bool makeinitializations;
-extern bool getloadingtime;
-extern bool getcompilingtime;
-
+#if defined(ENABLE_STATISTICS)
extern bool opt_stat;
+extern bool opt_getloadingtime;
+extern bool opt_getcompilingtime;
+#endif
#if defined(ENABLE_VERIFIER)
extern bool opt_verify;
#endif
OPT_VERBOSE1,
OPT_NOIEEE,
OPT_SOFTNULL,
- OPT_TIME,
#if defined(ENABLE_STATISTICS)
+ OPT_TIME,
OPT_STAT,
#endif
{ "noieee", false, OPT_NOIEEE },
#endif
{ "softnull", false, OPT_SOFTNULL },
- { "time", false, OPT_TIME },
#if defined(ENABLE_STATISTICS)
+ { "time", false, OPT_TIME },
{ "stat", false, OPT_STAT },
#endif
{ "log", true, OPT_LOG },
puts(" -noverify don't verify classfiles");
#endif
puts(" -softnull use software nullpointer check");
- puts(" -time measure the runtime");
#if defined(ENABLE_STATISTICS)
+ puts(" -time measure the runtime");
puts(" -stat detailed compiler statistics");
#endif
puts(" -log logfile specify a name for the logfile");
checknull = true;
break;
+#if defined(ENABLE_STATISTICS)
case OPT_TIME:
- getcompilingtime = true;
- getloadingtime = true;
+ opt_getcompilingtime = true;
+ opt_getloadingtime = true;
break;
-#if defined(ENABLE_STATISTICS)
case OPT_STAT:
opt_stat = true;
break;
ipcrm();
}
#endif
- if (opt_verbose || getcompilingtime || opt_stat) {
+ if (opt_verbose
+#if defined(ENABLE_STATISTICS)
+ || opt_getcompilingtime || opt_stat
+#endif
+ )
+ {
log_text("CACAO terminated by shutdown");
dolog("Exit status: %d\n", (s4) status);
}
if (opt_prof)
profile_printstats();
# endif
-#endif
+#endif /* !defined(NDEBUG) */
#if defined(USE_THREADS) && !defined(NATIVE_THREADS)
clear_thread_flags(); /* restores standard file descriptor
stacktrace_print_cycles_stats(stderr);
#endif
- if (opt_verbose || getcompilingtime || opt_stat) {
+ if (opt_verbose
+#if defined(ENABLE_STATISTICS)
+ || opt_getcompilingtime || opt_stat
+#endif
+ )
+ {
log_text("CACAO terminated");
#if defined(ENABLE_STATISTICS)
mem_usagelog(1);
- if (getcompilingtime)
+ if (opt_getcompilingtime)
print_times();
-#endif
+#endif /* defined(ENABLE_STATISTICS) */
}
/* vm_print_profile(stderr);*/
}