X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fruntime%2Fgum%2FParInit.lc;fp=ghc%2Fruntime%2Fgum%2FParInit.lc;h=780c676e80f5f0ff7f54015712dba24d360b550e;hb=10521d8418fd3a1cf32882718b5bd28992db36fd;hp=d1e29c0b980079f2ceea8236b7da00e794d325d4;hpb=7fa716e248a1f11fa686965f57aebbb83b74fa7b;p=ghc-hetmet.git diff --git a/ghc/runtime/gum/ParInit.lc b/ghc/runtime/gum/ParInit.lc index d1e29c0..780c676 100644 --- a/ghc/runtime/gum/ParInit.lc +++ b/ghc/runtime/gum/ParInit.lc @@ -49,13 +49,11 @@ Flag handling. \begin{code} rtsBool TraceSparks = rtsFalse; /* Enable the spark trace mode */ -rtsBool OutputDisabled = rtsFalse; /* Disable output for performance purposes */ rtsBool SparkLocally = rtsFalse; /* Use local threads if possible */ rtsBool DelaySparks = rtsFalse; /* Use delayed sparking */ rtsBool LocalSparkStrategy = rtsFalse; /* Either delayed threads or local threads */ rtsBool GlobalSparkStrategy = rtsFalse; /* Export all threads */ -rtsBool ParallelStats = rtsFalse; /* Gather parallel statistics */ rtsBool DeferGlobalUpdates = rtsFalse; /* Defer updating of global nodes */ rtsBool fishing = rtsFalse; /* We have no fish out in the stream */ \end{code} @@ -71,10 +69,9 @@ StgPtr program_closure; return; /* Show that we've started */ - if (IAmMainThread && !OutputDisabled) + if (IAmMainThread && ! RTSflags.ParFlags.outputDisabled) fprintf(stderr, "Starting main program...\n"); - /* Record the start time for statistics purposes. */ main_start_time = usertime(); /* fprintf(stderr, "Start time is %u\n", main_start_time); */ @@ -108,7 +105,7 @@ I_ n; else WaitForPEOp(PP_FINISH, SysManTask); PEShutDown(); - fprintf(stderr,"Processor %lx shutting down, %ld Threads run\n", mytid, threadId); + fprintf(stderr,"PE %lx shutting down, %ld Threads run, %ld Sparks Ignored\n", (W_) mytid, threadId, sparksIgnored); /* And actually terminate -- always with code 0 */ longjmp(exit_parallel_system, 1); @@ -122,17 +119,18 @@ time_t time PROTO((time_t *)); void initParallelSystem(STG_NO_ARGS) { - - /* Don't buffer standard channels... */ - setbuf(stdout,NULL); - setbuf(stderr,NULL); - - srand48(time(NULL) * getpid()); /*Initialise Random-number generator seed*/ - - OkToGC = rtsFalse; /* Must not GC till we have set up the environment */ - /* because C is hanging onto heap pointers */ - /* maybe bogus for the new RTS? -- KH */ - /* And for the GUM system? PWT */ + /* Don't buffer standard channels... */ + setbuf(stdout,NULL); + setbuf(stderr,NULL); + + srand48(time(NULL) * getpid()); /*Initialise Random-number generator seed*/ + + OkToGC = rtsFalse; /* Must not GC till we have set up the environment */ + /* because C is hanging onto heap pointers */ + /* maybe bogus for the new RTS? -- KH */ + /* And for the GUM system? PWT */ + InitPackBuffer(); + InitMoreBuffers(); } \end{code}