X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsFlags.c;h=9dd6b19312e015d5147a9a8abd98261890300bfe;hb=c6c423e0499131c6f40752373f5f4156ec59aaa7;hp=0ab13992ce9479b1bd6ae8d42e58cdcc3486a16f;hpb=73637ad66b7f88e57dcd0e0ea93b3d7bf8fb0d78;p=ghc-hetmet.git diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 0ab1399..9dd6b19 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -1244,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, @@ -1277,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;