Skip to content

Commit

Permalink
Merge pull request mono#3114 from alexanderkyte/mono_conf_gc
Browse files Browse the repository at this point in the history
[runtime] Add configuration for the default sgen gc mode
  • Loading branch information
kumpera committed Jun 7, 2016
2 parents cd12b91 + 16c5c2e commit 968540b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ if test -d $srcdir/eglib; then
fi


conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"

conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c

if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
Expand Down
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,8 @@ dnl
dnl Simple Generational checks (sgen)
dnl
SGEN_DEFINES=
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
AC_ARG_WITH(sgen-default-concurrent, [ --with-sgen-default-concurrent=yes,no Use Concurrent GC, default=no],[],[with_sgen_default_concurrent=no])
if test x$buildsgen = xyes; then
AC_DEFINE(HAVE_MOVING_COLLECTOR, 1, [Moving collector])
SGEN_DEFINES="-DHAVE_SGEN_GC"
Expand All @@ -3271,6 +3272,10 @@ if test x$buildsgen = xyes; then
else
gc_msg="sgen and $gc_msg"
fi

if test x$with_sgen_default_concurrent != xno; then
AC_DEFINE(HAVE_CONC_GC_AS_DEFAULT, 1, [Defaults to concurrent GC])
fi
fi
AC_SUBST(SGEN_DEFINES)
AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
Expand Down
2 changes: 1 addition & 1 deletion mono/sgen/sgen-gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ nursery_canaries_enabled (void)

#define safe_object_get_size sgen_safe_object_get_size

#if defined(PLATFORM_MACOSX) || defined(HOST_WIN32) || (defined(__linux__) && !defined(PLATFORM_ANDROID))
#if defined(HAVE_CONC_GC_AS_DEFAULT)
/* Use concurrent major on deskstop platforms */
#define DEFAULT_MAJOR_INIT sgen_marksweep_conc_init
#define DEFAULT_MAJOR_NAME "marksweep-conc"
Expand Down

0 comments on commit 968540b

Please sign in to comment.