summaryrefslogtreecommitdiff
path: root/rts/RtsFlags.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-21 15:49:22 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-24 09:22:06 +0100
commit0b79d5cd4687dacf7efd430df7fba9d9a5a5ce32 (patch)
tree3efb44ff81ea3ed7496215961b4e57919375b77b /rts/RtsFlags.c
parent673b6f50eca6f53cfb13b00e587c403c716baba1 (diff)
downloadhaskell-0b79d5cd4687dacf7efd430df7fba9d9a5a5ce32.tar.gz
Another overhaul of the recent_activity / idle GC handling (#5991)
Improvements: - we now turn off the timer signal in the non-threaded RTS after idleGCDelay. This should make the xmonad users on #5991 happy. - we now turn off the timer signal after idleGCDelay even if the idle GC is disabled with +RTS -I0. - we now do *not* turn off the timer when profiling. - more comments to explain the meaning of the various ACTIVITY_* values
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r--rts/RtsFlags.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 4ee19cf53d..3f38c8ac1f 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -115,6 +115,11 @@ void initRtsFlagsDefaults(void)
RtsFlags.GcFlags.frontpanel = rtsFalse;
#endif
RtsFlags.GcFlags.idleGCDelayTime = USToTime(300000); // 300ms
+#ifdef THREADED_RTS
+ RtsFlags.GcFlags.doIdleGC = rtsTrue;
+#else
+ RtsFlags.GcFlags.doIdleGC = rtsFalse;
+#endif
#if osf3_HOST_OS
/* ToDo: Perhaps by adjusting this value we can make linking without
@@ -915,8 +920,13 @@ error = rtsTrue;
if (rts_argv[arg][2] == '\0') {
/* use default */
} else {
- RtsFlags.GcFlags.idleGCDelayTime =
- fsecondsToTime(atof(rts_argv[arg]+2));
+ Time t = fsecondsToTime(atof(rts_argv[arg]+2));
+ if (t == 0) {
+ RtsFlags.GcFlags.doIdleGC = rtsFalse;
+ } else {
+ RtsFlags.GcFlags.doIdleGC = rtsTrue;
+ RtsFlags.GcFlags.idleGCDelayTime = t;
+ }
}
break;