[m-rev.] for review: making decldebug grades not imply trailing

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue May 17 14:34:49 AEST 2005


For review by anyone. With this change, the executable of the compiler in
asm_fast.gc.decldebug is only 13% larger than in asm_fast.gc.debug.tr.

Zoltan.

compiler/handle_options.m:
scripts/final_grade_options.sh-subr:
	Make only .debug imply .tr, not .decldebug. Declarative debugging
	requires retries, which work in trailing grades only if the entity
	that does the trailing is prepared for them.

configure.in:
	Make the decldebug grade installed when enabled be the one without .tr.

cvs diff: Diffing .
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.416
diff -u -b -r1.416 configure.in
--- configure.in	9 May 2005 04:34:36 -0000	1.416
+++ configure.in	10 May 2005 14:06:44 -0000
@@ -2773,7 +2773,7 @@
 if test "$enable_debug_grades" = yes; then
 	LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.tr.debug"
 	if test "$enable_decl_debug_grades" = yes; then
-		LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.tr.decldebug"
+		LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.decldebug"
 	fi
 fi
 
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.229
diff -u -b -r1.229 handle_options.m
--- compiler/handle_options.m	17 May 2005 04:19:21 -0000	1.229
+++ compiler/handle_options.m	17 May 2005 04:27:11 -0000
@@ -841,17 +841,25 @@
 	option_implies(exec_trace, stack_trace, bool(yes)),
 	option_implies(profile_deep, stack_trace, bool(yes)),
 
-	% The `.debug' grade implies --use-trail, except with
-	% --use-minimal-model, which is not compatible with --use-trail.
-	%
-	% The reason for this is to avoid unnecessary proliferation in
+	% The `.debug' grade implies --use-trail in most cases. The reason
+	% for the implication is to avoid unnecessary proliferation in
 	% the number of different grades.  If you're using --debug,
 	% you've already taken a major performance hit, so you should
-	% be able to afford the minor performance hit caused by
-	% --use-trail.
+	% be able to afford the minor performance hit caused by --use-trail.
+	%
+	% There are two exceptions. First, --use-minimal-model doesn't work
+	% with trails. Second, the only difference between debug and decldebug
+	% is the latter's support for declarative debugging, which inherently
+	% requires retries in the debugger. These retries don't reset the
+	% trail unless the code that creates the trail entries has prepared for
+	% retries, which usually isn't the case. In any case, the space
+	% overhead of decldebug grades is high enough that we don't want the
+	% space overhead of trailing (mostly for extra code) as well unless the
+	% user has explicitly requested it.
 
 	globals__io_lookup_bool_option(exec_trace, ExecTrace),
-	( { ExecTrace = yes, UseMinimalModel = no } ->
+	globals__io_lookup_bool_option(decl_debug, DeclDebug),
+	( { ExecTrace = yes, DeclDebug = no, UseMinimalModel = no } ->
 		globals__io_set_option(use_trail, bool(yes))
 	;
 		[]
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
Index: scripts/final_grade_options.sh-subr
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/final_grade_options.sh-subr,v
retrieving revision 1.13
diff -u -b -r1.13 final_grade_options.sh-subr
--- scripts/final_grade_options.sh-subr	20 Jul 2004 04:41:31 -0000	1.13
+++ scripts/final_grade_options.sh-subr	19 Apr 2005 14:14:04 -0000
@@ -41,10 +41,10 @@
 esac
 
 #
-# .debug grade implies --use-trail in the absence of .*mm*
+# .debug grade (but not .decldebug) implies --use-trail in the absence of .*mm*
 #	(see comment in compiler/handle_options.m for rationale)
 #
-case $debug,$use_minimal_model in true,false)
+case $debug,$decl_debug,$use_minimal_model in true,false,false)
 	use_trail=true ;;
 esac
 
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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