/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.13 1999/05/11 16:47:55 keithw 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
#include "BlockAlloc.h"
#include "ProfRts.h"
+#if defined(PROFILING)
+#include "Itimer.h"
+#endif
+
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
RtsFlags.ProfFlags.doHeapProfile = rtsFalse;
#endif
-/* there really shouldn't be a threads limit for concurrent mandatory threads.
- For now, unlimitied means less than 64k (there's a storage overhead) -- SOF
-*/
-#if defined(CONCURRENT) && !defined(GRAN)
- RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */
- RtsFlags.ConcFlags.maxThreads = 65536;
- RtsFlags.ConcFlags.stkChunkSize = 1024;
- RtsFlags.ConcFlags.maxLocalSparks = 65536;
-#endif /* CONCURRENT only */
-
-#if GRAN
RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */
- RtsFlags.ConcFlags.maxThreads = 32;
- RtsFlags.ConcFlags.stkChunkSize = 1024;
- RtsFlags.ConcFlags.maxLocalSparks = 500;
-#endif /* GRAN */
-
+#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",
-" -e<size> Size of spark pools (default 100)",
+# 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)",
" -Q<size> Set pack-buffer size (default: 1024)",
-# else
-" -q[v] Enable quasi-parallel profile (output file <program>.qp)",
# endif
-" -t<num> Set maximum number of advisory threads per PE (default 32)",
-" -o<num> Set stack chunk size (default 1024)",
# ifdef PAR
" -d Turn on PVM-ish debugging",
" -O Disable output for performance measurement",
}
break;
- case 'S': /* NB: no difference at present ! */
+ case 'S':
+ RtsFlags.GcFlags.giveStats ++;
+
case 's':
- RtsFlags.GcFlags.giveStats ++; /* will be VERBOSE_GC_STATS */
+ RtsFlags.GcFlags.giveStats ++;
#ifdef PAR
/* Opening all those files would almost certainly fail... */
RtsFlags.ParFlags.parallelStats = rtsTrue;
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;
- case 't':
+#ifdef SMP
+ case 'N':
if (rts_argv[arg][2] != '\0') {
- RtsFlags.ConcFlags.maxThreads
+ RtsFlags.ConcFlags.nNodes
= strtol(rts_argv[arg]+2, (char **) NULL, 10);
- } else {
- fprintf(stderr, "setupRtsFlags: missing size for -t\n");
- error = rtsTrue;
- }
+ if (RtsFlags.ConcFlags.nNodes <= 0) {
+ fprintf(stderr, "setupRtsFlags: bad value for -N\n");
+ error = rtsTrue;
+ }
+ }
break;
-
+#endif
/* =========== PARALLEL =========================== */
case 'e':
PAR_BUILD_ONLY(