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;
73 #if defined(GRAN) || defined(PAR)
74 /* Granularity event types for output */
75 enum gran_event_types {
76 GR_START = 0, GR_STARTQ,
77 GR_STEALING, GR_STOLEN, GR_STOLENQ,
78 GR_FETCH, GR_REPLY, GR_BLOCK, GR_RESUME, GR_RESUMEQ,
79 GR_SCHEDULE, GR_DESCHEDULE,
81 SP_SPARK, SP_SPARKAT, SP_USED, SP_PRUNED, SP_EXPORTED, SP_ACQUIRED,
92 struct spark *prev, *next;
97 typedef struct event {
98 PROC proc; /* Processor id */
99 PROC creator; /* Processor id of PE that created the event */
100 EVTTYPE evttype; /* Event type */
101 TIME time; /* Time at which event happened */
102 P_ tso; /* Associated TSO, if relevant, Nil_closure otherwise*/
103 P_ node; /* Associated node, if relevant, Nil_closure otherwise*/
104 sparkq spark; /* Associated SPARK, if relevant, NULL otherwise */
112 A cost centre is represented by a pointer to a static structure
113 containing the @label@, @module@, @group@, and the statistical meters
117 #if defined(USE_COST_CENTRES) || defined(CONCURRENT)
120 struct cc *registered; /* list of registered cost centres */
121 hash_t index_val; /* hashed index -- initially UNHASHED */
123 char *label; /* cost centre label */
124 char *module; /* name of module in which _scc_ occurs */
125 char *group; /* name of group in which _scc_ occurs */
127 char is_subsumed; /* '\0' => *not* a CAF or dict cc */
128 /* 'C' => *is* a CAF cc */
129 /* 'D' => *is* a dictionary cc */
131 /* Statistics Gathered */
133 W_ scc_count; /* no of scc expression instantiations */
134 W_ sub_scc_count; /* no of scc's set inside this cc */
135 W_ cafcc_count; /* no of scc expression instantiations */
136 W_ sub_cafcc_count; /* no of scc's set inside this cc */
138 W_ thunk_count; /* no of {thunk,function,PAP} enters */
139 W_ function_count; /* in this cost centre */
142 W_ time_ticks; /* no of timer interrupts -- current interval */
143 W_ prev_ticks; /* no of timer interrupts -- previous intervals */
144 W_ mem_allocs; /* no of allocations */
145 W_ mem_alloc; /* no of words allocated (excl CC_HDR) */
147 /* Heap Profiling by Cost Centre */
149 W_ selected; /* is this cost centre selected */
153 #endif /* defined(USE_COST_CENTRES) || defined(CONCURRENT) */
156 This structure will need to be expanded change as the statistics we
160 #endif /* ! RTSTYPES_H */