Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 1fa0a65b2ff8b548aceb2f66c51b8e9e49b7aae4 1 parent e3b9881
Zoltan Varga vargaz authored
28 configure.in
@@ -744,7 +744,8 @@ DISABLED_FEATURES=none
744 744
745 745 AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
746 746 LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
747   - reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters.],
  747 + reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters,
  748 + sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
748 749 [
749 750 for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
750 751 eval "mono_feature_disable_$feature='yes'"
@@ -878,6 +879,31 @@ if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
878 879 AC_MSG_NOTICE([Disabled Shared perfcounters.])
879 880 fi
880 881
  882 +if test "x$mono_feature_disable_sgen_remset" = "xyes"; then
  883 + AC_DEFINE(DISABLE_SGEN_REMSET, 1, [Disable wbarrier=remset support in SGEN.])
  884 + AC_MSG_NOTICE([Disabled wbarrier=remset support in SGEN.])
  885 +fi
  886 +
  887 +if test "x$mono_feature_disable_sgen_marksweep_par" = "xyes"; then
  888 + AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_PAR, 1, [Disable major=marksweep-par support in SGEN.])
  889 + AC_MSG_NOTICE([Disabled major=marksweep-par support in SGEN.])
  890 +fi
  891 +
  892 +if test "x$mono_feature_disable_sgen_marksweep_fixed" = "xyes"; then
  893 + AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED, 1, [Disable major=marksweep-fixed support in SGEN.])
  894 + AC_MSG_NOTICE([Disabled major=marksweep-fixed support in SGEN.])
  895 +fi
  896 +
  897 +if test "x$mono_feature_disable_sgen_marksweep_fixed_par" = "xyes"; then
  898 + AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED_PAR, 1, [Disable major=marksweep-fixed-par support in SGEN.])
  899 + AC_MSG_NOTICE([Disabled major=marksweep-fixed-par support in SGEN.])
  900 +fi
  901 +
  902 +if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
  903 + AC_DEFINE(DISABLE_SGEN_MAJOR_COPYING, 1, [Disable major=copying support in SGEN.])
  904 + AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
  905 +fi
  906 +
