RtsFlags.TraceFlags.sparks_sampled= false;
RtsFlags.TraceFlags.sparks_full = false;
RtsFlags.TraceFlags.user = false;
+ RtsFlags.TraceFlags.trace_output = NULL;
#endif
#if defined(PROFILING)
RtsFlags.MiscFlags.generate_dump_file = false;
RtsFlags.MiscFlags.machineReadable = false;
RtsFlags.MiscFlags.internalCounters = false;
+ RtsFlags.MiscFlags.linkerAlwaysPic = DEFAULT_LINKER_ALWAYS_PIC;
RtsFlags.MiscFlags.linkerMemBase = 0;
#if defined(THREADED_RTS)
" -A<size> Sets the minimum allocation area size (default 1m) Egs: -A20m -A10k",
" -AL<size> Sets the amount of large-object memory that can be allocated",
" before a GC is triggered (default: the value of -A)",
+" -F<n> Sets the collecting threshold for old generations as a factor of",
+" the live data in that generation the last time it was collected",
+" (default: 2.0)",
" -n<size> Allocation area chunk size (0 = disabled, default: 0)",
" -O<size> Sets the minimum size of the old generation (default 1M)",
" -M<size> Sets the maximum heap size (default unlimited) Egs: -M256k -M1G",
" -Pa Give information about *all* cost centres in tree format",
" -pj Output cost-center profile in JSON format",
"",
+" -h Heap residency profile, by cost centre stack",
" -h<break-down> Heap residency profile (hp2ps) (output file <program>.hp)",
" break-down: c = cost centre stack (default)",
" m = module",
+" T = closure type",
" d = closure description",
" y = type description",
" r = retainer",
" -xt Include threads (TSOs) in a heap profile",
"",
" -xc Show current cost centre stack on raising an exception",
-#else
-"",
-" -hT Produce a heap profile grouped by closure type"
+#else /* PROFILING */
+" -h Heap residency profile (output file <program>.hp)",
+" -hT Produce a heap profile grouped by closure type",
#endif /* PROFILING */
#if defined(TRACING)
"",
-" -l[flags] Log events in binary format to the file <program>.eventlog",
+" -ol<file> Send binary eventlog to <file> (default: <program>.eventlog)",
+" -l[flags] Log events to a file",
# if defined(DEBUG)
" -v[flags] Log events to stderr",
# endif
" the initial enabled event classes are 'sgpu'",
#endif
-#if !defined(PROFILING)
-"",
-" -h Heap residency profile (output file <program>.hp)",
-#endif
" -i<sec> Time between heap profile samples (seconds, default: 0.1)",
"",
#if defined(TICKY_TICKY)
" -qg[<n>] Use parallel GC only for generations >= <n>",
" (default: 0, -qg alone turns off parallel GC)",
" -qb[<n>] Use load-balancing in the parallel GC only for generations >= <n>",
-" (default: 1 for -A < 32M, 0 otherwise;"
+" (default: 1 for -A < 32M, 0 otherwise;",
" -qb alone turns off load-balancing)",
" -qn<n> Use <n> threads for parallel GC (defaults to value of -N)",
" -qa Use the OS to set thread affinity (experimental)",
" -e<n> Maximum number of outstanding local sparks (default: 4096)",
#endif
#if defined(x86_64_HOST_ARCH)
+#if !DEFAULT_LINKER_ALWAYS_PIC
+" -xp Assume that all object files were compiled with -fPIC",
+" -fexternal-dynamic-refs and load them anywhere in the address",
+" space",
+#endif
" -xm Base address to mmap memory in the GHCi linker",
" (hex; must be <80000000)",
#endif
} else {
/* 0 is dash, 1 is first letter */
- /* see Trac #9839 */
+ /* see #9839 */
unchecked_arg_start = 1;
switch(rts_argv[arg][1]) {
else if (strequal("info",
&rts_argv[arg][2])) {
OPTION_SAFE;
- printRtsInfo();
+ printRtsInfo(rtsConfig);
stg_exit(0);
}
#if defined(THREADED_RTS)
else if (!strncmp("numa", &rts_argv[arg][2], 4)) {
+ if (!osBuiltWithNumaSupport()) {
+ errorBelch("%s: This GHC build was compiled without NUMA support.",
+ rts_argv[arg]);
+ error = true;
+ break;
+ }
OPTION_SAFE;
StgWord mask;
if (rts_argv[arg][6] == '=') {
}
) break;
- /* =========== TRACING ---------=================== */
+ /* =========== OUTPUT ============================ */
+
+ case 'o':
+ switch(rts_argv[arg][2]) {
+ case 'l':
+ OPTION_SAFE;
+ TRACING_BUILD_ONLY(
+ if (strlen(&rts_argv[arg][3]) == 0) {
+ errorBelch("-ol expects filename");
+ error = true;
+ } else {
+ RtsFlags.TraceFlags.trace_output =
+ strdup(&rts_argv[arg][3]);
+ }
+ );
+ break;
+
+ default:
+ errorBelch("Unknown output flag -o%c", rts_argv[arg][2]);
+ error = true;
+ }
+ break;
+
+ /* =========== TRACING ============================ */
case 'l':
OPTION_SAFE;
break;
#if defined(x86_64_HOST_ARCH)
+ case 'p': /* linkerAlwaysPic */
+ OPTION_UNSAFE;
+ RtsFlags.MiscFlags.linkerAlwaysPic = true;
+ break;
+
case 'm': /* linkerMemBase */
OPTION_UNSAFE;
if (rts_argv[arg][3] != '\0') {
break; /* defensive programming */
/* check the rest to be sure there is nothing afterwards.*/
- /* see Trac #9839 */
+ /* see #9839 */
check_rest:
{
/* start checking from the first unchecked position,
* not from index 2*/
- /* see Trac #9839 */
+ /* see #9839 */
if (rts_argv[arg][unchecked_arg_start] != '\0') {
errorBelch("flag -%c given an argument"
" when none was expected: %s",
// If allocation area is larger that CPU cache
// we can finish scanning quicker doing work-stealing
- // scan. Trac #9221
+ // scan. #9221
// 32M looks big enough not to fit into L2 cache
// of popular modern CPUs.
if (alloc_area_bytes >= 32 * 1024 * 1024) {
case 'r':
case 'B':
case 'b':
+ case 'T':
if (arg[2] != '\0' && arg[3] != '\0') {
{
const char *left = strchr(arg, '{');
case 'b':
RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_LDV;
break;
+ case 'T':
+ RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_CLOSURE_TYPE;
+ break;
}
break;