6 For defaults, see the @initRtsFlagsDefaults@ routine.
11 I_ giveStats; /* ToDo: replace with enum type? */
13 #define VERBOSE_GC_STATS 1
15 I_ stksSize; /* this size is stored to record number of *words* */
16 I_ heapSize; /* this size is stored to record number of *words* */
18 rtsBool allocAreaSizeGiven;
19 I_ specifiedOldGenSize; /* zero => use the rest of the heap */
21 I_ minAllocAreaSize; /* derived from: pcFreeHeap, heap-size */
23 rtsBool force2s; /* force the use of 2-space copying collection;
24 forced to rtsTrue if we do *heap* profiling.
26 rtsBool forceGC; /* force a major GC every <interval> bytes */
27 I_ forcingInterval; /* actually, stored as a number of *words* */
30 /* bit 1 set: chatty GC summaries
31 2 set: details of minor collections
32 4 set: details of major collections, except marking
33 8 set: ditto, but marking this time
34 16 set: GC of MallocPtrs
35 32 set: GC of Concurrent things
37 #define DEBUG_TRACE_MINOR_GC 2
38 #define DEBUG_TRACE_MAJOR_GC 4
39 #define DEBUG_TRACE_MARKING 8
40 #define DEBUG_TRACE_MALLOCPTRS 16
41 #define DEBUG_TRACE_CONCURRENT 32
43 rtsBool lazyBlackHoling;
44 rtsBool doSelectorsAtGC;
45 rtsBool squeezeUpdFrames;
51 #if defined(PROFILING) || defined(PAR)
52 /* with PROFILING, full cost-centre stuff (also PROFILING_FLAGS);
53 with PAR, just the four fixed cost-centres.
55 struct COST_CENTRE_FLAGS {
57 # define COST_CENTRES_SUMMARY 1
58 # define COST_CENTRES_VERBOSE 2 /* incl. serial time profile */
59 # define COST_CENTRES_ALL 3
62 # define SORTCC_LABEL 'C'
63 # define SORTCC_TIME 'T'
64 # define SORTCC_ALLOC 'A'
66 I_ ctxtSwitchTicks; /* derived */
67 I_ profilerTicks; /* derived */
68 I_ msecsPerTick; /* derived */
73 struct PROFILING_FLAGS {
75 # define NO_HEAP_PROFILING 0 /* N.B. Used as indexes into arrays */
77 # define HEAP_BY_MOD 2
78 # define HEAP_BY_GRP 3
79 # define HEAP_BY_DESCR 4
80 # define HEAP_BY_TYPE 5
81 # define HEAP_BY_TIME 6
86 # define DESCRchar 'D'
93 struct CONCURRENT_FLAGS {
94 I_ ctxtSwitchTime; /* in milliseconds */
99 #endif /* CONCURRENT */
103 rtsBool parallelStats; /* Gather parallel statistics */
104 rtsBool granSimStats; /* Full .gr profile (rtsTrue) or only END events? */
105 rtsBool granSimStats_Binary;
107 rtsBool outputDisabled; /* Disable output for performance purposes */
121 rtsBool showTickyStats;
124 /* see also: doUpdEntryCounts in AllFlags */
126 #endif /* TICKY_TICKY */
132 struct GC_FLAGS GcFlags;
133 struct DEBUG_FLAGS DebugFlags; /* unused at present */
135 #if defined(PROFILING) || defined(PAR)
136 struct COST_CENTRE_FLAGS CcFlags;
139 struct PROFILING_FLAGS ProfFlags;
142 struct CONCURRENT_FLAGS ConcFlags;
145 struct PAR_FLAGS ParFlags;
148 struct GRAN_FLAGS GranFlags;
151 struct TICKY_FLAGS TickyFlags;
155 extern struct RTS_FLAGS RTSflags;
158 Routines that operate-on/to-do-with RTS flags:
160 void initRtsFlagsDefaults (STG_NO_ARGS);
161 void setupRtsFlags PROTO((int *argc, char *argv[],
162 int *rts_argc, char *rts_argv[]));
165 OLD: This is the maximum identifier length that can be used for a cost
166 centre or description string. It includes the terminating null
169 The printf formats are here, so we are less likely to make overly-long
170 filenames (with disastrous results). No more than 128 chars, please!
173 #define STATS_FILENAME_MAXLEN 128
175 #define GR_FILENAME_FMT "%0.124s.gr"
176 #define GR_FILENAME_FMT_GUM "%0.120s.%03d.%s"
177 #define HP_FILENAME_FMT "%0.124s.hp"
178 #define LIFE_FILENAME_FMT "%0.122s.life"
179 #define PROF_FILENAME_FMT "%0.122s.prof"
180 #define PROF_FILENAME_FMT_GUM "%0.118s.%03d.prof"
181 #define QP_FILENAME_FMT "%0.124s.qp"
182 #define STAT_FILENAME_FMT "%0.122s.stat"
183 #define TICKY_FILENAME_FMT "%0.121s.ticky"
184 #define TIME_FILENAME_FMT "%0.122s.time"
185 #define TIME_FILENAME_FMT_GUM "%0.118s.%03d.time"
188 Multi-slurp protection:
190 #endif /* RTSFLAGS_H */