[m-rev.] for review: fix low-level debugging

Peter Wang wangp at students.cs.mu.OZ.AU
Mon Mar 20 20:39:48 AEDT 2006


Estimated hours taken: 0.5
Branches: main

Restore low-level debugging to working state.

runtime/mercury_conf_param.h:
	Fix typos.

runtime/mercury_overflow.h:
runtime/mercury_wrapper.c:
	Update references to outdated field names.

Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.87
diff -u -r1.87 mercury_conf_param.h
--- runtime/mercury_conf_param.h	15 Mar 2006 02:31:54 -0000	1.87
+++ runtime/mercury_conf_param.h	20 Mar 2006 06:49:42 -0000
@@ -273,11 +273,11 @@
 ** 	Enables low-level debugging messages from routines concerned with
 ** 	the representation of lvals in the RTTI system.
 **
-** MP_DEBUG_MDPROF_SIGNAL
+** MR_DEBUG_MDPROF_SIGNAL
 **	Enables low-level debugging messages from the signal handling
 **	functions in the deep profiler.
 **
-** MP_STACK_EXTEND_DEBUG
+** MR_STACK_EXTEND_DEBUG
 **	Enables low-level debugging messages when extending the stacks.
 **
 ** MR_TRACE_CHECK_INTEGRITY
Index: runtime/mercury_overflow.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_overflow.h,v
retrieving revision 1.8
diff -u -r1.8 mercury_overflow.h
--- runtime/mercury_overflow.h	13 Sep 2005 08:25:39 -0000	1.8
+++ runtime/mercury_overflow.h	20 Mar 2006 06:53:01 -0000
@@ -24,29 +24,29 @@
 
 #define	MR_heap_overflow_check()					\
 	(								\
-		MR_IF (MR_hp >= MR_ENGINE(MR_eng_heap_zone)->top,(	\
+		MR_IF (MR_hp >= MR_ENGINE(MR_eng_heap_zone)->MR_zone_top,( \
 			MR_fatal_error("heap overflow")			\
 		)),							\
-		MR_IF (MR_hp > MR_ENGINE(MR_eng_heap_zone)->max,(	\
-			MR_ENGINE(MR_eng_heap_zone)->max = MR_hp	\
+		MR_IF (MR_hp > MR_ENGINE(MR_eng_heap_zone)->MR_zone_max,( \
+			MR_ENGINE(MR_eng_heap_zone)->MR_zone_max = MR_hp \
 		)),							\
 		(void)0							\
 	)
 
 #define	MR_detstack_overflow_check()					\
 	(								\
-		MR_IF (MR_sp >= MR_CONTEXT(MR_ctxt_detstack_zone)->top,(\
+		MR_IF (MR_sp >= MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_top,(\
 			MR_fatal_error("stack overflow")		\
 		)),							\
-		MR_IF (MR_sp > MR_CONTEXT(MR_ctxt_detstack_zone)->max,(	\
-			MR_CONTEXT(MR_ctxt_detstack_zone)->max = MR_sp	\
+		MR_IF (MR_sp > MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_max,(	\
+			MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_max = MR_sp	\
 		)),							\
 		(void)0							\
 	)
 
 #define	MR_detstack_underflow_check()					\
 	(								\
-		MR_IF (MR_sp < MR_CONTEXT(MR_ctxt_detstack_zone)->min,(	\
+		MR_IF (MR_sp < MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_min,(	\
 			MR_fatal_error("stack underflow")		\
 		)),							\
 		(void)0							\
@@ -54,18 +54,18 @@
 
 #define	MR_nondstack_overflow_check()					\
 	(								\
-		MR_IF (MR_maxfr >= MR_CONTEXT(MR_ctxt_nondetstack_zone)->top,( \
+		MR_IF (MR_maxfr >= MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_top,( \
 			MR_fatal_error("nondetstack overflow")		\
 		)),							\
-		MR_IF (MR_maxfr > MR_CONTEXT(MR_ctxt_nondetstack_zone)->max,( \
-			MR_CONTEXT(MR_ctxt_nondetstack_zone)->max = MR_maxfr\
+		MR_IF (MR_maxfr > MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_max,( \
+			MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_max = MR_maxfr\
 		)),							\
 		(void)0							\
 	)
 
 #define	MR_nondstack_underflow_check()					\
 	(								\
-		MR_IF (MR_maxfr < MR_CONTEXT(MR_ctxt_nondetstack_zone)->min,( \
+		MR_IF (MR_maxfr < MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_min,( \
 			MR_fatal_error("nondetstack underflow")		\
 		)),							\
 		(void)0							\
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.160
diff -u -r1.160 mercury_wrapper.c
--- runtime/mercury_wrapper.c	2 Mar 2006 11:09:42 -0000	1.160
+++ runtime/mercury_wrapper.c	16 Mar 2006 05:19:02 -0000
@@ -1838,10 +1838,10 @@
     MR_ENGINE(MR_eng_heap_zone)->max =
         MR_ENGINE(MR_eng_heap_zone)->min;
   #endif
-    MR_CONTEXT(MR_ctxt_detstack_zone)->max =
-        MR_CONTEXT(MR_ctxt_detstack_zone)->min;
-    MR_CONTEXT(MR_ctxt_nondetstack_zone)->max =
-        MR_CONTEXT(MR_ctxt_nondetstack_zone)->min;
+    MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_max =
+        MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_min;
+    MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_max =
+        MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_min;
 #endif
 
     MR_time_at_start = MR_get_user_cpu_miliseconds();
@@ -1895,11 +1895,11 @@
                 - MR_ENGINE(MR_eng_heap_zone)->min));
   #endif
         printf("max detstack used:  %6ld words\n",
-            (long)(MR_CONTEXT(MR_ctxt_detstack_zone)->max
-                   - MR_CONTEXT(MR_ctxt_detstack_zone)->min));
+            (long)(MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_max
+                   - MR_CONTEXT(MR_ctxt_detstack_zone)->MR_zone_min));
         printf("max nondstack used: %6ld words\n",
-            (long) (MR_CONTEXT(MR_ctxt_nondetstack_zone)->max
-                - MR_CONTEXT(MR_ctxt_nondetstack_zone)->min));
+            (long) (MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_max
+                - MR_CONTEXT(MR_ctxt_nondetstack_zone)->MR_zone_min));
     }
 #endif
 
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list