summaryrefslogtreecommitdiff
path: root/rts/sm/Sanity.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-12-02 12:38:06 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-12-02 12:38:06 +0000
commitf6013eedb4dea47afac8167dfa08561ae90454db (patch)
tree31c1b07b14e86f60b2af3187f9ce0ec2ed3e0ca1 /rts/sm/Sanity.h
parent51741bdea146fbc65ad3509c8f97a5ebff1433de (diff)
downloadhaskell-f6013eedb4dea47afac8167dfa08561ae90454db.tar.gz
Refactoring only
Diffstat (limited to 'rts/sm/Sanity.h')
-rw-r--r--rts/sm/Sanity.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/rts/sm/Sanity.h b/rts/sm/Sanity.h
new file mode 100644
index 0000000000..115622254d
--- /dev/null
+++ b/rts/sm/Sanity.h
@@ -0,0 +1,47 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 1998-1999
+ *
+ * Prototypes for functions in Sanity.c
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef SANITY_H
+#define SANITY_H
+
+#ifdef DEBUG
+
+BEGIN_RTS_PRIVATE
+
+# if defined(PAR)
+# define PVM_PE_MASK 0xfffc0000
+# define MAX_PVM_PES MAX_PES
+# define MAX_PVM_TIDS MAX_PES
+# define MAX_SLOTS 100000
+# endif
+
+/* debugging routines */
+void checkSanity ( rtsBool check_heap );
+void checkNurserySanity ( step *stp );
+void checkHeap ( bdescr *bd );
+void checkHeapChunk ( StgPtr start, StgPtr end );
+void checkLargeObjects ( bdescr *bd );
+void checkTSO ( StgTSO* tso );
+void checkGlobalTSOList ( rtsBool checkTSOs );
+void checkStaticObjects ( StgClosure* static_objects );
+void checkStackChunk ( StgPtr sp, StgPtr stack_end );
+StgOffset checkStackFrame ( StgPtr sp );
+StgOffset checkClosure ( StgClosure* p );
+
+void checkMutableList ( bdescr *bd, nat gen );
+void checkMutableLists ( rtsBool checkTSOs );
+
+void memInventory (rtsBool show);
+
+void checkBQ (StgTSO *bqe, StgClosure *closure);
+
+END_RTS_PRIVATE
+
+#endif /* DEBUG */
+
+#endif /* SANITY_H */