[m-dev.] for review: --trace-just-in-case

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Nov 12 18:36:33 AEDT 1999


Estimated hours taken: 0.5

Rename --call-trace-struct as --trace-just-in-case, and document it for
use by non-developers.

doc/user_guide.texi:
compiler/options.m:
	Rename the option, reclassify it as a debugging option,
	and document it properly.

compiler/handle_options.m:
compiler/trace.m:
	Conform to the name change.

Zoltan.

cvs diff: Diffing .
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/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.83
diff -u -b -r1.83 handle_options.m
--- handle_options.m	1999/11/09 01:45:28	1.83
+++ handle_options.m	1999/11/12 06:56:03
@@ -272,8 +272,8 @@
 	% --split-c-files implies --procs-per-c-function 1
 	option_implies(split_c_files, procs_per_c_function, int(1)),
 
-	% currently --call-trace-struct does not work with --split-c-files
-	option_implies(split_c_files, call_trace_struct, bool(no)),
+	% --trace-just-in-case does not work with --split-c-files
+	option_implies(split_c_files, trace_just_in_case, bool(no)),
 
 	% Minimal model tabling is not compatible with trailing;
 	% see the comment in runtime/mercury_tabling.c.
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.271
diff -u -b -r1.271 options.m
--- options.m	1999/11/06 05:03:50	1.271
+++ options.m	1999/11/12 07:10:36
@@ -98,6 +98,7 @@
 		;	trace_redo
 		;	trace_optimized
 		;	trace_decl
+		;	trace_just_in_case
 		;	stack_trace_higher_order
 		;	generate_bytecode
 		;	generate_prolog
@@ -236,7 +237,6 @@
 		;	reclaim_heap_on_semidet_failure
 		;	reclaim_heap_on_nondet_failure
 		;	lazy_code
-		;	call_trace_struct
 		;	have_delay_slot
 		;	num_real_r_regs
 		;	num_real_f_regs
@@ -459,6 +459,7 @@
 	trace_redo		-	bool(yes),
 	trace_optimized		-	bool(no),
 	trace_decl		-	bool(no),
+	trace_just_in_case	-	bool(no),
 	stack_trace_higher_order -	bool(no),
 	generate_bytecode	-	bool(no),
 	generate_prolog		-	bool(no),
@@ -554,7 +555,6 @@
 	reclaim_heap_on_failure	-	bool_special,
 	reclaim_heap_on_semidet_failure	-	bool(yes),
 	reclaim_heap_on_nondet_failure	-	bool(yes),
-	call_trace_struct		-	bool(no),
 	have_delay_slot		-	bool(no),
 					% the `mmc' script may override the
 					% above default if configure says
@@ -824,6 +824,7 @@
 long_option("trace-optimised",		trace_optimized).
 long_option("trace-optimized",		trace_optimized).
 long_option("trace-decl",		trace_decl).
+long_option("trace-just-in-case",	trace_just_in_case).
 long_option("stack-trace-higher-order",	stack_trace_higher_order).
 long_option("generate-bytecode",	generate_bytecode).
 long_option("generate-prolog",		generate_prolog).
@@ -911,7 +912,6 @@
 					reclaim_heap_on_semidet_failure).
 long_option("reclaim-heap-on-nondet-failure",
 					reclaim_heap_on_nondet_failure).
-long_option("call-trace-struct",	call_trace_struct).
 long_option("branch-delay-slot",	have_delay_slot).
 long_option("have-delay-slot",		have_delay_slot).
 long_option("num-real-r-regs",		num_real_r_regs).
@@ -1575,6 +1575,12 @@
 %		"--trace-decl",
 %		"\tMake the generated tracing code include support for an",
 %		"\texperimental declarative debugger.",
+		"--trace-just-in-case",
+		"\tGenerate code that supports execution tracing,",
+		"\tbut which is optimized to execute outside mdb.",
+		"\t(If tracing is enabled, the default is to generate code",
+		"\tthat optimizes execution speed inside mdb",
+		"\tat the expense of execution speed outside mdb.)",
 		"--stack-trace-higher-order",
 		"\tEnable stack traces through predicates and functions with",
 		"\thigher-order arguments, even if stack tracing is not",
@@ -1901,9 +1907,6 @@
 		"\tDon't reclaim heap on backtracking in semidet code.",
 		"--no-reclaim-heap-on-failure",
 		"\tCombines the effect of the two options above.",
-
-		"--call-trace-struct\t\t(This option is not for general use.)",
-		"\tPass information to the tracing system in one struct.",
 
 		"--cc <compiler-name>",
 		"\tSpecify which C compiler to use.",
Index: compiler/trace.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/trace.m,v
retrieving revision 1.25
diff -u -b -r1.25 trace.m
--- trace.m	1999/11/12 03:46:26	1.25
+++ trace.m	1999/11/12 06:56:34
@@ -608,10 +608,10 @@
 	SaveStmt = "\t\tsave_transient_registers();\n",
 	RestoreStmt = "\t\trestore_transient_registers();\n",
 	GotoStmt = "\t\tif (MR_jumpaddr != NULL) GOTO(MR_jumpaddr);",
-	globals__lookup_bool_option(Globals, call_trace_struct,
-		CallTraceStruct)
+	globals__lookup_bool_option(Globals, trace_just_in_case,
+		TraceJustInCase)
 	},
-	( { CallTraceStruct = yes } ->
+	( { TraceJustInCase = yes } ->
 		{ string__append_list([
 			"\t\tMR_jumpaddr = MR_trace_struct(\n",
 			"\t\t\t&mercury_data__tci__", LabelStr, ");\n"],
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.191
diff -u -b -r1.191 user_guide.texi
--- user_guide.texi	1999/11/04 07:35:22	1.191
+++ user_guide.texi	1999/11/12 06:56:51
@@ -2737,6 +2737,14 @@
 @c Make the generated tracing code include support
 @c for an experimental declarative debugger.
 
+ at sp 1
+ at item @code{--trace-just-in-case}
+Generate code that supports execution tracing,
+but which is optimized to execute outside mdb.
+(If tracing is enabled, the default is to generate code
+that optimizes execution speed inside mdb
+at the expense of execution speed outside mdb.)
+
 @item --stack-trace-higher-order
 Enable stack traces through predicates and functions with
 higher-order arguments, even if stack tracing is not
@@ -3238,11 +3246,6 @@
 @sp 1
 @item --no-reclaim-heap-on-failure
 Combines the effect of the two options above.
-
- at sp 1
- at item @code{--call-trace-struct}
-(This option is not intended for general use.)
-Pass information to the tracing system in one struct.
 
 @sp 1
 @item --cc @var{compiler-name}
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/clpr
cvs diff: Diffing extras/clpr/clpr
cvs diff: Diffing extras/clpr/samples
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
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/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/opium_m
cvs diff: Diffing extras/opium_m/non-regression-tests
cvs diff: Diffing extras/opium_m/scripts
cvs diff: Diffing extras/opium_m/source
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing profiler
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 scripts
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/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
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 trial
cvs diff: Diffing util
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list