diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-05-23 10:42:31 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-06-10 21:25:54 +0100 |
commit | c88f31a08943764217b69adb1085ba423c9bcf91 (patch) | |
tree | c6bab224ac6646e12b693036d87013c8349f29cf /includes | |
parent | 9e5ea67e268be2659cd30ebaed7044d298198ab0 (diff) | |
download | haskell-c88f31a08943764217b69adb1085ba423c9bcf91.tar.gz |
Rts flags cleanup
* Remove unused/old flags from the structs
* Update old comments
* Add missing flags to GHC.RTS
* Simplify GHC.RTS, remove C code and use hsc2hs instead
* Make ParFlags unconditional, and add support to GHC.RTS
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/Flags.h | 7 | ||||
-rw-r--r-- | includes/rts/storage/GC.h | 40 |
2 files changed, 17 insertions, 30 deletions
diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index ff303dc5e6..e229aa12b1 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -50,7 +50,6 @@ typedef struct _GC_FLAGS { double pcFreeHeap; uint32_t generations; - uint32_t steps; rtsBool squeezeUpdFrames; rtsBool compact; /* True <=> "compact all the time" */ @@ -59,7 +58,6 @@ typedef struct _GC_FLAGS { rtsBool sweep; /* use "mostly mark-sweep" instead of copying * for the oldest generation */ rtsBool ringBell; - rtsBool frontpanel; Time idleGCDelayTime; /* units: TIME_RESOLUTION */ rtsBool doIdleGC; @@ -187,7 +185,6 @@ typedef struct _MISC_FLAGS { * for the linker, NULL ==> off */ } MISC_FLAGS; -#ifdef THREADED_RTS /* See Note [Synchronization of flags and base APIs] */ typedef struct _PAR_FLAGS { uint32_t nCapabilities; /* number of threads to run simultaneously */ @@ -216,7 +213,6 @@ typedef struct _PAR_FLAGS { rtsBool setAffinity; /* force thread affinity with CPUs */ } PAR_FLAGS; -#endif /* THREADED_RTS */ /* See Note [Synchronization of flags and base APIs] */ typedef struct _TICKY_FLAGS { @@ -237,10 +233,7 @@ typedef struct _RTS_FLAGS { PROFILING_FLAGS ProfFlags; TRACE_FLAGS TraceFlags; TICKY_FLAGS TickyFlags; - -#if defined(THREADED_RTS) PAR_FLAGS ParFlags; -#endif } RTS_FLAGS; #ifdef COMPILING_RTS_MAIN diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index 04548be379..4aa44bd344 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -15,41 +15,35 @@ /* ----------------------------------------------------------------------------- * Generational GC * - * We support an arbitrary number of generations, with an arbitrary number - * of steps per generation. Notes (in no particular order): + * We support an arbitrary number of generations. Notes (in no particular + * order): * - * - all generations except the oldest should have the same - * number of steps. Multiple steps gives objects a decent - * chance to age before being promoted, and helps ensure that - * we don't end up with too many thunks being updated in older - * generations. + * - Objects "age" in the nursery for one GC cycle before being promoted + * to the next generation. There is no aging in other generations. * - * - the oldest generation has one step. There's no point in aging - * objects in the oldest generation. - * - * - generation 0, step 0 (G0S0) is the allocation area. It is given + * - generation 0 is the allocation area. It is given * a fixed set of blocks during initialisation, and these blocks * normally stay in G0S0. In parallel execution, each * Capability has its own nursery. * - * - during garbage collection, each step which is an evacuation - * destination (i.e. all steps except G0S0) is allocated a to-space. - * evacuated objects are allocated into the step's to-space until - * GC is finished, when the original step's contents may be freed - * and replaced by the to-space. + * - during garbage collection, each generation which is an + * evacuation destination (i.e. all generations except G0) is + * allocated a to-space. evacuated objects are allocated into + * the generation's to-space until GC is finished, when the + * original generations's contents may be freed and replaced + * by the to-space. * - * - the mutable-list is per-generation (not per-step). G0 doesn't - * have one (since every garbage collection collects at least G0). + * - the mutable-list is per-generation. G0 doesn't have one + * (since every garbage collection collects at least G0). * - * - block descriptors contain pointers to both the step and the - * generation that the block belongs to, for convenience. + * - block descriptors contain a pointer to the generation that + * the block belongs to, for convenience. * * - static objects are stored in per-generation lists. See GC.c for * details of how we collect CAFs in the generational scheme. * - * - large objects are per-step, and are promoted in the same way - * as small objects, except that we may allocate large objects into - * generation 1 initially. + * - large objects are per-generation, and are promoted in the + * same way as small objects. * * ------------------------------------------------------------------------- */ |