diff options
author | Austin Seipp <austin@well-typed.com> | 2014-08-20 12:46:24 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-08-20 12:51:30 -0500 |
commit | 1c43f620eeb65552614c6392e25f1404de291d6c (patch) | |
tree | 3a44a7400cd1e7f2087a0b675f0dbbcfb4c64841 /includes | |
parent | bb70e33a954414f71a274eb5558fba28734688c1 (diff) | |
download | haskell-1c43f620eeb65552614c6392e25f1404de291d6c.tar.gz |
[ci skip] includes: detabify/dewhitespace rts/prof/CCS.h
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/prof/CCS.h | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h index b121b0361e..85b03f38b3 100644 --- a/includes/rts/prof/CCS.h +++ b/includes/rts/prof/CCS.h @@ -15,8 +15,8 @@ #define RTS_PROF_CCS_H /* ----------------------------------------------------------------------------- - * Data Structures - * ---------------------------------------------------------------------------*/ + * Data Structures + * ---------------------------------------------------------------------------*/ /* * Note [struct alignment] * NB. be careful to avoid unwanted padding between fields, by @@ -88,7 +88,7 @@ void startProfTimer ( void ); * ---------------------------------------------------------------------------*/ #if defined(PROFILING) - + /* ----------------------------------------------------------------------------- * Constants * ---------------------------------------------------------------------------*/ @@ -116,17 +116,17 @@ typedef struct IndexTable_ { nat back_edge; } IndexTable; - + /* ----------------------------------------------------------------------------- Pre-defined cost centres and cost centre stacks -------------------------------------------------------------------------- */ #if IN_STG_CODE -extern StgWord CC_MAIN[]; +extern StgWord CC_MAIN[]; extern StgWord CCS_MAIN[]; // Top CCS -extern StgWord CC_SYSTEM[]; +extern StgWord CC_SYSTEM[]; extern StgWord CCS_SYSTEM[]; // RTS costs extern StgWord CC_GC[]; @@ -140,10 +140,10 @@ extern StgWord CCS_DONT_CARE[]; // CCS attached to static constructors #else -extern CostCentre CC_MAIN[]; +extern CostCentre CC_MAIN[]; extern CostCentreStack CCS_MAIN[]; // Top CCS -extern CostCentre CC_SYSTEM[]; +extern CostCentre CC_SYSTEM[]; extern CostCentreStack CCS_SYSTEM[]; // RTS costs extern CostCentre CC_GC[]; @@ -169,7 +169,7 @@ extern unsigned int RTS_VAR(CCS_ID); extern unsigned int RTS_VAR(era); /* ----------------------------------------------------------------------------- - * Functions + * Functions * ---------------------------------------------------------------------------*/ CostCentreStack * pushCostCentre (CostCentreStack *, CostCentre *); @@ -177,7 +177,7 @@ void enterFunCCS (StgRegTable *reg, CostCentreStack *); /* ----------------------------------------------------------------------------- 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 @@ -190,21 +190,21 @@ void enterFunCCS (StgRegTable *reg, CostCentreStack *); 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) +#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. @@ -224,17 +224,17 @@ extern CostCentreStack * RTS_VAR(CCS_LIST); // registered CCS list # define CCS_DECLARE(ccs_ident,cc_ident,is_local) \ is_local CostCentreStack ccs_ident[1] \ - = {{ ccsID : 0, \ - cc : cc_ident, \ - prevStack : NULL, \ - indexTable : NULL, \ + = {{ ccsID : 0, \ + cc : cc_ident, \ + prevStack : NULL, \ + indexTable : NULL, \ root : NULL, \ depth : 0, \ selected : 0, \ - scc_count : 0, \ - time_ticks : 0, \ - mem_alloc : 0, \ - inherited_ticks : 0, \ + scc_count : 0, \ + time_ticks : 0, \ + mem_alloc : 0, \ + inherited_ticks : 0, \ inherited_alloc : 0 \ }}; @@ -248,8 +248,7 @@ extern CostCentreStack * RTS_VAR(CCS_LIST); // registered CCS list #else /* !PROFILING */ #define CCS_ALLOC(ccs, amount) doNothing() - + #endif /* PROFILING */ #endif /* RTS_PROF_CCS_H */ - |