Add configure option --enable-generations (enabled by default).
This option allows the user to enable or disable (with --disable-generations or --enable-generations=no) generations in 3m. Disabling generational collection is, in most cases, a bad idea, but it may be necessary on a platform where signal handling doesn't work well enough to support a write barrier that is implemented with page protection.
This commit is contained in:
parent
eeaac9c142
commit
7c3a207f36
|
@ -828,6 +828,7 @@ enable_csdefault
|
|||
enable_cgcdefault
|
||||
enable_sgc
|
||||
enable_sgcdebug
|
||||
enable_generations
|
||||
enable_backtrace
|
||||
enable_cify
|
||||
enable_pthread
|
||||
|
@ -1487,6 +1488,7 @@ Optional Features:
|
|||
--enable-cgcdefault use CGC as default build (NOT RECOMMENDED)
|
||||
--enable-sgc use Senora GC instead of Boehm GC (enabled by default)
|
||||
--enable-sgcdebug use Senora GC for debugging (expensive; CGC only)
|
||||
--enable-generations 3m: support generational GC (enabled by default)
|
||||
--enable-backtrace 3m: support GC backtrace dumps (expensive debug mode)
|
||||
--enable-cify compile startup code to C instead of bytecode
|
||||
--enable-pthread link with pthreads (usually auto-enabled if needed)
|
||||
|
@ -2802,6 +2804,13 @@ if test "${enable_sgcdebug+set}" = set; then :
|
|||
enableval=$enable_sgcdebug;
|
||||
fi
|
||||
|
||||
# Check whether --enable-generations was given.
|
||||
if test "${enable_generations+set}" = set; then :
|
||||
enableval=$enable_generations;
|
||||
else
|
||||
enable_generations=yes
|
||||
fi
|
||||
|
||||
# Check whether --enable-backtrace was given.
|
||||
if test "${enable_backtrace+set}" = set; then :
|
||||
enableval=$enable_backtrace;
|
||||
|
@ -3204,6 +3213,7 @@ show_explicitly_disabled "${enable_futures}" Futures
|
|||
|
||||
show_explicitly_disabled "${enable_sgc}" SGC
|
||||
show_explicitly_enabled "${enable_sgcdebug}" "SGC debug mode"
|
||||
show_explicitly_disabled "${enable_generations}" "3m generational GC"
|
||||
show_explicitly_enabled "${enable_backtrace}" "3m GC backtraces" "Note that this mode is not intended for normal Racket use"
|
||||
show_explicitly_enabled "${enable_cify}" "Startup compiled to C"
|
||||
show_explicitly_disabled "${enable_cify}" "Startup compiled to C"
|
||||
|
@ -5061,6 +5071,16 @@ if test "${enable_sgc}" = "yes" ; then
|
|||
OPTIONS="$OPTIONS -DUSE_SENORA_GC"
|
||||
fi
|
||||
|
||||
if test "${enable_generations}" = "yes" ; then
|
||||
|
||||
$as_echo "#define USE_GC_GENS 1" >>confdefs.h
|
||||
|
||||
else
|
||||
|
||||
$as_echo "#define USE_GC_GENS 0" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
############## Strip tool ################
|
||||
|
||||
if test "${enable_strip}" = "" ; then
|
||||
|
|
|
@ -60,9 +60,10 @@ AC_ARG_ENABLE(csdefault, [ --enable-csdefault use CS as default build])
|
|||
AC_ARG_ENABLE(cgcdefault, [ --enable-cgcdefault use CGC as default build (NOT RECOMMENDED)])
|
||||
AC_ARG_ENABLE(sgc, [ --enable-sgc use Senora GC instead of Boehm GC (enabled by default)], , enable_sgc=yes)
|
||||
AC_ARG_ENABLE(sgcdebug,[ --enable-sgcdebug use Senora GC for debugging (expensive; CGC only)])
|
||||
AC_ARG_ENABLE(backtrace, [ --enable-backtrace 3m: support GC backtrace dumps (expensive debug mode)])
|
||||
AC_ARG_ENABLE(generations,[ --enable-generations 3m: support generational GC (enabled by default)], , enable_generations=yes)
|
||||
AC_ARG_ENABLE(backtrace, [ --enable-backtrace 3m: support GC backtrace dumps (expensive debug mode)])
|
||||
|
||||
AC_ARG_ENABLE(cify, [ --enable-cify compile startup code to C instead of bytecode])
|
||||
AC_ARG_ENABLE(cify, [ --enable-cify compile startup code to C instead of bytecode])
|
||||
|
||||
AC_ARG_ENABLE(pthread, [ --enable-pthread link with pthreads (usually auto-enabled if needed)])
|
||||
AC_ARG_ENABLE(stackup, [ --enable-stackup assume "up" if stack direction cannot be determined])
|
||||
|
@ -204,6 +205,7 @@ show_explicitly_disabled "${enable_futures}" Futures
|
|||
|
||||
show_explicitly_disabled "${enable_sgc}" SGC
|
||||
show_explicitly_enabled "${enable_sgcdebug}" "SGC debug mode"
|
||||
show_explicitly_disabled "${enable_generations}" "3m generational GC"
|
||||
show_explicitly_enabled "${enable_backtrace}" "3m GC backtraces" "Note that this mode is not intended for normal Racket use"
|
||||
show_explicitly_enabled "${enable_cify}" "Startup compiled to C"
|
||||
show_explicitly_disabled "${enable_cify}" "Startup compiled to C"
|
||||
|
@ -787,6 +789,12 @@ if test "${enable_sgc}" = "yes" ; then
|
|||
OPTIONS="$OPTIONS -DUSE_SENORA_GC"
|
||||
fi
|
||||
|
||||
if test "${enable_generations}" = "yes" ; then
|
||||
AC_DEFINE(USE_GC_GENS, 1,[GC Generations])
|
||||
else
|
||||
AC_DEFINE(USE_GC_GENS, 0,[GC Generations])
|
||||
fi
|
||||
|
||||
############## Strip tool ################
|
||||
|
||||
m4_include(../ac/strip.m4)
|
||||
|
|
|
@ -768,8 +768,9 @@ static void NewGC_initialize(NewGC *newgc, NewGC *inheritgc, NewGC *parentgc) {
|
|||
#endif
|
||||
|
||||
newgc->mmu = mmu_create(newgc);
|
||||
|
||||
newgc->generations_available = 1;
|
||||
|
||||
newgc->generations_available = USE_GC_GENS;
|
||||
|
||||
newgc->last_full_mem_use = INITIAL_FULL_MEMORY_USE;
|
||||
newgc->new_btc_mark = 1;
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
/* platform-specific handlers */
|
||||
/******************************************************************************/
|
||||
|
||||
#ifdef USE_GC_GENS
|
||||
|
||||
/* ========== Linux signal handler ========== */
|
||||
#if defined(linux)
|
||||
#include <signal.h>
|
||||
|
@ -205,6 +207,8 @@ void fault_handler(int sn, siginfo_t *si, void *ctx)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/* init function */
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -92,4 +92,7 @@ typedef unsigned long uintptr_t;
|
|||
/* Library subpath */
|
||||
#undef SPLS_SUFFIX
|
||||
|
||||
/* Use Generations with the GC */
|
||||
#undef USE_GC_GENS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,4 +46,7 @@
|
|||
/* Enable single-precision floats: */
|
||||
#define USE_SINGLE_FLOATS
|
||||
|
||||
/* Always enable generations in GC */
|
||||
#define USE_GC_GENS 1
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user