X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2Frts%2FFlags.h;h=b86146148b378c2f508c9276e63d261819f346ec;hb=4bba92f93b88e15f0e0f23732d2cfa540acb737b;hp=3f3a0a952f0a4b0bea64a5a8056245d7bdc42ae1;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e;p=ghc-hetmet.git diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index 3f3a0a9..b861461 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -1,9 +1,14 @@ /* ----------------------------------------------------------------------------- * - * (c) The GHC Team, 1998-1999 + * (c) The GHC Team, 1998-2009 * * Datatypes that holds the command-line flag settings. * + * Do not #include this file directly: #include "Rts.h" instead. + * + * To understand the structure of the RTS headers, see the wiki: + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * * ---------------------------------------------------------------------------*/ #ifndef RTS_FLAGS_H @@ -29,6 +34,7 @@ struct GC_FLAGS { nat minAllocAreaSize; /* in *blocks* */ nat minOldGenSize; /* in *blocks* */ nat heapSizeSuggestion; /* in *blocks* */ + rtsBool heapSizeSuggestionAuto; double oldGenFactor; double pcFreeHeap; @@ -60,13 +66,12 @@ struct DEBUG_FLAGS { rtsBool sanity; /* 'S' warning: might be expensive! */ rtsBool stable; /* 't' */ rtsBool prof; /* 'p' */ - rtsBool eventlog; /* 'e' */ rtsBool linker; /* 'l' the object linker */ rtsBool apply; /* 'a' */ rtsBool stm; /* 'm' */ rtsBool squeeze; /* 'z' stack squeezing & lazy blackholing */ rtsBool hpc; /* 'c' coverage */ - rtsBool timestamp; /* add timestamps to traces */ + rtsBool sparks; /* 'r' */ }; struct COST_CENTRE_FLAGS { @@ -113,11 +118,16 @@ struct PROFILING_FLAGS { }; -#ifdef EVENTLOG -struct EVENTLOG_FLAGS { - rtsBool doEventLogging; +#define TRACE_NONE 0 +#define TRACE_EVENTLOG 1 +#define TRACE_STDERR 2 + +struct TRACE_FLAGS { + int tracing; + rtsBool timestamp; /* show timestamp in stderr output */ + + rtsBool scheduler; /* trace scheduler events */ }; -#endif struct CONCURRENT_FLAGS { int ctxtSwitchTime; /* in milliseconds */ @@ -139,9 +149,14 @@ struct PAR_FLAGS { rtsBool wakeupMigrate; /* migrate a thread on wakeup */ unsigned int maxLocalSparks; rtsBool parGcEnabled; /* enable parallel GC */ - rtsBool parGcGen; /* do parallel GC in this generation + unsigned int parGcGen; /* do parallel GC in this generation * and higher only */ - rtsBool parGcLoadBalancing; /* do load-balancing in parallel GC */ + rtsBool parGcLoadBalancingEnabled; + /* enable load-balancing in the + * parallel GC */ + unsigned int parGcLoadBalancingGen; + /* do load-balancing in this + * generation and higher only */ rtsBool setAffinity; /* force thread affinity with CPUs */ }; #endif /* THREADED_RTS */ @@ -179,9 +194,7 @@ typedef struct _RTS_FLAGS { struct DEBUG_FLAGS DebugFlags; struct COST_CENTRE_FLAGS CcFlags; struct PROFILING_FLAGS ProfFlags; -#ifdef EVENTLOG - struct EVENTLOG_FLAGS EventLogFlags; -#endif + struct TRACE_FLAGS TraceFlags; struct TICKY_FLAGS TickyFlags; #if defined(THREADED_RTS) @@ -203,9 +216,9 @@ extern RTS_FLAGS RtsFlags; /* Routines that operate-on/to-do-with RTS flags: */ -extern void initRtsFlagsDefaults(void); -extern void setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]); -extern void setProgName(char *argv[]); +void initRtsFlagsDefaults(void); +void setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]); +void setProgName(char *argv[]); /*