From 27f08e0bbd8aaaab52599528e30c417a2401b84b Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 12 Dec 2001 14:59:41 +0000 Subject: [PATCH] [project @ 2001-12-12 14:59:41 by simonmar] Cache whether a particular CCS is "selected" during this heap profiling run in the CCS structure to save time during heap censuses. (other changes in previous commit to rts/Profiling.c, rts/ProfHeap.c). --- ghc/includes/StgProf.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc/includes/StgProf.h b/ghc/includes/StgProf.h index 194a228..f6af87f 100644 --- a/ghc/includes/StgProf.h +++ b/ghc/includes/StgProf.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgProf.h,v 1.15 2001/11/26 16:54:22 simonmar Exp $ + * $Id: StgProf.h,v 1.16 2001/12/12 14:59:41 simonmar Exp $ * * (c) The GHC Team, 1998 * @@ -35,6 +35,8 @@ typedef struct _CostCentreStack { struct _CostCentreStack *prevStack; struct _IndexTable *indexTable; + unsigned int selected; + unsigned long long scc_count; unsigned long time_ticks; @@ -180,6 +182,7 @@ extern CostCentreStack *CCS_LIST; /* registered CCS list */ cc : cc_ident, \ prevStack : NULL, \ indexTable : NULL, \ + selected : 0, \ scc_count : 0, \ time_ticks : 0, \ mem_alloc : 0, \ @@ -195,8 +198,6 @@ extern CostCentreStack *CCS_LIST; /* registered CCS list */ * Time / Allocation Macros * ---------------------------------------------------------------------------*/ -#define CCS_TICK(ccs) (ccs)->time_ticks++ - /* eliminate profiling overhead from allocation costs */ #define CCS_ALLOC(ccs, size) (ccs)->mem_alloc += ((size)-sizeofW(StgProfHeader)) -- 1.7.10.4