X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsFlags.c;h=9dd6b19312e015d5147a9a8abd98261890300bfe;hb=620249786e0be7be6818d04fac4cf2d8e16581c5;hp=47ad794a47f6cc8964cc9a0fe12fe58640b0fbc6;hpb=e1ddf51abb3a89392cc9da9a36b74f0d69f9a36b;p=ghc-hetmet.git diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 47ad794..9dd6b19 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -150,6 +150,18 @@ void initRtsFlagsDefaults(void) #endif RtsFlags.GcFlags.idleGCDelayTime = 300; /* millisecs */ +#if osf3_HOST_OS +/* ToDo: Perhaps by adjusting this value we can make linking without + * -static work (i.e., not generate a core-dumping executable)? */ +# if SIZEOF_VOID_P == 8 + RtsFlags.GcFlags.heapBase = 0x180000000L; +# else +# error I have no idea where to begin the heap on a non-64-bit osf3 machine. +# endif +#else + RtsFlags.GcFlags.heapBase = 0; /* means don't care */ +#endif + #ifdef DEBUG RtsFlags.DebugFlags.scheduler = rtsFalse; RtsFlags.DebugFlags.interpreter = rtsFalse; @@ -1192,6 +1204,16 @@ error = rtsTrue; error = rtsTrue; break; + case 'b': /* heapBase in hex; undocumented */ + if (rts_argv[arg][3] != '\0') { + RtsFlags.GcFlags.heapBase + = strtol(rts_argv[arg]+3, (char **) NULL, 16); + } else { + errorBelch("-xb: requires argument"); + error = rtsTrue; + } + break; + case 'c': /* Debugging tool: show current cost centre on an exception */ PROFILING_BUILD_ONLY( RtsFlags.ProfFlags.showCCSOnException = rtsTrue; @@ -1222,13 +1244,20 @@ error = rtsTrue; } } - // Determine what tick interval we should use for the RTS timer - // by taking the shortest of the various intervals that we need to - // monitor. - if (RtsFlags.MiscFlags.tickInterval <= 0) { + if (RtsFlags.MiscFlags.tickInterval < 0) { RtsFlags.MiscFlags.tickInterval = 50; } + // If the master timer is disabled, turn off the other timers. + if (RtsFlags.MiscFlags.tickInterval == 0) { + RtsFlags.ConcFlags.ctxtSwitchTime = 0; + RtsFlags.GcFlags.idleGCDelayTime = 0; + RtsFlags.ProfFlags.profileInterval = 0; + } + + // Determine what tick interval we should use for the RTS timer + // by taking the shortest of the various intervals that we need to + // monitor. if (RtsFlags.ConcFlags.ctxtSwitchTime > 0) { RtsFlags.MiscFlags.tickInterval = stg_min(RtsFlags.ConcFlags.ctxtSwitchTime, @@ -1255,8 +1284,13 @@ error = rtsTrue; RtsFlags.ConcFlags.ctxtSwitchTicks = 0; } - RtsFlags.ProfFlags.profileIntervalTicks = - RtsFlags.ProfFlags.profileInterval / RtsFlags.MiscFlags.tickInterval; + if (RtsFlags.ProfFlags.profileInterval > 0) { + RtsFlags.ProfFlags.profileIntervalTicks = + RtsFlags.ProfFlags.profileInterval / + RtsFlags.MiscFlags.tickInterval; + } else { + RtsFlags.ProfFlags.profileIntervalTicks = 0; + } if (error) { const char **p;