X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FRtsFlags.h;h=c997b2239611a23809eeab13b0c108d2fe5b5d1d;hb=e6218fe7eff4e34e1a3c823cd4b7aebe09d2d4fb;hp=8eef5b3b7d961294bf0fea972f0002d3206ec593;hpb=0bffc410964e1688ad80d277d53400659e697ab5;p=ghc-hetmet.git diff --git a/ghc/includes/RtsFlags.h b/ghc/includes/RtsFlags.h index 8eef5b3..c997b22 100644 --- a/ghc/includes/RtsFlags.h +++ b/ghc/includes/RtsFlags.h @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.h,v 1.44 2002/12/11 15:36:39 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -42,24 +41,28 @@ struct GC_FLAGS { rtsBool ringBell; rtsBool frontpanel; + + int idleGCDelayTicks; /* in milliseconds */ }; struct DEBUG_FLAGS { - // flags to control debugging output & extra checking in various subsystems - rtsBool scheduler; // 's' - rtsBool interpreter; // 'i' - rtsBool codegen; // 'c' - rtsBool weak; // 'w' - rtsBool gccafs; // 'G' - rtsBool gc; // 'g' - rtsBool block_alloc; // 'b' - rtsBool sanity; // 'S' warning: might be expensive! - rtsBool stable; // 't' - rtsBool prof; // 'p' - rtsBool gran; // 'r' - rtsBool par; // 'P' - rtsBool linker; // 'l' the object linker - rtsBool apply; // 'a' + /* flags to control debugging output & extra checking in various subsystems */ + rtsBool scheduler; /* 's' */ + rtsBool interpreter; /* 'i' */ + rtsBool codegen; /* 'c' */ + rtsBool weak; /* 'w' */ + rtsBool gccafs; /* 'G' */ + rtsBool gc; /* 'g' */ + rtsBool block_alloc; /* 'b' */ + rtsBool sanity; /* 'S' warning: might be expensive! */ + rtsBool stable; /* 't' */ + rtsBool prof; /* 'p' */ + rtsBool gran; /* 'r' */ + rtsBool par; /* 'P' */ + rtsBool linker; /* 'l' the object linker */ + rtsBool apply; /* 'a' */ + rtsBool stm; /* 'm' */ + rtsBool squeeze; /* 'z' stack squeezing & lazy blackholing */ }; struct COST_CENTRE_FLAGS { @@ -73,14 +76,8 @@ struct COST_CENTRE_FLAGS { int msecsPerTick; /* derived */ }; -#ifdef PROFILING struct PROFILING_FLAGS { unsigned int doHeapProfile; - - nat profileInterval; /* delta between samples (in ms) */ - nat profileIntervalTicks; /* delta between samples (in 'ticks') */ - - # define NO_HEAP_PROFILING 0 /* N.B. Used as indexes into arrays */ # define HEAP_BY_CCS 1 # define HEAP_BY_MOD 2 @@ -89,8 +86,16 @@ struct PROFILING_FLAGS { # define HEAP_BY_RETAINER 6 # define HEAP_BY_LDV 7 +# define HEAP_BY_INFOPTR 1 /* DEBUG only */ +# define HEAP_BY_CLOSURE_TYPE 2 /* DEBUG only */ + + nat profileInterval; /* delta between samples (in ms) */ + nat profileIntervalTicks; /* delta between samples (in 'ticks') */ + rtsBool includeTSOs; + + rtsBool showCCSOnException; - + nat maxRetainerSetSize; char* modSelector; @@ -102,15 +107,6 @@ struct PROFILING_FLAGS { char* bioSelector; }; -#elif defined(DEBUG) -# define NO_HEAP_PROFILING 0 -# define HEAP_BY_INFOPTR 1 -# define HEAP_BY_CLOSURE_TYPE 2 -struct PROFILING_FLAGS { - unsigned int doHeapProfile; /* heap profile using symbol table */ - -}; -#endif /* DEBUG || PROFILING */ struct CONCURRENT_FLAGS { int ctxtSwitchTime; /* in milliseconds */ @@ -165,12 +161,12 @@ struct PAR_FLAGS { }; #endif /* PAR */ -#ifdef SMP +#ifdef THREADED_RTS struct PAR_FLAGS { nat nNodes; /* number of threads to run simultaneously */ unsigned int maxLocalSparks; }; -#endif /* SMP */ +#endif /* THREADED_RTS */ #ifdef GRAN struct GRAN_STATS_FLAGS { @@ -244,8 +240,8 @@ struct GRAN_FLAGS { struct GRAN_COST_FLAGS Costs; /* cost metric for simulation */ struct GRAN_DEBUG_FLAGS Debug; /* debugging options */ - nat maxThreads; // ToDo: share with SMP and GUM - // rtsBool labelling; + nat maxThreads; /* ToDo: share with THREADED_RTS and GUM */ + /* rtsBool labelling; */ nat packBufferSize; nat packBufferSize_internal; @@ -281,56 +277,52 @@ struct GRAN_FLAGS { rtsBool RandomSteal; /* steal spark/thread from random proc */ rtsBool NoForward; /* no forwarding of fetch messages */ - // unsigned int debug; - // rtsBool event_trace; - // rtsBool event_trace_all; + /* unsigned int debug; */ + /* rtsBool event_trace; */ + /* rtsBool event_trace_all; */ }; #endif /* GRAN */ -#ifdef TICKY_TICKY struct TICKY_FLAGS { rtsBool showTickyStats; FILE *tickyFile; }; -#endif /* TICKY_TICKY */ /* Put them together: */ -struct RTS_FLAGS { - struct GC_FLAGS GcFlags; - struct CONCURRENT_FLAGS ConcFlags; - -#ifdef DEBUG - struct DEBUG_FLAGS DebugFlags; -#endif -#if defined(PROFILING) || defined(PAR) +typedef struct _RTS_FLAGS { + /* The first portion of RTS_FLAGS is invariant. */ + struct GC_FLAGS GcFlags; + struct CONCURRENT_FLAGS ConcFlags; + struct DEBUG_FLAGS DebugFlags; struct COST_CENTRE_FLAGS CcFlags; -#endif -#if defined(PROFILING) || defined(DEBUG) - struct PROFILING_FLAGS ProfFlags; -#endif -#if defined(SMP) || defined(PAR) + struct PROFILING_FLAGS ProfFlags; + struct TICKY_FLAGS TickyFlags; + +#if defined(THREADED_RTS) || defined(PAR) struct PAR_FLAGS ParFlags; #endif #ifdef GRAN struct GRAN_FLAGS GranFlags; #endif -#ifdef TICKY_TICKY - struct TICKY_FLAGS TickyFlags; -#endif -}; +} RTS_FLAGS; #ifdef COMPILING_RTS_MAIN -extern DLLIMPORT struct RTS_FLAGS RtsFlags; +extern DLLIMPORT RTS_FLAGS RtsFlags; +#elif IN_STG_CODE +/* Hack because the C code generator can't generate '&label'. */ +extern RTS_FLAGS RtsFlags[]; #else -extern struct RTS_FLAGS RtsFlags; +extern RTS_FLAGS RtsFlags; #endif /* Routines that operate-on/to-do-with RTS flags: */ -void initRtsFlagsDefaults(void); -void setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]); +extern void initRtsFlagsDefaults(void); +extern void setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]); +extern void setProgName(char *argv[]); + /* * The printf formats are here, so we are less likely to make