2 % (c) The GRASP/AQUA Project, Glasgow University, 1995
4 %************************************************************************
6 \section{How data is handled within the RTS}
8 %************************************************************************
15 For all of you boolean crazies out there...
26 Hash tables for GUM are ADTs. Peek inside, and I'll have to kill you.
27 The same goes for hash list cells.
31 typedef struct hashtable HashTable;
32 typedef struct hashlist HashList;
34 typedef double REAL_TIME;
35 typedef int GLOBAL_TASK_ID;
39 /* Global addresses, in all their glory */
63 typedef unsigned long TIME;
64 typedef unsigned char PROC;
65 typedef unsigned char EVTTYPE;
70 typedef GLOBAL_TASK_ID PROC;
75 A cost centre is represented by a pointer to a static structure
76 containing the @label@, @module@, @group@, and the statistical meters
80 #if defined(PROFILING) || defined(CONCURRENT)
83 struct cc *registered; /* list of registered cost centres */
84 hash_t index_val; /* hashed index -- initially UNHASHED */
86 char *label; /* cost centre label */
87 char *module; /* name of module in which _scc_ occurs */
88 char *group; /* name of group in which _scc_ occurs */
90 char is_subsumed; /* 'B' => *not* a CAF/dict/sub cc */
91 /* 's' => *is* a subsumed cc */
92 /* 'c' => *is* a CAF cc */
93 /* 'd' => *is* a dictionary cc */
94 /* IS_CAF_OR_DICT_OR_SUB_CC tests for lowercase bit */
96 /* Statistics Gathered */
98 W_ scc_count; /* no of scc expression instantiations */
99 W_ sub_scc_count; /* no of scc's set inside this cc */
100 W_ sub_cafcc_count; /* no of scc's set inside this cc */
101 W_ sub_dictcc_count; /* no of scc's set inside this cc */
103 #if defined(PROFILING_DETAIL_COUNTS)
104 W_ thunk_count; /* no of {thunk,function,PAP} enters */
105 W_ function_count; /* in this cost centre */
107 W_ mem_allocs; /* no of allocations */
109 W_ subsumed_fun_count; /* no of functions subsumed */
110 W_ subsumed_caf_count; /* no of caf/dict funs subsumed */
111 W_ caffun_subsumed; /* no of subsumes from this caf/dict */
114 W_ time_ticks; /* no of timer interrupts -- current interval */
115 W_ prev_ticks; /* no of timer interrupts -- previous intervals */
116 W_ mem_alloc; /* no of words allocated (excl CC_HDR) */
118 /* Heap Profiling by Cost Centre */
120 W_ selected; /* is this cost centre selected */
124 #if defined(PROFILING_DETAIL_COUNTS)
125 #define INIT_CC_STATS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
127 #define INIT_CC_STATS 0,0,0,0,0,0,0,0
130 #endif /* defined(PROFILING) || defined(CONCURRENT) */
133 This structure will need to be expanded change as the statistics we
137 #endif /* ! RTSTYPES_H */