/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.18 1999/09/13 08:14:51 simonmar Exp $
+ * $Id: RtsFlags.c,v 1.20 1999/11/02 15:06:00 simonmar Exp $
*
* (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
#endif
RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */
+#ifdef SMP
+ RtsFlags.ConcFlags.nNodes = 1;
+#endif
#ifdef PAR
RtsFlags.ParFlags.parallelStats = rtsFalse;
RtsFlags.ParFlags.granSimStats = rtsFalse;
# if defined(PROFILING)
"",
" -h<break-down> Heap residency profile (output file <program>.hp)",
-" break-down: C = cost centre (default), M = module, G = group",
+" break-down: C = cost centre stack (default), M = module, G = group",
" D = closure description, Y = type description",
" T<ints>,<start> = time closure created",
" ints: no. of interval bands plotted (default 18)",
" -C<secs> Context-switch interval in seconds",
" (0 or no argument means switch as often as possible)",
" the default is .01 sec; resolution is .01 sec",
+# ifdef SMP
+" -N<n> Use <n> OS threads (default: 1)",
+# endif
# ifdef PAR
" -q Enable activity profile (output files in ~/<program>*.gr)",
" -qb Enable binary activity profile (output file /tmp/<program>.gb)",
switch (rts_argv[arg][2]) {
case '\0':
case CCchar:
- RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_CC;
+ RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_CCS;
break;
case MODchar:
RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_MOD;
}
break;
+#ifdef SMP
+ case 'N':
+ if (rts_argv[arg][2] != '\0') {
+ RtsFlags.ConcFlags.nNodes
+ = strtol(rts_argv[arg]+2, (char **) NULL, 10);
+ if (RtsFlags.ConcFlags.nNodes <= 0) {
+ fprintf(stderr, "setupRtsFlags: bad value for -N\n");
+ error = rtsTrue;
+ }
+ }
+ break;
+#endif
/* =========== PARALLEL =========================== */
case 'e':
PAR_BUILD_ONLY(