X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsFlags.c;h=f24912fe46777204542aa97fffd178161f443680;hb=0dbbf1932d550293986af6244202cb735b2cd966;hp=b0accf96b7a4e98fe2eecb7e521e268c22dfcbd4;hpb=33a84b8c79f0ccd2400996a0e571b0659d4c16ed;p=ghc-hetmet.git diff --git a/ghc/rts/RtsFlags.c b/ghc/rts/RtsFlags.c index b0accf9..f24912f 100644 --- a/ghc/rts/RtsFlags.c +++ b/ghc/rts/RtsFlags.c @@ -190,6 +190,7 @@ void initRtsFlagsDefaults(void) RtsFlags.DebugFlags.gran = rtsFalse; RtsFlags.DebugFlags.par = rtsFalse; RtsFlags.DebugFlags.linker = rtsFalse; + RtsFlags.DebugFlags.squeeze = rtsFalse; #endif #if defined(PROFILING) || defined(PAR) @@ -216,7 +217,7 @@ void initRtsFlagsDefaults(void) RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */ -#ifdef SMP +#ifdef THREADED_RTS RtsFlags.ParFlags.nNodes = 1; #endif @@ -243,9 +244,9 @@ void initRtsFlagsDefaults(void) RtsFlags.ParFlags.fishDelay = FISH_DELAY; #endif -#if defined(PAR) || defined(SMP) +#if defined(PAR) || defined(THREADED_RTS) RtsFlags.ParFlags.maxLocalSparks = 4096; -#endif /* PAR || SMP */ +#endif /* PAR || THREADED_RTS */ #if defined(GRAN) /* ToDo: check defaults for GranSim and GUM */ @@ -347,7 +348,7 @@ usage_text[] = { " -c Auto-enable compaction of the oldest generation when live data is", " at least % of the maximum heap size set with -M (default: 30%)", " -c Enable compaction for all major collections", -#if defined(RTS_SUPPORTS_THREADS) +#if defined(THREADED_RTS) " -I Perform full GC after idle time (default: 0.3, 0 == off)", #endif "", @@ -431,12 +432,13 @@ usage_text[] = { " -DP DEBUG: par", " -Dl DEBUG: linker", " -Dm DEBUG: stm", +" -Dz DEBUG: stack squezing", "", #endif /* DEBUG */ -#if defined(SMP) +#if defined(THREADED_RTS) " -N Use OS threads (default: 1)", #endif -#if defined(SMP) || defined(PAR) +#if defined(THREADED_RTS) || defined(PAR) " -e Size of spark pools (default 100)", #endif #if defined(PAR) @@ -446,7 +448,7 @@ usage_text[] = { " -qd Turn on PVM-ish debugging", " -qO Disable output for performance measurement", #endif -#if defined(SMP) || defined(PAR) +#if defined(THREADED_RTS) || defined(PAR) " -e Maximum number of outstanding local sparks (default: 4096)", #endif #if defined(PAR) @@ -609,14 +611,6 @@ errorBelch("not built for: -prof"); \ error = rtsTrue; #endif -#ifdef SMP -# define SMP_BUILD_ONLY(x) x -#else -# define SMP_BUILD_ONLY(x) \ -errorBelch("not built for: -smp"); \ -error = rtsTrue; -#endif - #ifdef PAR # define PAR_BUILD_ONLY(x) x #else @@ -625,10 +619,18 @@ errorBelch("not built for: -parallel"); \ error = rtsTrue; #endif -#if defined(SMP) || defined(PAR) -# define PAR_OR_SMP_BUILD_ONLY(x) x +#ifdef THREADED_RTS +# define THREADED_BUILD_ONLY(x) x #else -# define PAR_OR_SMP_BUILD_ONLY(x) \ +# define THREADED_BUILD_ONLY(x) \ +errorBelch("not built for: -smp"); \ +error = rtsTrue; +#endif + +#if defined(THREADED_RTS) || defined(PAR) +# define PAR_OR_THREADED_BUILD_ONLY(x) x +#else +# define PAR_OR_THREADED_BUILD_ONLY(x) \ errorBelch("not built for: -parallel or -smp"); \ error = rtsTrue; #endif @@ -726,6 +728,9 @@ error = rtsTrue; case 'm': RtsFlags.DebugFlags.stm = rtsTrue; break; + case 'z': + RtsFlags.DebugFlags.squeeze = rtsTrue; + break; default: bad_option( rts_argv[arg] ); } @@ -1032,9 +1037,9 @@ error = rtsTrue; } break; -#ifdef SMP +#ifdef THREADED_RTS case 'N': - SMP_BUILD_ONLY( + THREADED_BUILD_ONLY( if (rts_argv[arg][2] != '\0') { RtsFlags.ParFlags.nNodes = strtol(rts_argv[arg]+2, (char **) NULL, 10); @@ -1047,7 +1052,7 @@ error = rtsTrue; #endif /* =========== PARALLEL =========================== */ case 'e': - PAR_OR_SMP_BUILD_ONLY( + PAR_OR_THREADED_BUILD_ONLY( if (rts_argv[arg][2] != '\0') { RtsFlags.ParFlags.maxLocalSparks = strtol(rts_argv[arg]+2, (char **) NULL, 10);