X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FRtsFlags.c;h=1cbd569d6bd84a22c34c3475de97e9feafe64d48;hp=497cd88aba87144015d0ad2818af6942e3c39df1;hb=11f6f411b4a15b333423715b41b498f5f7745933;hpb=cb90532723bd5801b8ac29973dd14e8e30b1e0a9 diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 497cd88..1cbd569 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -208,6 +208,7 @@ void initRtsFlagsDefaults(void) RtsFlags.ConcFlags.ctxtSwitchTime = 20; /* In milliseconds */ RtsFlags.MiscFlags.install_signal_handlers = rtsTrue; + RtsFlags.MiscFlags.linkerMemBase = 0; #ifdef THREADED_RTS RtsFlags.ParFlags.nNodes = 1; @@ -476,6 +477,10 @@ usage_text[] = { #if defined(GRAN) /* ToDo: fill in decent Docu here */ " -b... All GranSim options start with -b; see GranSim User's Guide for details", #endif +#if defined(x86_64_HOST_ARCH) +" -xm Base address to mmap memory in the GHCi linker", +" (hex; must be <80000000)", +#endif #if defined(USE_PAPI) " -aX CPU performance counter measurements using PAPI", " (use with the -s option). X is one of:", @@ -1259,7 +1264,22 @@ error = rtsTrue; } break; - case 'c': /* Debugging tool: show current cost centre on an exception */ +#if defined(x86_64_HOST_ARCH) + case 'm': /* linkerMemBase */ + if (rts_argv[arg][3] != '\0') { + RtsFlags.MiscFlags.linkerMemBase + = strtol(rts_argv[arg]+3, (char **) NULL, 16); + if (RtsFlags.MiscFlags.linkerMemBase > 0x80000000) { + errorBelch("-xm: value must be <80000000"); + error = rtsTrue; + } + } else { + RtsFlags.MiscFlags.linkerMemBase = 0; + } + break; +#endif + + case 'c': /* Debugging tool: show current cost centre on an exception */ PROFILING_BUILD_ONLY( RtsFlags.ProfFlags.showCCSOnException = rtsTrue; );