881 907 AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
882 908 AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
883 909
2  mono/metadata/sgen-gc.c
@@ -4468,7 +4468,7 @@ mono_gc_base_init (void)
4468 4468 fprintf (stderr, " max-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
4469 4469 fprintf (stderr, " soft-heap-limit=n (where N is an integer, possibly with a k, m or a g suffix)\n");
4470 4470 fprintf (stderr, " nursery-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
4471   - fprintf (stderr, " major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-par' or `copying')\n");
  4471 + fprintf (stderr, " major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-par', 'marksweep-fixed', 'marksweep-fixed-par' or `copying')\n");
4472 4472 fprintf (stderr, " minor=COLLECTOR (where COLLECTOR is `simple' or `split')\n");
4473 4473 fprintf (stderr, " wbarrier=WBARRIER (where WBARRIER is `remset' or `cardtable')\n");
4474 4474 fprintf (stderr, " stack-mark=MARK-METHOD (where MARK-METHOD is 'precise' or 'conservative')\n");
13 mono/metadata/sgen-major-copying.c
@@ -59,6 +59,8 @@
59 59 #include "metadata/profiler-private.h"
60 60 #include "metadata/sgen-memory-governor.h"
61 61
  62 +#ifndef DISABLE_SGEN_MAJOR_COPYING
  63 +
62 64 #define MAJOR_SECTION_SIZE SGEN_PINNED_CHUNK_SIZE
63 65 #define BLOCK_FOR_OBJECT(o) SGEN_PINNED_CHUNK_FOR_PTR ((o))
64 66 #define MAJOR_SECTION_FOR_OBJECT(o) ((GCMemSection*)BLOCK_FOR_OBJECT ((o)))
@@ -699,4 +701,15 @@ sgen_copying_init (SgenMajorCollector *collector)
699 701 collector->major_ops.scan_object = major_scan_object;
700 702 }
701 703
  704 +#else /* DISABLE_SGEN_MAJOR_COPYING */
  705 +
  706 +void
  707 +sgen_copying_init (SgenMajorCollector *collector)
  708 +{
  709 + fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_copying.\n");
  710 + exit (1);
  711 +}
  712 +
  713 +#endif /* DISABLE_SGEN_MAJOR_COPYING */
  714 +
702 715 #endif
17 mono/metadata/sgen-marksweep-fixed-par.c
... ... @@ -1,4 +1,21 @@
  1 +#include "config.h"
  2 +
  3 +#ifndef DISABLE_SGEN_MARKSWEEP_FIXED_PAR
  4 +
1 5 #define SGEN_PARALLEL_MARK
2 6 #define FIXED_HEAP
3 7
4 8 #include "sgen-marksweep.c"
  9 +
  10 +#else
  11 +
  12 +#include "metadata/sgen-gc.h"
  13 +
  14 +void
  15 +sgen_marksweep_fixed_par_init (SgenMajorCollector *collector)
  16 +{
  17 + fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_fixed_par.\n");
  18 + exit (1);
  19 +}
  20 +
  21 +#endif
17 mono/metadata/sgen-marksweep-fixed.c
... ... @@ -1,3 +1,20 @@
  1 +#include "config.h"
  2 +
  3 +#ifndef DISABLE_SGEN_MARKSWEEP_FIXED
  4 +
1 5 #define FIXED_HEAP
2 6
3 7 #include "sgen-marksweep.c"
  8 +
  9 +#else
  10 +
  11 +#include "metadata/sgen-gc.h"
  12 +
  13 +void
  14 +sgen_marksweep_fixed_init (SgenMajorCollector *collector)
  15 +{
  16 + fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_fixed.\n");
  17 + exit (1);
  18 +}
  19 +
  20 +#endif
17 mono/metadata/sgen-marksweep-par.c
... ... @@ -1,3 +1,20 @@
  1 +#include "config.h"
  2 +
  3 +#ifndef DISABLE_SGEN_MAJOR_MARKSWEEP_PAR
  4 +
1 5 #define SGEN_PARALLEL_MARK
2 6
3 7 #include "sgen-marksweep.c"
  8 +
  9 +#else
  10 +
  11 +#include "metadata/sgen-gc.h"
  12 +
  13 +void
  14 +sgen_marksweep_par_init (SgenMajorCollector *collector)
  15 +{
  16 + fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_marksweep_par.\n");
  17 + exit (1);
  18 +}
  19 +
  20 +#endif /* DISABLE_SGEN_MAJOR_MARKSWEEP_PAR */
19 mono/metadata/sgen-ssb.c
... ... @@ -1,5 +1,5 @@
1 1 /*
2   - * sgen-cardtable.c: Card table implementation for sgen
  2 + * sgen-ssb.c: Remembered sets
3 3 *
4 4 * Author:
5 5 * Rodrigo Kumpera (rkumpera@novell.com)
@@ -38,6 +38,8 @@
38 38 #include "metadata/sgen-protocol.h"
39 39 #include "utils/mono-counters.h"
40 40
  41 +#ifndef DISABLE_SGEN_REMSET
  42 +
41 43 /*A two slots cache for recently inserted remsets */
42 44 static gpointer global_remset_cache [2];
43 45
@@ -894,7 +896,6 @@ sgen_ssb_find_address (char *addr)
894 896 return FALSE;
895 897 }
896 898
897   -
898 899 void
899 900 sgen_ssb_init (SgenRemeberedSet *remset)
900 901 {
@@ -941,4 +942,16 @@ sgen_ssb_init (SgenRemeberedSet *remset)
941 942
942 943 remset->find_address = sgen_ssb_find_address;
943 944 }
944   -#endif
  945 +
  946 +#else
  947 +
  948 +void
  949 +sgen_ssb_init (SgenRemeberedSet *remset)
  950 +{
  951 + fprintf (stderr, "Error: Mono was configured using --enable-minimal=sgen_wbarrier.\n");
  952 + exit (1);
  953 +}
  954 +
  955 +#endif /* DISABLE_SGEN_REMSET */
  956 +
  957 +#endif /* HAVE_SGEN_GC */

0 comments on commit 1fa0a65

Please sign in to comment.
Something went wrong with that request. Please try again.