summaryrefslogtreecommitdiff
path: root/rts/RtsFlags.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r--rts/RtsFlags.c259
1 files changed, 130 insertions, 129 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index aeb2fe532f..b8f0b212f0 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -60,10 +60,10 @@ RtsConfig rtsConfig;
const RtsConfig defaultRtsConfig = {
.rts_opts_enabled = RtsOptsSafeOnly,
- .rts_opts_suggestions = rtsTrue,
+ .rts_opts_suggestions = true,
.rts_opts = NULL,
- .rts_hs_main = rtsFalse,
- .keep_cafs = rtsFalse,
+ .rts_hs_main = false,
+ .keep_cafs = false,
.defaultsHook = FlagDefaultsHook,
.onExitHook = OnExitHook,
.stackOverflowHook = StackOverflowHook,
@@ -101,7 +101,7 @@ static void read_debug_flags(const char *arg);
#endif
#ifdef PROFILING
-static rtsBool read_heap_profiling_flag(const char *arg);
+static bool read_heap_profiling_flag(const char *arg);
#endif
#ifdef TRACING
@@ -142,52 +142,53 @@ void initRtsFlagsDefaults(void)
RtsFlags.GcFlags.minOldGenSize = (1024 * 1024) / BLOCK_SIZE;
RtsFlags.GcFlags.maxHeapSize = 0; /* off by default */
RtsFlags.GcFlags.heapSizeSuggestion = 0; /* none */
- RtsFlags.GcFlags.heapSizeSuggestionAuto = rtsFalse;
+ RtsFlags.GcFlags.heapSizeSuggestionAuto = false;
RtsFlags.GcFlags.pcFreeHeap = 3; /* 3% */
RtsFlags.GcFlags.oldGenFactor = 2;
RtsFlags.GcFlags.generations = 2;
- RtsFlags.GcFlags.squeezeUpdFrames = rtsTrue;
- RtsFlags.GcFlags.compact = rtsFalse;
+ RtsFlags.GcFlags.squeezeUpdFrames = true;
+ RtsFlags.GcFlags.compact = false;
RtsFlags.GcFlags.compactThreshold = 30.0;
- RtsFlags.GcFlags.sweep = rtsFalse;
+ RtsFlags.GcFlags.sweep = false;
RtsFlags.GcFlags.idleGCDelayTime = USToTime(300000); // 300ms
#ifdef THREADED_RTS
- RtsFlags.GcFlags.doIdleGC = rtsTrue;
+ RtsFlags.GcFlags.doIdleGC = true;
#else
- RtsFlags.GcFlags.doIdleGC = rtsFalse;
+ RtsFlags.GcFlags.doIdleGC = false;
#endif
RtsFlags.GcFlags.heapBase = 0; /* means don't care */
RtsFlags.GcFlags.allocLimitGrace = (100*1024) / BLOCK_SIZE;
- RtsFlags.GcFlags.numa = rtsFalse;
+ RtsFlags.GcFlags.numa = false;
RtsFlags.GcFlags.numaMask = 1;
-
- RtsFlags.DebugFlags.scheduler = rtsFalse;
- RtsFlags.DebugFlags.interpreter = rtsFalse;
- RtsFlags.DebugFlags.weak = rtsFalse;
- RtsFlags.DebugFlags.gccafs = rtsFalse;
- RtsFlags.DebugFlags.gc = rtsFalse;
- RtsFlags.DebugFlags.block_alloc = rtsFalse;
- RtsFlags.DebugFlags.sanity = rtsFalse;
- RtsFlags.DebugFlags.stable = rtsFalse;
- RtsFlags.DebugFlags.stm = rtsFalse;
- RtsFlags.DebugFlags.prof = rtsFalse;
- RtsFlags.DebugFlags.apply = rtsFalse;
- RtsFlags.DebugFlags.linker = rtsFalse;
- RtsFlags.DebugFlags.squeeze = rtsFalse;
- RtsFlags.DebugFlags.hpc = rtsFalse;
- RtsFlags.DebugFlags.sparks = rtsFalse;
- RtsFlags.DebugFlags.numa = rtsFalse;
+ RtsFlags.GcFlags.ringBell = false;
+
+ RtsFlags.DebugFlags.scheduler = false;
+ RtsFlags.DebugFlags.interpreter = false;
+ RtsFlags.DebugFlags.weak = false;
+ RtsFlags.DebugFlags.gccafs = false;
+ RtsFlags.DebugFlags.gc = false;
+ RtsFlags.DebugFlags.block_alloc = false;
+ RtsFlags.DebugFlags.sanity = false;
+ RtsFlags.DebugFlags.stable = false;
+ RtsFlags.DebugFlags.stm = false;
+ RtsFlags.DebugFlags.prof = false;
+ RtsFlags.DebugFlags.apply = false;
+ RtsFlags.DebugFlags.linker = false;
+ RtsFlags.DebugFlags.squeeze = false;
+ RtsFlags.DebugFlags.hpc = false;
+ RtsFlags.DebugFlags.sparks = false;
+ RtsFlags.DebugFlags.numa = false;
#if defined(PROFILING)
RtsFlags.CcFlags.doCostCentres = 0;
#endif /* PROFILING */
- RtsFlags.ProfFlags.doHeapProfile = rtsFalse;
+ RtsFlags.ProfFlags.doHeapProfile = false;
RtsFlags.ProfFlags. heapProfileInterval = USToTime(100000); // 100ms
#ifdef PROFILING
- RtsFlags.ProfFlags.includeTSOs = rtsFalse;
- RtsFlags.ProfFlags.showCCSOnException = rtsFalse;
+ RtsFlags.ProfFlags.includeTSOs = false;
+ RtsFlags.ProfFlags.showCCSOnException = false;
RtsFlags.ProfFlags.maxRetainerSetSize = 8;
RtsFlags.ProfFlags.ccsLength = 25;
RtsFlags.ProfFlags.modSelector = NULL;
@@ -201,12 +202,12 @@ void initRtsFlagsDefaults(void)
#ifdef TRACING
RtsFlags.TraceFlags.tracing = TRACE_NONE;
- RtsFlags.TraceFlags.timestamp = rtsFalse;
- RtsFlags.TraceFlags.scheduler = rtsFalse;
- RtsFlags.TraceFlags.gc = rtsFalse;
- RtsFlags.TraceFlags.sparks_sampled= rtsFalse;
- RtsFlags.TraceFlags.sparks_full = rtsFalse;
- RtsFlags.TraceFlags.user = rtsFalse;
+ RtsFlags.TraceFlags.timestamp = false;
+ RtsFlags.TraceFlags.scheduler = false;
+ RtsFlags.TraceFlags.gc = false;
+ RtsFlags.TraceFlags.sparks_sampled= false;
+ RtsFlags.TraceFlags.sparks_full = false;
+ RtsFlags.TraceFlags.user = false;
#endif
#ifdef PROFILING
@@ -217,16 +218,16 @@ void initRtsFlagsDefaults(void)
#endif
RtsFlags.ConcFlags.ctxtSwitchTime = USToTime(20000); // 20ms
- RtsFlags.MiscFlags.install_signal_handlers = rtsTrue;
- RtsFlags.MiscFlags.machineReadable = rtsFalse;
+ RtsFlags.MiscFlags.install_signal_handlers = true;
+ RtsFlags.MiscFlags.machineReadable = false;
RtsFlags.MiscFlags.linkerMemBase = 0;
#ifdef THREADED_RTS
RtsFlags.ParFlags.nCapabilities = 1;
- RtsFlags.ParFlags.migrate = rtsTrue;
+ RtsFlags.ParFlags.migrate = true;
RtsFlags.ParFlags.parGcEnabled = 1;
RtsFlags.ParFlags.parGcGen = 0;
- RtsFlags.ParFlags.parGcLoadBalancingEnabled = rtsTrue;
+ RtsFlags.ParFlags.parGcLoadBalancingEnabled = true;
RtsFlags.ParFlags.parGcLoadBalancingGen = ~0u; /* auto, based on -A */
RtsFlags.ParFlags.parGcNoSyncWithIdle = 0;
RtsFlags.ParFlags.parGcThreads = 0; /* defaults to -N */
@@ -238,7 +239,7 @@ void initRtsFlagsDefaults(void)
#endif /* THREADED_RTS */
#ifdef TICKY_TICKY
- RtsFlags.TickyFlags.showTickyStats = rtsFalse;
+ RtsFlags.TickyFlags.showTickyStats = false;
RtsFlags.TickyFlags.tickyFile = NULL;
#endif
}
@@ -433,7 +434,7 @@ usage_text[] = {
0
};
-STATIC_INLINE rtsBool strequal(const char *a, const char * b)
+STATIC_INLINE bool strequal(const char *a, const char * b)
{
return(strcmp(a, b) == 0);
}
@@ -639,7 +640,7 @@ static void checkUnsafe(RtsOptsEnabledEnum enabled)
static void procRtsOpts (int rts_argc0,
RtsOptsEnabledEnum rtsOptsEnabled)
{
- rtsBool error = rtsFalse;
+ bool error = false;
int arg;
int unchecked_arg_start;
@@ -659,16 +660,16 @@ static void procRtsOpts (int rts_argc0,
either OPTION_SAFE or OPTION_UNSAFE. To make sure we cover
every branch we use an option_checked flag which is reset
at the start each iteration and checked at the end. */
- rtsBool option_checked = rtsFalse;
+ bool option_checked = false;
// See Note [OPTION_SAFE vs OPTION_UNSAFE].
-#define OPTION_SAFE option_checked = rtsTrue;
-#define OPTION_UNSAFE checkUnsafe(rtsOptsEnabled); option_checked = rtsTrue;
+#define OPTION_SAFE option_checked = true;
+#define OPTION_UNSAFE checkUnsafe(rtsOptsEnabled); option_checked = true;
if (rts_argv[arg][0] != '-') {
fflush(stdout);
errorBelch("unexpected RTS argument: %s", rts_argv[arg]);
- error = rtsTrue;
+ error = true;
} else {
/* 0 is dash, 1 is first letter */
@@ -689,7 +690,7 @@ static void procRtsOpts (int rts_argc0,
# define TICKY_BUILD_ONLY(x) \
errorBelch("the flag %s requires the program to be built with -ticky", \
rts_argv[arg]); \
-error = rtsTrue;
+error = true;
#endif
#ifdef PROFILING
@@ -698,7 +699,7 @@ error = rtsTrue;
# define PROFILING_BUILD_ONLY(x) \
errorBelch("the flag %s requires the program to be built with -prof", \
rts_argv[arg]); \
-error = rtsTrue;
+error = true;
#endif
#ifdef TRACING
@@ -707,7 +708,7 @@ error = rtsTrue;
# define TRACING_BUILD_ONLY(x) \
errorBelch("the flag %s requires the program to be built with -eventlog or -debug", \
rts_argv[arg]); \
-error = rtsTrue;
+error = true;
#endif
#ifdef THREADED_RTS
@@ -716,7 +717,7 @@ error = rtsTrue;
# define THREADED_BUILD_ONLY(x) \
errorBelch("the flag %s requires the program to be built with -threaded", \
rts_argv[arg]); \
-error = rtsTrue;
+error = true;
#endif
#ifdef DEBUG
@@ -725,13 +726,13 @@ error = rtsTrue;
# define DEBUG_BUILD_ONLY(x) \
errorBelch("the flag %s requires the program to be built with -debug", \
rts_argv[arg]); \
-error = rtsTrue;
+error = true;
#endif
/* =========== GENERAL ========================== */
case '?':
OPTION_SAFE;
- error = rtsTrue;
+ error = true;
break;
/* This isn't going to allow us to keep related options
@@ -741,17 +742,17 @@ error = rtsTrue;
if (strequal("install-signal-handlers=yes",
&rts_argv[arg][2])) {
OPTION_UNSAFE;
- RtsFlags.MiscFlags.install_signal_handlers = rtsTrue;
+ RtsFlags.MiscFlags.install_signal_handlers = true;
}
else if (strequal("install-signal-handlers=no",
&rts_argv[arg][2])) {
OPTION_UNSAFE;
- RtsFlags.MiscFlags.install_signal_handlers = rtsFalse;
+ RtsFlags.MiscFlags.install_signal_handlers = false;
}
else if (strequal("machine-readable",
&rts_argv[arg][2])) {
OPTION_UNSAFE;
- RtsFlags.MiscFlags.machineReadable = rtsTrue;
+ RtsFlags.MiscFlags.machineReadable = true;
}
else if (strequal("info",
&rts_argv[arg][2])) {
@@ -772,11 +773,11 @@ error = rtsTrue;
if (!osNumaAvailable()) {
errorBelch("%s: OS reports NUMA is not available",
rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
- RtsFlags.GcFlags.numa = rtsTrue;
+ RtsFlags.GcFlags.numa = true;
RtsFlags.GcFlags.numaMask = mask;
}
#endif
@@ -791,16 +792,16 @@ error = rtsTrue;
} else {
errorBelch("%s: missing number of nodes",
rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
if (nNodes > MAX_NUMA_NODES) {
errorBelch("%s: Too many NUMA nodes (max %d)",
rts_argv[arg], MAX_NUMA_NODES);
- error = rtsTrue;
+ error = true;
} else {
- RtsFlags.GcFlags.numa = rtsTrue;
- RtsFlags.DebugFlags.numa = rtsTrue;
+ RtsFlags.GcFlags.numa = true;
+ RtsFlags.DebugFlags.numa = true;
RtsFlags.GcFlags.numaMask = (1<<nNodes) - 1;
}
}
@@ -808,7 +809,7 @@ error = rtsTrue;
else {
OPTION_SAFE;
errorBelch("unknown RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
}
break;
case 'A':
@@ -834,7 +835,7 @@ error = rtsTrue;
case 'B':
OPTION_UNSAFE;
- RtsFlags.GcFlags.ringBell = rtsTrue;
+ RtsFlags.GcFlags.ringBell = true;
unchecked_arg_start++;
goto check_rest;
@@ -844,13 +845,13 @@ error = rtsTrue;
RtsFlags.GcFlags.compactThreshold =
atof(rts_argv[arg]+2);
} else {
- RtsFlags.GcFlags.compact = rtsTrue;
+ RtsFlags.GcFlags.compact = true;
}
break;
case 'w':
OPTION_UNSAFE;
- RtsFlags.GcFlags.sweep = rtsTrue;
+ RtsFlags.GcFlags.sweep = true;
unchecked_arg_start++;
goto check_rest;
@@ -924,7 +925,7 @@ error = rtsTrue;
if (nCapabilities <= 0) {
errorBelch("bad value for -maxN");
- error = rtsTrue;
+ error = true;
}
#if defined(PROFILING)
RtsFlags.ParFlags.nCapabilities = 1;
@@ -958,7 +959,7 @@ error = rtsTrue;
case 'H':
OPTION_UNSAFE;
if (rts_argv[arg][2] == '\0') {
- RtsFlags.GcFlags.heapSizeSuggestionAuto = rtsTrue;
+ RtsFlags.GcFlags.heapSizeSuggestionAuto = true;
} else {
RtsFlags.GcFlags.heapSizeSuggestion = (uint32_t)
(decodeSize(rts_argv[arg], 2, BLOCK_SIZE, HS_WORD_MAX)
@@ -981,9 +982,9 @@ error = rtsTrue;
} else {
Time t = fsecondsToTime(atof(rts_argv[arg]+2));
if (t == 0) {
- RtsFlags.GcFlags.doIdleGC = rtsFalse;
+ RtsFlags.GcFlags.doIdleGC = false;
} else {
- RtsFlags.GcFlags.doIdleGC = rtsTrue;
+ RtsFlags.GcFlags.doIdleGC = true;
RtsFlags.GcFlags.idleGCDelayTime = t;
}
}
@@ -1018,13 +1019,13 @@ error = rtsTrue;
}
r = openStatsFile(rts_argv[arg]+2, NULL,
&RtsFlags.GcFlags.statsFile);
- if (r == -1) { error = rtsTrue; }
+ if (r == -1) { error = true; }
}
break;
case 'Z':
OPTION_UNSAFE;
- RtsFlags.GcFlags.squeezeUpdFrames = rtsFalse;
+ RtsFlags.GcFlags.squeezeUpdFrames = false;
unchecked_arg_start++;
goto check_rest;
@@ -1041,7 +1042,7 @@ error = rtsTrue;
errorBelch("flag -Pa given an argument"
" when none was expected: %s"
,rts_argv[arg]);
- error = rtsTrue;
+ error = true;
}
break;
case '\0':
@@ -1143,7 +1144,7 @@ error = rtsTrue;
if (nCapabilities <= 0) {
errorBelch("bad value for -N");
- error = rtsTrue;
+ error = true;
}
if (rtsOptsEnabled == RtsOptsSafeOnly &&
nCapabilities > (int)getNumberOfProcessors()) {
@@ -1160,11 +1161,11 @@ error = rtsTrue;
switch (rts_argv[arg][2]) {
case '1':
// backwards compat only
- RtsFlags.ParFlags.parGcEnabled = rtsFalse;
+ RtsFlags.ParFlags.parGcEnabled = false;
break;
default:
errorBelch("unknown RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
) break;
@@ -1175,13 +1176,13 @@ error = rtsTrue;
switch (rts_argv[arg][2]) {
case '\0':
errorBelch("incomplete RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
case 'g':
if (rts_argv[arg][3] == '\0') {
- RtsFlags.ParFlags.parGcEnabled = rtsFalse;
+ RtsFlags.ParFlags.parGcEnabled = false;
} else {
- RtsFlags.ParFlags.parGcEnabled = rtsTrue;
+ RtsFlags.ParFlags.parGcEnabled = true;
RtsFlags.ParFlags.parGcGen
= strtol(rts_argv[arg]+3, (char **) NULL, 10);
}
@@ -1189,11 +1190,11 @@ error = rtsTrue;
case 'b':
if (rts_argv[arg][3] == '\0') {
RtsFlags.ParFlags.parGcLoadBalancingEnabled =
- rtsFalse;
+ false;
}
else {
RtsFlags.ParFlags.parGcLoadBalancingEnabled =
- rtsTrue;
+ true;
RtsFlags.ParFlags.parGcLoadBalancingGen
= strtol(rts_argv[arg]+3, (char **) NULL, 10);
}
@@ -1207,24 +1208,24 @@ error = rtsTrue;
threads = strtol(rts_argv[arg]+3, (char **) NULL, 10);
if (threads <= 0) {
errorBelch("-qn must be 1 or greater");
- error = rtsTrue;
+ error = true;
} else {
RtsFlags.ParFlags.parGcThreads = threads;
}
break;
}
case 'a':
- RtsFlags.ParFlags.setAffinity = rtsTrue;
+ RtsFlags.ParFlags.setAffinity = true;
break;
case 'm':
- RtsFlags.ParFlags.migrate = rtsFalse;
+ RtsFlags.ParFlags.migrate = false;
break;
case 'w':
// -qw was removed; accepted for backwards compat
break;
default:
errorBelch("unknown RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
) break;
@@ -1238,7 +1239,7 @@ error = rtsTrue;
= strtol(rts_argv[arg]+2, (char **) NULL, 10);
if (RtsFlags.ParFlags.maxLocalSparks <= 0) {
errorBelch("bad value for -e");
- error = rtsTrue;
+ error = true;
}
}
) break;
@@ -1249,7 +1250,7 @@ error = rtsTrue;
OPTION_SAFE;
TICKY_BUILD_ONLY(
- RtsFlags.TickyFlags.showTickyStats = rtsTrue;
+ RtsFlags.TickyFlags.showTickyStats = true;
{
int r;
@@ -1259,7 +1260,7 @@ error = rtsTrue;
r = openStatsFile(rts_argv[arg]+2,
TICKY_FILENAME_FMT,
&RtsFlags.TickyFlags.tickyFile);
- if (r == -1) { error = rtsTrue; }
+ if (r == -1) { error = true; }
}
) break;
@@ -1289,7 +1290,7 @@ error = rtsTrue;
case '\0':
OPTION_SAFE;
errorBelch("incomplete RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
case 'b': /* heapBase in hex; undocumented */
@@ -1299,7 +1300,7 @@ error = rtsTrue;
= strToStgWord(rts_argv[arg]+3, (char **) NULL, 0);
} else {
errorBelch("-xb: requires argument");
- error = rtsTrue;
+ error = true;
}
break;
@@ -1311,7 +1312,7 @@ error = rtsTrue;
= strtol(rts_argv[arg]+3, (char **) NULL, 16);
if (RtsFlags.MiscFlags.linkerMemBase > 0x80000000) {
errorBelch("-xm: value must be <80000000");
- error = rtsTrue;
+ error = true;
}
} else {
RtsFlags.MiscFlags.linkerMemBase = 0;
@@ -1323,7 +1324,7 @@ error = rtsTrue;
an exception */
OPTION_SAFE;
PROFILING_BUILD_ONLY(
- RtsFlags.ProfFlags.showCCSOnException = rtsTrue;
+ RtsFlags.ProfFlags.showCCSOnException = true;
);
unchecked_arg_start++;
goto check_rest;
@@ -1331,7 +1332,7 @@ error = rtsTrue;
case 't': /* Include memory used by TSOs in a heap profile */
OPTION_SAFE;
PROFILING_BUILD_ONLY(
- RtsFlags.ProfFlags.includeTSOs = rtsTrue;
+ RtsFlags.ProfFlags.includeTSOs = true;
);
unchecked_arg_start++;
goto check_rest;
@@ -1351,7 +1352,7 @@ error = rtsTrue;
default:
OPTION_SAFE;
errorBelch("unknown RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
break; /* defensive programming */
@@ -1367,7 +1368,7 @@ error = rtsTrue;
errorBelch("flag -%c given an argument"
" when none was expected: %s",
rts_argv[arg][1],rts_argv[arg]);
- error = rtsTrue;
+ error = true;
}
break;
}
@@ -1376,7 +1377,7 @@ error = rtsTrue;
default:
OPTION_SAFE;
errorBelch("unknown RTS option: %s",rts_argv[arg]);
- error = rtsTrue;
+ error = true;
break;
}
@@ -1619,49 +1620,49 @@ static void read_debug_flags(const char* arg)
for (c = arg + 2; *c != '\0'; c++) {
switch (*c) {
case 's':
- RtsFlags.DebugFlags.scheduler = rtsTrue;
+ RtsFlags.DebugFlags.scheduler = true;
break;
case 'i':
- RtsFlags.DebugFlags.interpreter = rtsTrue;
+ RtsFlags.DebugFlags.interpreter = true;
break;
case 'w':
- RtsFlags.DebugFlags.weak = rtsTrue;
+ RtsFlags.DebugFlags.weak = true;
break;
case 'G':
- RtsFlags.DebugFlags.gccafs = rtsTrue;
+ RtsFlags.DebugFlags.gccafs = true;
break;
case 'g':
- RtsFlags.DebugFlags.gc = rtsTrue;
+ RtsFlags.DebugFlags.gc = true;
break;
case 'b':
- RtsFlags.DebugFlags.block_alloc = rtsTrue;
+ RtsFlags.DebugFlags.block_alloc = true;
break;
case 'S':
- RtsFlags.DebugFlags.sanity = rtsTrue;
+ RtsFlags.DebugFlags.sanity = true;
break;
case 't':
- RtsFlags.DebugFlags.stable = rtsTrue;
+ RtsFlags.DebugFlags.stable = true;
break;
case 'p':
- RtsFlags.DebugFlags.prof = rtsTrue;
+ RtsFlags.DebugFlags.prof = true;
break;
case 'l':
- RtsFlags.DebugFlags.linker = rtsTrue;
+ RtsFlags.DebugFlags.linker = true;
break;
case 'a':
- RtsFlags.DebugFlags.apply = rtsTrue;
+ RtsFlags.DebugFlags.apply = true;
break;
case 'm':
- RtsFlags.DebugFlags.stm = rtsTrue;
+ RtsFlags.DebugFlags.stm = true;
break;
case 'z':
- RtsFlags.DebugFlags.squeeze = rtsTrue;
+ RtsFlags.DebugFlags.squeeze = true;
break;
case 'c':
- RtsFlags.DebugFlags.hpc = rtsTrue;
+ RtsFlags.DebugFlags.hpc = true;
break;
case 'r':
- RtsFlags.DebugFlags.sparks = rtsTrue;
+ RtsFlags.DebugFlags.sparks = true;
break;
default:
bad_option( arg );
@@ -1675,11 +1676,11 @@ static void read_debug_flags(const char* arg)
#ifdef PROFILING
// Parse a "-h" flag, returning whether the parse resulted in an error.
-static rtsBool read_heap_profiling_flag(const char *arg)
+static bool read_heap_profiling_flag(const char *arg)
{
// Already parsed "-h"
- rtsBool error = rtsFalse;
+ bool error = false;
switch (arg[2]) {
case '\0':
case 'C':
@@ -1747,7 +1748,7 @@ static rtsBool read_heap_profiling_flag(const char *arg)
if (RtsFlags.ProfFlags.doHeapProfile != 0) {
errorBelch("multiple heap profile options");
- error = rtsTrue;
+ error = true;
break;
}
@@ -1782,7 +1783,7 @@ static rtsBool read_heap_profiling_flag(const char *arg)
default:
errorBelch("invalid heap profile option: %s", arg);
- error = rtsTrue;
+ error = true;
}
return error;
@@ -1793,7 +1794,7 @@ static rtsBool read_heap_profiling_flag(const char *arg)
static void read_trace_flags(const char *arg)
{
const char *c;
- rtsBool enabled = rtsTrue;
+ bool enabled = true;
/* Syntax for tracing flags currently looks like:
*
* -l To turn on eventlog tracing with default trace classes
@@ -1813,17 +1814,17 @@ static void read_trace_flags(const char *arg)
* Similarly, in future we might default to slightly less verbose
* scheduler or GC tracing.
*/
- RtsFlags.TraceFlags.scheduler = rtsTrue;
- RtsFlags.TraceFlags.gc = rtsTrue;
- RtsFlags.TraceFlags.sparks_sampled = rtsTrue;
- RtsFlags.TraceFlags.user = rtsTrue;
+ RtsFlags.TraceFlags.scheduler = true;
+ RtsFlags.TraceFlags.gc = true;
+ RtsFlags.TraceFlags.sparks_sampled = true;
+ RtsFlags.TraceFlags.user = true;
for (c = arg; *c != '\0'; c++) {
switch(*c) {
case '\0':
break;
case '-':
- enabled = rtsFalse;
+ enabled = false;
break;
case 'a':
RtsFlags.TraceFlags.scheduler = enabled;
@@ -1831,32 +1832,32 @@ static void read_trace_flags(const char *arg)
RtsFlags.TraceFlags.sparks_sampled = enabled;
RtsFlags.TraceFlags.sparks_full = enabled;
RtsFlags.TraceFlags.user = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 's':
RtsFlags.TraceFlags.scheduler = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 'p':
RtsFlags.TraceFlags.sparks_sampled = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 'f':
RtsFlags.TraceFlags.sparks_full = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 't':
RtsFlags.TraceFlags.timestamp = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 'g':
RtsFlags.TraceFlags.gc = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
case 'u':
RtsFlags.TraceFlags.user = enabled;
- enabled = rtsTrue;
+ enabled = true;
break;
default:
errorBelch("unknown trace option: %c",*c);