diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-01-10 14:39:16 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-01-12 01:02:30 -0500 |
commit | cb2349a4233d6bdef2d7090853397e6278a7378c (patch) | |
tree | bb2cadf6dc87d9bda5957098b09b15a6ca0395fb /includes/rts | |
parent | 92b684ded87d24b5770f1abd23c07570bbde43db (diff) | |
download | haskell-cb2349a4233d6bdef2d7090853397e6278a7378c.tar.gz |
Documentation and refactoring in CCS related code
- Remove REGISTER_CC and REGISTER_CCS macros, add functions registerCC
and registerCCS to Profiling.c.
- Reduce scope of symbols: CC_LIST, CCS_LIST, CC_ID, CCS_ID
- Document CC_LIST and CCS_LIST
Diffstat (limited to 'includes/rts')
-rw-r--r-- | includes/rts/prof/CCS.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h index 89c9fd2b13..e385a9b8fc 100644 --- a/includes/rts/prof/CCS.h +++ b/includes/rts/prof/CCS.h @@ -166,9 +166,6 @@ extern CostCentreStack CCS_IDLE[]; // capability is idle #endif /* IN_STG_CODE */ -extern unsigned int RTS_VAR(CC_ID); // global ids -extern unsigned int RTS_VAR(CCS_ID); - extern unsigned int RTS_VAR(era); /* ----------------------------------------------------------------------------- @@ -179,36 +176,7 @@ CostCentreStack * pushCostCentre (CostCentreStack *, CostCentre *); void enterFunCCS (StgRegTable *reg, CostCentreStack *); CostCentre *mkCostCentre (char *label, char *module, char *srcloc); -/* ----------------------------------------------------------------------------- - Registering CCs and CCSs - - Registering a CC or CCS consists of - - assigning it a unique ID - - linking it onto the list of registered CCs/CCSs - - Cost centres are registered at startup by a C constructor function - generated by the compiler in the _stub.c file for each module. The - macros below are invoked by that C code to register CCs and CCSs. - -------------------------------------------------------------------------- */ - extern CostCentre * RTS_VAR(CC_LIST); // registered CC list -extern CostCentreStack * RTS_VAR(CCS_LIST); // registered CCS list - -#define REGISTER_CC(cc) \ - do { \ - if ((cc)->link == (CostCentre *)0) { \ - (cc)->link = CC_LIST; \ - CC_LIST = (cc); \ - (cc)->ccID = CC_ID++; \ - }} while(0) - -#define REGISTER_CCS(ccs) \ - do { \ - if ((ccs)->prevStack == (CostCentreStack *)0) { \ - (ccs)->prevStack = CCS_LIST; \ - CCS_LIST = (ccs); \ - (ccs)->ccsID = CCS_ID++; \ - }} while(0) /* ----------------------------------------------------------------------------- * Declaring Cost Centres & Cost Centre Stacks. |