From: simonmar Date: Mon, 3 Apr 2000 15:54:50 +0000 (+0000) Subject: [project @ 2000-04-03 15:54:49 by simonmar] X-Git-Tag: Approximately_9120_patches~4854 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b9d8ddb91c9360e3165244520f31dcd28c396825;p=ghc-hetmet.git [project @ 2000-04-03 15:54:49 by simonmar] misc profiling cleanups --- diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 6fba25c..7a2266c 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.24 2000/03/14 01:54:06 sof Exp $ + * $Id: Stg.h,v 1.25 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -109,7 +109,7 @@ void _stgAssert (char *, unsigned int); #include "Constants.h" /* Profiling information */ -#include "Profiling.h" +#include "StgProf.h" /* Storage format definitions */ #include "Closures.h" @@ -163,7 +163,6 @@ void _stgAssert (char *, unsigned int); #include "ClosureMacros.h" #include "InfoMacros.h" #include "StgMacros.h" -#include "StgProf.h" #include "PrimOps.h" #include "Updates.h" #include "StgTicky.h" diff --git a/ghc/includes/StgProf.h b/ghc/includes/StgProf.h index 8eeaa5c..b2783ef 100644 --- a/ghc/includes/StgProf.h +++ b/ghc/includes/StgProf.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgProf.h,v 1.8 2000/03/08 17:48:26 simonmar Exp $ + * $Id: StgProf.h,v 1.9 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998 * @@ -9,8 +9,124 @@ #ifndef STGPROF_H #define STGPROF_H -#if defined(PROFILING) +#if !defined(PROFILING) +#define CCS_ALLOC(ccs, amount) doNothing() +#define ENTER_CC_PAP_CL(r) doNothing() +#define ENTER_CCS_PAP_CL(r) doNothing() + +#else /* PROFILING... */ + +/* ----------------------------------------------------------------------------- + * Constants + * ---------------------------------------------------------------------------*/ + +#define EMPTY_STACK NULL +#define EMPTY_TABLE NULL + +/* Constants used to set sumbsumed flag on CostCentres */ + +#define CC_IS_CAF 'c' /* 'c' => *is* a CAF cc */ +#define CC_IS_BORING 'B' /* 'B' => *not* a CAF/sub cc */ + +/* ----------------------------------------------------------------------------- + * Data Structures + * ---------------------------------------------------------------------------*/ +/* + * CostCentre + */ + +typedef struct _CostCentre { + int ccID; + + char *label; + char *module; + + /* used for accumulating costs at the end of the run... */ + unsigned long time_ticks; + unsigned long mem_alloc; + + char is_caf; + + struct _CostCentre *link; +} CostCentre; + + + +/* + * CostCentreStack + */ + +typedef struct _CostCentreStack { + int ccsID; + + CostCentre *cc; + struct _CostCentreStack *prevStack; + struct _IndexTable *indexTable; + + unsigned long scc_count; + unsigned long sub_scc_count; + unsigned long sub_cafcc_count; + + unsigned long time_ticks; + unsigned long mem_alloc; + unsigned long mem_resid; + + CostCentre *root; +} CostCentreStack; + + + +/* + * IndexTable + */ + +typedef struct _IndexTable { + CostCentre *cc; + CostCentreStack *ccs; + struct _IndexTable *next; + unsigned int back_edge; +} IndexTable; + + +/* ----------------------------------------------------------------------------- + Pre-defined cost centres and cost centre stacks + -------------------------------------------------------------------------- */ + +extern CostCentreStack *CCCS; /* current CCS */ + +extern CostCentre CC_MAIN[]; +extern CostCentreStack CCS_MAIN[]; /* Top CCS */ + +extern CostCentre CC_SYSTEM[]; +extern CostCentreStack CCS_SYSTEM[]; /* RTS costs */ + +extern CostCentre CC_GC[]; +extern CostCentreStack CCS_GC[]; /* Garbage collector costs */ + +extern CostCentre CC_SUBSUMED[]; +extern CostCentreStack CCS_SUBSUMED[]; /* Costs are subsumed by caller */ + +extern CostCentre CC_OVERHEAD[]; +extern CostCentreStack CCS_OVERHEAD[]; /* Profiling overhead */ + +extern CostCentre CC_DONT_CARE[]; +extern CostCentreStack CCS_DONT_CARE[]; /* shouldn't ever get set */ + +extern unsigned int CC_ID; /* global ids */ +extern unsigned int CCS_ID; +extern unsigned int HP_ID; + +/* ----------------------------------------------------------------------------- + * Functions + * ---------------------------------------------------------------------------*/ + +CostCentreStack *EnterFunCCS ( CostCentreStack *cccs, CostCentreStack *ccsfn ); +CostCentreStack *PushCostCentre ( CostCentreStack *, CostCentre * ); +CostCentreStack *AppendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ); + +extern unsigned int entering_PAP; + /* ----------------------------------------------------------------------------- * Registering CCs @@ -59,17 +175,17 @@ extern CostCentreStack *CCS_LIST; /* registered CCS list */ * Declaring Cost Centres & Cost Centre Stacks. * -------------------------------------------------------------------------- */ -# define CC_DECLARE(cc_ident,name,module,subsumed,is_local) \ +# define CC_DECLARE(cc_ident,name,module,caf,is_local) \ is_local CostCentre cc_ident[1] \ = {{ 0, \ name, \ module, \ 0, \ 0, \ - subsumed, \ + caf, \ 0 }}; -# define CCS_DECLARE(ccs_ident,cc_ident,subsumed,is_local) \ +# define CCS_DECLARE(ccs_ident,cc_ident,is_local) \ is_local CostCentreStack ccs_ident[1] \ = {{ ccsID : 0, \ cc : cc_ident, \ @@ -166,11 +282,6 @@ extern CostCentreStack *CCS_LIST; /* registered CCS list */ #define CCCS_DETAIL_COUNT(inc_this) /*nothing*/ #endif -#define IS_CAF_OR_SUB_CCS(ccs) \ - /* tests for lower case character */ \ - ((ccs)->is_subsumed & ' ') - - /* On entry to top level CAFs we count the scc ...*/ #define ENTER_CCS_CAF_X(ccs) \ diff --git a/ghc/rts/Itimer.c b/ghc/rts/Itimer.c index 73794f4..60e30e7 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/Itimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.c,v 1.12 2000/03/21 11:33:12 rrt Exp $ + * $Id: Itimer.c,v 1.13 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1995-1999 * @@ -24,6 +24,7 @@ #include "Rts.h" #include "Itimer.h" +#include "Proftimer.h" #include "Schedule.h" /* As recommended in the autoconf manual */ @@ -43,7 +44,6 @@ #endif lnat total_ticks = 0; -rtsBool do_prof_ticks = rtsFalse; static void @@ -73,9 +73,7 @@ handle_tick(int unused STG_UNUSED) total_ticks++; #ifdef PROFILING - if (do_prof_ticks == rtsTrue) { - CCS_TICK(CCCS); - } + handleProfTick(); #endif /* For threadDelay etc., see Select.c */ diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index c2d534f..cefdc42 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfHeap.c,v 1.9 2000/03/31 03:09:36 hwloidl Exp $ + * $Id: ProfHeap.c,v 1.10 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -18,11 +18,10 @@ #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" -#include "ProfRts.h" +#include "Profiling.h" #include "Storage.h" #include "ProfHeap.h" #include "Stats.h" -#include "ProfRts.h" #ifdef DEBUG_HEAP_PROF #include "Printer.h" static void initSymbolHash(void); @@ -286,7 +285,7 @@ fprint_ccs(FILE *fp, CostCentreStack *ccs, nat components) prev = ccs->prevStack; if (prev == NULL - || prev->cc->is_subsumed != CC_IS_BORING + || prev->cc->is_caf != CC_IS_BORING || components == 1) { fprintf(fp,"%s",cc->label); return; diff --git a/ghc/rts/Profiling.c b/ghc/rts/Profiling.c index 4baff3c..f9f50b1 100644 --- a/ghc/rts/Profiling.c +++ b/ghc/rts/Profiling.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Profiling.c,v 1.16 2000/03/08 17:48:24 simonmar Exp $ + * $Id: Profiling.c,v 1.17 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -12,7 +12,7 @@ #include "Rts.h" #include "RtsUtils.h" #include "RtsFlags.h" -#include "ProfRts.h" +#include "Profiling.h" #include "Storage.h" #include "Proftimer.h" #include "Itimer.h" @@ -81,25 +81,26 @@ CostCentreStack *CCS_LIST; * SUBSUMED is the one-and-only CCS placed on top-level functions. * It indicates that all costs are to be attributed to the * enclosing cost centre stack. SUBSUMED never accumulates - * any costs. + * any costs. The is_caf flag is set on the subsumed cost + * centre. * * DONT_CARE is a placeholder cost-centre we assign to static * constructors. It should *never* accumulate any costs. */ -CC_DECLARE(CC_MAIN, "MAIN", "MAIN", CC_IS_BORING,); -CC_DECLARE(CC_SYSTEM, "SYSTEM", "MAIN", CC_IS_BORING,); -CC_DECLARE(CC_GC, "GC", "GC", CC_IS_BORING,); -CC_DECLARE(CC_OVERHEAD, "OVERHEAD_of", "PROFILING", CC_IS_CAF,); -CC_DECLARE(CC_SUBSUMED, "SUBSUMED", "MAIN", CC_IS_SUBSUMED,); -CC_DECLARE(CC_DONTZuCARE,"DONT_CARE", "MAIN", CC_IS_BORING,); +CC_DECLARE(CC_MAIN, "MAIN", "MAIN", CC_IS_BORING, ); +CC_DECLARE(CC_SYSTEM, "SYSTEM", "MAIN", CC_IS_BORING, ); +CC_DECLARE(CC_GC, "GC", "GC", CC_IS_BORING, ); +CC_DECLARE(CC_OVERHEAD, "OVERHEAD_of", "PROFILING", CC_IS_CAF, ); +CC_DECLARE(CC_SUBSUMED, "SUBSUMED", "MAIN", CC_IS_CAF, ); +CC_DECLARE(CC_DONT_CARE, "DONT_CARE", "MAIN", CC_IS_BORING, ); -CCS_DECLARE(CCS_MAIN, CC_MAIN, CC_IS_BORING, ); -CCS_DECLARE(CCS_SYSTEM, CC_SYSTEM, CC_IS_BORING, ); -CCS_DECLARE(CCS_GC, CC_GC, CC_IS_BORING, ); -CCS_DECLARE(CCS_OVERHEAD, CC_OVERHEAD, CC_IS_CAF, ); -CCS_DECLARE(CCS_SUBSUMED, CC_SUBSUMED, CC_IS_SUBSUMED, ); -CCS_DECLARE(CCS_DONTZuCARE, CC_DONTZuCARE, CC_IS_BORING, ); +CCS_DECLARE(CCS_MAIN, CC_MAIN, ); +CCS_DECLARE(CCS_SYSTEM, CC_SYSTEM, ); +CCS_DECLARE(CCS_GC, CC_GC, ); +CCS_DECLARE(CCS_OVERHEAD, CC_OVERHEAD, ); +CCS_DECLARE(CCS_SUBSUMED, CC_SUBSUMED, ); +CCS_DECLARE(CCS_DONT_CARE, CC_DONT_CARE, ); /* * Uniques for the XML log-file format @@ -166,13 +167,13 @@ initProfiling1 (void) REGISTER_CC(CC_GC); REGISTER_CC(CC_OVERHEAD); REGISTER_CC(CC_SUBSUMED); - REGISTER_CC(CC_DONTZuCARE); + REGISTER_CC(CC_DONT_CARE); REGISTER_CCS(CCS_MAIN); REGISTER_CCS(CCS_SYSTEM); REGISTER_CCS(CCS_GC); REGISTER_CCS(CCS_OVERHEAD); REGISTER_CCS(CCS_SUBSUMED); - REGISTER_CCS(CCS_DONTZuCARE); + REGISTER_CCS(CCS_DONT_CARE); CCCS = CCS_OVERHEAD; @@ -279,8 +280,7 @@ EnterFunCCS ( CostCentreStack *cccs, CostCentreStack *ccsfn ) return CCCS; } - if (ccsfn->root->is_subsumed == CC_IS_CAF - || ccsfn->root->is_subsumed == CC_IS_SUBSUMED) { + if (ccsfn->root->is_caf == CC_IS_CAF) { return AppendCCS(cccs,ccsfn); } else { return ccsfn; @@ -378,7 +378,7 @@ AppendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ) return ccs1; } - if (ccs2->cc->is_subsumed != CC_IS_BORING) { + if (ccs2->cc->is_caf == CC_IS_CAF) { return ccs1; } @@ -749,7 +749,7 @@ static rtsBool ccs_to_ignore (CostCentreStack *ccs) { if ( ccs == CCS_OVERHEAD - || ccs == CCS_DONTZuCARE + || ccs == CCS_DONT_CARE || ccs == CCS_GC || ccs == CCS_SYSTEM) { return rtsTrue; diff --git a/ghc/rts/ProfRts.h b/ghc/rts/Profiling.h similarity index 91% rename from ghc/rts/ProfRts.h rename to ghc/rts/Profiling.h index 1af4ca1..8b5bf76 100644 --- a/ghc/rts/ProfRts.h +++ b/ghc/rts/Profiling.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfRts.h,v 1.10 2000/03/08 17:48:24 simonmar Exp $ + * $Id: Profiling.h,v 1.1 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * diff --git a/ghc/rts/Proftimer.c b/ghc/rts/Proftimer.c index ad5bbd9..ae63670 100644 --- a/ghc/rts/Proftimer.c +++ b/ghc/rts/Proftimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Proftimer.c,v 1.5 1999/08/25 16:11:49 simonmar Exp $ + * $Id: Proftimer.c,v 1.6 2000/04/03 15:54:49 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -7,37 +7,36 @@ * * ---------------------------------------------------------------------------*/ -/* Only have cost centres etc if PROFILING defined */ - #if defined (PROFILING) #include "Rts.h" -#include "ProfRts.h" +#include "Profiling.h" #include "Itimer.h" #include "Proftimer.h" -nat current_interval = 1; /* Current interval number -- - stored in AGE */ - -nat interval_ticks = DEFAULT_INTERVAL; /* No of ticks in an interval */ - -nat previous_ticks = 0; /* ticks in previous intervals */ -nat current_ticks = 0; /* ticks in current interval */ +rtsBool do_prof_ticks = rtsFalse; /* enable profiling ticks */ void stopProfTimer(void) { /* Stops time profile */ - if (time_profiling) { - do_prof_ticks = rtsFalse; - } + if (time_profiling) { + do_prof_ticks = rtsFalse; + } }; void startProfTimer(void) { /* Starts time profile */ - if (time_profiling) { - do_prof_ticks = rtsTrue; - } + if (time_profiling) { + do_prof_ticks = rtsTrue; + } }; +void +handleProfTick(void) +{ + if (do_prof_ticks) { + CCS_TICK(CCCS); + } +} #endif /* PROFILING */ diff --git a/ghc/rts/Proftimer.h b/ghc/rts/Proftimer.h index 38a023c..231f8da 100644 --- a/ghc/rts/Proftimer.h +++ b/ghc/rts/Proftimer.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Proftimer.h,v 1.4 1999/08/25 16:11:50 simonmar Exp $ + * $Id: Proftimer.h,v 1.5 2000/04/03 15:54:50 simonmar Exp $ * * (c) The GHC Team, 1998 * @@ -7,10 +7,10 @@ * * ---------------------------------------------------------------------------*/ +extern rtsBool do_prof_ticks; extern lnat total_prof_ticks; extern void initProfTimer(nat ms); extern void stopProfTimer(void); extern void startProfTimer(void); -extern void handleProfTick(int unused); - +extern void handleProfTick(void); diff --git a/ghc/rts/RtsFlags.c b/ghc/rts/RtsFlags.c index bb0088c..fb205cc 100644 --- a/ghc/rts/RtsFlags.c +++ b/ghc/rts/RtsFlags.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.c,v 1.28 2000/03/31 03:09:36 hwloidl Exp $ + * $Id: RtsFlags.c,v 1.29 2000/04/03 15:54:50 simonmar Exp $ * * (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The GHC Team, 1998-1999 @@ -25,7 +25,7 @@ #include "RtsFlags.h" #include "RtsUtils.h" #include "BlockAlloc.h" -#include "ProfRts.h" +#include "Profiling.h" #if defined(PROFILING) #include "Itimer.h" @@ -200,8 +200,10 @@ static void process_par_option(int arg, int *rts_argc, char *rts_argv[], rtsBool static void set_par_debug_options(nat n); static void help_par_debug_options(nat n); #endif +#if defined(DEBUG) static void set_debug_options(nat n); static void help_debug_options(nat n); +#endif //@node Command-line option parsing routines, GranSim specific options, Static function decls //@subsection Command-line option parsing routines @@ -227,10 +229,6 @@ void initRtsFlagsDefaults(void) RtsFlags.GcFlags.generations = 2; RtsFlags.GcFlags.steps = 2; - RtsFlags.GcFlags.forceGC = rtsFalse; - RtsFlags.GcFlags.forcingInterval = 5000000; /* 5MB (or words?) */ - RtsFlags.GcFlags.ringBell = rtsFalse; - RtsFlags.GcFlags.squeezeUpdFrames = rtsTrue; #if defined(PROFILING) || defined(PAR) @@ -382,37 +380,19 @@ usage_text[] = { " -B Sound the bell at the start of each garbage collection", #if defined(PROFILING) || defined(PAR) "", -" -p Produce cost centre time profile (output file .prof)", +" -px Time/allocation profile (XML) (output file .prof)", +" -p Time/allocation profile (output file .prof)", " sort: T = time (default), A = alloc, C = cost centre label", -" -P Produce serial time profile (output file .time)", -" and a -p profile with detailed tick/alloc info", +" -P More detailed Time/Allocation profile" # if defined(PROFILING) "", -" -h Heap residency profile (output file .hp)", +" -hx Heap residency profile (XML) (output file .prof)", +" -h Heap residency profile (text) (output file .prof)", " break-down: C = cost centre stack (default), M = module", " D = closure description, Y = type description", -" T, = time closure created", -" ints: no. of interval bands plotted (default 18)", -" start: seconds after which intervals start (default 0.0)", -" A subset of closures may be selected by the attached cost centre using:", -" -c{mod:lab,mod:lab...}, specific module:label cost centre(s)", -" -m{mod,mod...} all cost centres from the specified modules(s)", -" Selections can also be made by description, type, kind and age:", -" -d{des,des...} closures with specified closure descriptions", -" -y{typ,typ...} closures with specified type descriptions", -" -k{knd,knd...} closures of the specified kinds", -" -a closures which survived complete intervals", -" The selection logic used is summarised as follows:", -" ([-c] or [-m] or [-g]) and ([-d] or [-y] or [-k]) and [-a]", -" where an option is true if not specified", "", " -xc Show current cost centre stack on raising an exception", # endif -"", -" -z set hash table for (C, M, G, D or Y)", -"", -" -i Number of seconds in a profiling interval (default 1.0):", -" heap profile (-h) and/or serial time profile (-P) frequency", #endif /* PROFILING or PAR */ #if !defined(PROFILING) && defined(DEBUG) "", @@ -684,14 +664,6 @@ error = rtsTrue; } break; - case 'j': /* force GC option */ - RtsFlags.GcFlags.forceGC = rtsTrue; - if (rts_argv[arg][2]) { - RtsFlags.GcFlags.forcingInterval - = decode(rts_argv[arg]+2) / sizeof(W_); - } - break; - case 'S': RtsFlags.GcFlags.giveStats ++; @@ -732,13 +704,6 @@ error = rtsTrue; } ) break; - case 'i': /* serial profiling -- initial timer interval */ - COST_CENTRE_USING_BUILD_ONLY( - interval_ticks = (I_) ((atof(rts_argv[arg]+2) * TICK_FREQUENCY)); - if (interval_ticks <= 0) - interval_ticks = 1; - ) break; - case 'h': /* serial heap profile */ #if !defined(PROFILING) && defined(DEBUG) switch (rts_argv[arg][2]) { @@ -769,22 +734,6 @@ error = rtsTrue; case TYPEchar: RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_TYPE; break; - case TIMEchar: - RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_TIME; - if (rts_argv[arg][3]) { - char *start_str = strchr(rts_argv[arg]+3, ','); - I_ intervals; - if (start_str) *start_str = '\0'; - - if ((intervals = decode(rts_argv[arg]+3)) != 0) { - time_intervals = (hash_t) intervals; - /* ToDo: and what if it *is* zero intervals??? */ - } - if (start_str) { - earlier_ticks = (I_)((atof(start_str + 1) * TICK_FREQUENCY)); - } - } - break; default: prog_belch("invalid heap profile option: %s",rts_argv[arg]); error = rtsTrue; @@ -793,81 +742,6 @@ error = rtsTrue; #endif break; - case 'z': /* size of index tables */ - PROFILING_BUILD_ONLY( - switch (rts_argv[arg][2]) { - case CCchar: - max_cc_no = (hash_t) decode(rts_argv[arg]+3); - if (max_cc_no == 0) { - prog_belch("bad number of cost centres %s", rts_argv[arg]); - error = rtsTrue; - } - break; - case MODchar: - max_mod_no = (hash_t) decode(rts_argv[arg]+3); - if (max_mod_no == 0) { - prog_belch("bad number of modules %s", rts_argv[arg]); - error = rtsTrue; - } - break; - case DESCRchar: - max_descr_no = (hash_t) decode(rts_argv[arg]+3); - if (max_descr_no == 0) { - prog_belch("bad number of closure descriptions %s", - rts_argv[arg]); - error = rtsTrue; - } - break; - case TYPEchar: - max_type_no = (hash_t) decode(rts_argv[arg]+3); - if (max_type_no == 0) { - prog_belch("bad number of type descriptions %s", - rts_argv[arg]); - error = rtsTrue; - } - break; - default: - prog_belch("invalid index table size option: %s", - rts_argv[arg]); - error = rtsTrue; - } - ) break; - - case 'c': /* cost centre label select */ - case 'd': /* closure descr select */ - case 'y': /* closure type select */ - PROFILING_BUILD_ONLY( - {char *left = strchr(rts_argv[arg], '{'); - char *right = strrchr(rts_argv[arg], '}'); - - if (! left || ! right || - strrchr(rts_argv[arg], '{') != left || - strchr(rts_argv[arg], '}') != right) { - prog_belch("invalid heap profiling selection bracketing: %s", - rts_argv[arg]); - error = rtsTrue; - } else { - *right = '\0'; - switch (rts_argv[arg][1]) { - case 'c': /* cost centre label select */ - RtsFlags.ProfFlags.ccSelector = left + 1; - break; - case 'm': /* cost centre module select */ - RtsFlags.ProfFlags.modSelector = left + 1; - break; - case 'd': /* closure descr select */ - RtsFlags.ProfFlags.descrSelector = left + 1; - break; - case 'y': /* closure type select */ - RtsFlags.ProfFlags.typeSelector = left + 1; - break; - case 'k': /* closure kind select */ - RtsFlags.ProfFlags.kindSelector = left + 1; - break; - } - }} - ) break; - /* =========== CONCURRENT ========================= */ case 'C': /* context switch interval */ if (rts_argv[arg][2] == '\0') @@ -1909,8 +1783,9 @@ help_par_debug_options(nat n) { fprintf(stderr, par_debug_opts_strs[i]); } -#endif /* GRAN */ +#endif /* PAR */ +#ifdef DEBUG static void set_debug_options(nat n) { nat i; @@ -1943,6 +1818,7 @@ help_debug_options(nat n) { if ((n>>i)&1) fprintf(stderr, debug_opts_strs[i]); } +#endif /* DEBUG */ //@node Aux fcts, , GranSim specific options //@subsection Aux fcts diff --git a/ghc/rts/RtsFlags.h b/ghc/rts/RtsFlags.h index c153b89..4ce4c76 100644 --- a/ghc/rts/RtsFlags.h +++ b/ghc/rts/RtsFlags.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.h,v 1.23 2000/03/31 03:09:36 hwloidl Exp $ + * $Id: RtsFlags.h,v 1.24 2000/04/03 15:54:50 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -32,8 +32,6 @@ struct GC_FLAGS { nat generations; nat steps; - rtsBool forceGC; /* force a major GC every bytes */ - int forcingInterval; /* actually, stored as a number of *words* */ rtsBool ringBell; rtsBool squeezeUpdFrames; diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 37bc4c0..caca89f 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.37 2000/03/31 03:09:36 hwloidl Exp $ + * $Id: RtsStartup.c,v 1.38 2000/04/03 15:54:50 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -24,7 +24,7 @@ #include "Prelude.h" /* fixupRTStoPreludeRefs */ #if defined(PROFILING) || defined(DEBUG) -# include "ProfRts.h" +# include "Profiling.h" # include "ProfHeap.h" #endif diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index 258db3d..df60e08 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.hc,v 1.39 2000/03/31 03:09:36 hwloidl Exp $ + * $Id: StgMiscClosures.hc,v 1.40 2000/04/03 15:54:50 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -14,7 +14,7 @@ #include "HeapStackCheck.h" /* for stg_gen_yield */ #include "Storage.h" #include "StoragePriv.h" -#include "ProfRts.h" +#include "Profiling.h" #include "Prelude.h" #include "SMP.h" #if defined(GRAN) || defined(PAR) @@ -612,7 +612,7 @@ FN_(dummy_ret_entry) JMP_(ENTRY_CODE(ret_addr)); FE_ } -SET_STATIC_HDR(dummy_ret_closure,dummy_ret_info,CCS_DONTZuCARE,,EI_) +SET_STATIC_HDR(dummy_ret_closure,dummy_ret_info,CCS_DONT_CARE,,EI_) , /*payload*/{} }; /* ----------------------------------------------------------------------------- @@ -667,7 +667,7 @@ FN_(forceIO_entry) JMP_(GET_ENTRY(R1.cl)); FE_ } -SET_STATIC_HDR(forceIO_closure,forceIO_info,CCS_DONTZuCARE,,EI_) +SET_STATIC_HDR(forceIO_closure,forceIO_info,CCS_DONT_CARE,,EI_) , /*payload*/{} }; @@ -734,14 +734,14 @@ static INFO_TBL_CONST StgInfoTable izh_static_info; #define CHARLIKE_HDR(n) \ { \ STATIC_HDR(Char_hash_static_info, /* C# */ \ - CCS_DONTZuCARE), \ + CCS_DONT_CARE), \ data : n \ } #define INTLIKE_HDR(n) \ { \ STATIC_HDR(Int_hash_static_info, /* I# */ \ - CCS_DONTZuCARE), \ + CCS_DONT_CARE), \ data : n \ }