add Outputable instance for OccIfaceEq
[ghc-hetmet.git] / rts / parallel / ParallelDebug.h
1 /* 
2    Time-stamp: <Tue Mar 06 2001 00:25:14 Stardate: [-30]6285.08 hwloidl>
3
4    Prototypes of all parallel debugging functions.
5 */
6
7 #ifndef PARALLEL_DEBUG_H
8 #define PARALLEL_DEBUG_H
9
10 #if defined(DEBUG) && (defined(GRAN) || defined(PAR))
11 /* max length of the string holding a finger-print for a graph */
12 #define MAX_FINGER_PRINT_LEN  10000
13 // (10*RtsFlags.ParFlags.packBufferSize)
14 #endif
15
16 #if defined(DEBUG) && defined(GRAN)
17 void G_PRINT_NODE(StgClosure* node);
18 void G_PPN(StgClosure* node);
19 void G_INFO_TABLE(StgClosure* node);
20 void G_CURR_THREADQ(StgInt verbose);
21 void G_THREADQ(StgTSO* closure, StgInt verbose);
22 void G_TSO(StgTSO* closure, StgInt verbose);
23 void G_EVENT(rtsEventQ event, StgInt verbose);
24 void G_EVENTQ(StgInt verbose);
25 void G_PE_EQ(PEs pe, StgInt verbose);
26 void G_SPARK(rtsSparkQ spark, StgInt verbose);
27 void G_SPARKQ(rtsSparkQ spark, StgInt verbose);
28 void G_CURR_SPARKQ(StgInt verbose);
29 void G_PROC(StgInt proc, StgInt verbose);
30 void GP(StgInt proc);
31 void GCP(void);
32 void GT(StgPtr tso);
33 void GCT(void);
34 void GEQ(void);
35 void GTQ(PEs p);
36 void GCTQ(void);
37 void GSQ(PEs p);
38 void GCSQ(void);
39 void GN(StgPtr node);
40 void GIT(StgPtr node);
41 #endif
42
43 #if defined(GRAN) || defined(PAR)
44
45 char  *display_info_type(StgClosure *closure, char *str);
46 void   info_hdr_type(StgClosure *closure, char *res);
47 char  *info_type(StgClosure *closure);
48 char  *info_type_by_ip(StgInfoTable *ip);
49
50 void   PrintPacket(rtsPackBuffer *buffer);
51 void   PrintGraph(StgClosure *p, int indent_level);
52 void   GraphFingerPrint(StgClosure *p, char *finger_print);
53 void   checkGraph(StgClosure *p, int rec_level);
54
55 void   checkPacket(rtsPackBuffer *packBuffer);
56
57 #endif /* GRAN || PAR */
58
59 #if defined(PAR)
60
61 /* don't want to import Schedule.h and Sanity.h everywhere */
62 extern void print_bq (StgClosure *node);
63 extern void checkBQ (StgBlockingQueueElement *bqe, StgClosure *closure);
64
65 void   checkGAGAMap(globalAddr *gagamap, int nGAs);
66 extern rtsBool isOnLiveIndTable(globalAddr *ga);
67 extern void rebuildGAtables(rtsBool full);
68 extern void rebuildLAGAtable(void);
69 extern void checkLAGAtable(rtsBool check_closures);
70 extern void checkHeapChunk(StgPtr start, StgPtr end);
71 extern void printGA (globalAddr *ga);
72 extern void printGALA (GALA *gala);
73 extern void printLiveIndTable(void);
74 extern void printRemoteGATable(void);
75 extern void printLAGAtable(void);
76
77 #endif
78
79 #endif /* PARALLEL_DEBUG_H */