Permalink
Browse files

Add --enable-minimal= configure options to disable sgen features.

  • Loading branch information...
1 parent e3b9881 commit 1fa0a65b2ff8b548aceb2f66c51b8e9e49b7aae4 @vargaz vargaz committed Nov 12, 2012
View
28 configure.in
@@ -744,7 +744,8 @@ DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
- reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters.],
+ reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters,
+ sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
@@ -878,6 +879,31 @@ if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
AC_MSG_NOTICE([Disabled Shared perfcounters.])
fi
+if test "x$mono_feature_disable_sgen_remset" = "xyes"; then
+ AC_DEFINE(DISABLE_SGEN_REMSET, 1, [Disable wbarrier=remset support in SGEN.])
+ AC_MSG_NOTICE([Disabled wbarrier=remset support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_par" = "xyes"; then
+ AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_PAR, 1, [Disable major=marksweep-par support in SGEN.])
+ AC_MSG_NOTICE([Disabled major=marksweep-par support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_fixed" = "xyes"; then
+ AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED, 1, [Disable major=marksweep-fixed support in SGEN.])
+ AC_MSG_NOTICE([Disabled major=marksweep-fixed support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_fixed_par" = "xyes"; then
+ AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED_PAR, 1, [Disable major=marksweep-fixed-par support in SGEN.])
+ AC_MSG_NOTICE([Disabled major=marksweep-fixed-par support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
+ AC_DEFINE(DISABLE_SGEN_MAJOR_COPYING, 1, [Disable major=copying support in SGEN.])
+ AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
+fi
+
AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
View
2 mono/metadata/sgen-gc.c
@@ -4468,7 +4468,7 @@ mono_gc_base_init (void)
fprintf (stderr, " max-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
fprintf (stderr, " soft-heap-limit=n (where N is an integer, possibly with a k, m or a g suffix)\n");
fprintf (stderr, " nursery-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
- fprintf (stderr, " major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-par' or `copying')\n");
+ fprintf (stderr, " major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-par', 'marksweep-fixed', 'marksweep-fixed-par' or `copying')\n");
fprintf (stderr, " minor=COLLECTOR (where COLLECTOR is `simple' or `split')\n");
fprintf (stderr, " wbarrier=WBARRIER (where WBARRIER is `remset' or `cardtable')\n");
fprintf (stderr, " stack-mark=MARK-METHOD (where MARK-METHOD is 'precise' or 'conservative')\n");
View
13 mono/metadata/sgen-major-copying.c
@@ -59,6 +59,8 @@
#include "metadata/profiler-private.h"
#include "metadata/sgen-memory-governor.h"
+#ifndef DISABLE_SGEN_MAJOR_COPYING
+
#define MAJOR_SECTION_SIZE SGEN_PINNED_CHUNK_SIZE
#define BLOCK_FOR_OBJECT(o) SGEN_PINNED_CHUNK_FOR_PTR ((o))
#define MAJOR_SECTION_FOR_OBJECT(o) ((GCMemSection*)BLOCK_FOR_OBJECT ((o)))
@@ -699,4 +701,15 @@ sgen_copying_init (SgenMajorCollector *collector)
collector->major_ops.scan_object = major_scan_object;
}
+#else /* DISABLE_SGEN_MAJOR_COPYING */
+
+void
+sgen_copying_init (SgenMajorCollector *collector)
+{
+ fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_copying.\n");
+ exit (1);
+}
+
+#endif /* DISABLE_SGEN_MAJOR_COPYING */
+
#endif
View
17 mono/metadata/sgen-marksweep-fixed-par.c
@@ -1,4 +1,21 @@
+#include "config.h"
+
+#ifndef DISABLE_SGEN_MARKSWEEP_FIXED_PAR
+
#define SGEN_PARALLEL_MARK
#define FIXED_HEAP
#include "sgen-marksweep.c"
+
+#else
+
+#include "metadata/sgen-gc.h"
+
+void
+sgen_marksweep_fixed_par_init (SgenMajorCollector *collector)
+{
+ fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_fixed_par.\n");
+ exit (1);
+}
+
+#endif
View
17 mono/metadata/sgen-marksweep-fixed.c
@@ -1,3 +1,20 @@
+#include "config.h"
+
+#ifndef DISABLE_SGEN_MARKSWEEP_FIXED
+
#define FIXED_HEAP
#include "sgen-marksweep.c"
+
+#else
+
+#include "metadata/sgen-gc.h"
+
+void
+sgen_marksweep_fixed_init (SgenMajorCollector *collector)
+{
+ fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_fixed.\n");
+ exit (1);
+}
+
+#endif
View
17 mono/metadata/sgen-marksweep-par.c
@@ -1,3 +1,20 @@
+#include "config.h"
+
+#ifndef DISABLE_SGEN_MAJOR_MARKSWEEP_PAR
+
#define SGEN_PARALLEL_MARK
#include "sgen-marksweep.c"
+
+#else
+
+#include "metadata/sgen-gc.h"
+
+void
+sgen_marksweep_par_init (SgenMajorCollector *collector)
+{
+ fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_par.\n");
+ exit (1);
+}
+
+#endif /* DISABLE_SGEN_MAJOR_MARKSWEEP_PAR */
View
19 mono/metadata/sgen-ssb.c
@@ -1,5 +1,5 @@
/*
- * sgen-cardtable.c: Card table implementation for sgen
+ * sgen-ssb.c: Remembered sets
*
* Author:
* Rodrigo Kumpera (rkumpera@novell.com)
@@ -38,6 +38,8 @@
#include "metadata/sgen-protocol.h"
#include "utils/mono-counters.h"
+#ifndef DISABLE_SGEN_REMSET
+
/*A two slots cache for recently inserted remsets */
static gpointer global_remset_cache [2];
@@ -894,7 +896,6 @@ sgen_ssb_find_address (char *addr)
return FALSE;
}
-
void
sgen_ssb_init (SgenRemeberedSet *remset)
{
@@ -941,4 +942,16 @@ sgen_ssb_init (SgenRemeberedSet *remset)
remset->find_address = sgen_ssb_find_address;
}
-#endif
+
+#else
+
+void
+sgen_ssb_init (SgenRemeberedSet *remset)
+{
+ fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_wbarrier.\n");
+ exit (1);
+}
+
+#endif /* DISABLE_SGEN_REMSET */
+
+#endif /* HAVE_SGEN_GC */

0 comments on commit 1fa0a65

Please sign in to comment.