X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Fsgen%2Fsgen-conf.h;h=53e962c2b702e7ea8a893dc940ea8d42d227b967;hb=3ea09f9c8f10097e50b94702c1e4a06cb7517c4c;hp=429dcb26af30a8b2370225bf988dc247aa7db7b5;hpb=4c960e1dd530396fdd9400c87729a6ce3101e5c1;p=mono.git diff --git a/mono/sgen/sgen-conf.h b/mono/sgen/sgen-conf.h index 429dcb26af3..53e962c2b70 100644 --- a/mono/sgen/sgen-conf.h +++ b/mono/sgen/sgen-conf.h @@ -1,5 +1,6 @@ -/* - * sgen-conf.h: Tunable parameters and debugging switches. +/** + * \file + * Tunable parameters and debugging switches. * * Copyright 2001-2003 Ximian, Inc * Copyright 2003-2010 Novell, Inc. @@ -36,13 +37,6 @@ typedef mword SgenDescriptor; #define HEAVY_STAT(x) #endif -/* - * Define this to allow the user to change the nursery size by - * specifying its value in the MONO_GC_PARAMS environmental - * variable. See mono_gc_base_init for details. - */ -#define USER_CONFIG 1 - /* * The binary protocol enables logging a lot of the GC ativity in a way that is not very * intrusive and produces a compact file that can be searched using a custom tool. This @@ -210,4 +204,28 @@ typedef mword SgenDescriptor; #define SGEN_CEMENT_HASH(hv) (((hv) ^ ((hv) >> SGEN_CEMENT_HASH_SHIFT)) & (SGEN_CEMENT_HASH_SIZE - 1)) #define SGEN_CEMENT_THRESHOLD 1000 +/* + * Default values for the nursery size + */ +#define SGEN_DEFAULT_NURSERY_MIN_SIZE (1 << 19) +#define SGEN_DEFAULT_NURSERY_SIZE (1 << 22) +#define SGEN_DEFAULT_NURSERY_MAX_SIZE (1 << 25) + +/* + * We are trying to keep pauses lower than this (ms). We use it for dynamic nursery + * sizing heuristics. We are keeping leeway in order to be prepared for work-load + * variations. + */ +#define SGEN_DEFAULT_MAX_PAUSE_TIME 30 +#define SGEN_DEFAULT_MAX_PAUSE_MARGIN 0.66f + + +#define SGEN_PAUSE_MODE_MAX_PAUSE_MARGIN 0.5f + +/* + * In practice, for nurseries smaller than this, the parallel minor tends to be + * ineffective, even leading to regressions. Avoid using it for smaller nurseries. + */ +#define SGEN_PARALLEL_MINOR_MIN_NURSERY_SIZE (1 << 24) + #endif