[m-rev.] for review: delete trace level decl

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun Sep 29 20:30:13 AEST 2002


The original diff had some minor problems not picked up by the review,
which I have since fixed. Here is the updated log message and diff.

Zoltan.

Delete trace level decl, since there was only a very small distinction
left between it and trace level deep, to wit, you could suppress events
in trace level deep but not in trace level decl. Implement the relevant
test more precisely by checking whether any event types *were* suppressed,
as opposed to whether they *could have been* suppressed.

Preserve the user interface by making --trace decl a synonym for --trace rep.

compiler/layout.m:
	Include an integer encoding the set of suppressed event types in the
	module layout structures.

compiler/trace_params.m:
	Add a function for computing this encoded integer.

	Delete trace level decl.

compiler/stack_layout.m:
	Call that function when creating module layouts.

compiler/layout_out.m:
compiler/llds_out.m:
compiler/llds_common.m:
	Handle the extra field in module layouts.

doc/user_guide.texi:
	Delete or comment out all mentions of --trace decl and decldebug
	grades.

runtime/mercury_trace_base.h:
	Update the list of places that know about the set of events.

runtime/mercury_stack_layout.h:
	Delete trace level decl.

	Include an integer encoding the set of suppressed event types in the
	module layout structures.

trace/mercury_trace_declarative.c:
	Accept trace level deep without any suppressed event types as
	sufficient to enable declarative debugging.

tests/debugger/declarative/Mercury.options:
	Now that trace level deep is sufficient for declarative debugging,
	suppress the event types that weren't part of the old trace level deep,
	in order to elicit the warning message we are testing.

tests/debugger/declarative/deep_warning.exp:
	Update the text of the warning message.

cvs diff: Diffing .
cvs diff: Diffing bench
cvs diff: Diffing bench/progs
cvs diff: Diffing bench/progs/compress
cvs diff: Diffing bench/progs/icfp2000
cvs diff: Diffing bench/progs/icfp2001
cvs diff: Diffing bench/progs/nuc
cvs diff: Diffing bench/progs/ray
cvs diff: Diffing bench/progs/tree234
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/layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/layout.m,v
retrieving revision 1.8
diff -u -b -r1.8 layout.m
--- compiler/layout.m	30 Aug 2002 07:22:37 -0000	1.8
+++ compiler/layout.m	26 Sep 2002 23:44:29 -0000
@@ -56,7 +56,8 @@
 			string_table		:: string,
 			proc_layout_names	:: list(layout_name),
 			file_layouts		:: list(file_layout_data),
-			trace_level		:: trace_level
+			trace_level		:: trace_level,
+			suppressed_events	:: int
 		)
 	;	closure_proc_id_data(		% defines MR_Closure_Id
 			caller_proc_label	:: proc_label,
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.15
diff -u -b -r1.15 layout_out.m
--- compiler/layout_out.m	30 Aug 2002 07:22:37 -0000	1.15
+++ compiler/layout_out.m	27 Sep 2002 00:06:12 -0000
@@ -98,11 +98,11 @@
 	output_closure_proc_id_data_defn(CallerProcLabel, SeqNo, ProcLabel,
 		ModuleName, FileName, LineNumber, GoalPath, DeclSet0, DeclSet).
 output_layout_data_defn(module_layout_data(ModuleName, StringTableSize,
-		StringTable, ProcLayoutNames, FileLayouts, TraceLevel),
-		DeclSet0, DeclSet) -->
+		StringTable, ProcLayoutNames, FileLayouts, TraceLevel,
+		SuppressedEvents), DeclSet0, DeclSet) -->
 	output_module_layout_data_defn(ModuleName, StringTableSize,
 		StringTable, ProcLayoutNames, FileLayouts, TraceLevel,
-		DeclSet0, DeclSet).
+		SuppressedEvents, DeclSet0, DeclSet).
 output_layout_data_defn(proc_static_data(RttiProcLabel, FileName, LineNumber,
 		IsInInterface, CallSites), DeclSet0, DeclSet) -->
 	output_proc_static_data_defn(RttiProcLabel, FileName, LineNumber,
@@ -146,7 +146,7 @@
 extract_layout_name(closure_proc_id_data(CallerProcLabel, SeqNo,
 		ClosureProcLabel, _, _, _, _),
 		closure_proc_id(CallerProcLabel, SeqNo, ClosureProcLabel)).
-extract_layout_name(module_layout_data(ModuleName, _,_,_,_,_), LayoutName) :-
+extract_layout_name(module_layout_data(ModuleName, _,_,_,_,_,_), LayoutName) :-
 	LayoutName = module_layout(ModuleName).
 extract_layout_name(proc_static_data(RttiProcLabel, _, _, _, _), LayoutName) :-
 	LayoutName = proc_static(RttiProcLabel).
@@ -884,12 +884,12 @@
 
 :- pred output_module_layout_data_defn(module_name::in, int::in,
 	string::in, list(layout_name)::in, list(file_layout_data)::in,
-	trace_level::in, decl_set::in, decl_set::out,
+	trace_level::in, int::in, decl_set::in, decl_set::out,
 	io__state::di, io__state::uo) is det.
 
 output_module_layout_data_defn(ModuleName, StringTableSize, StringTable,
-		ProcLayoutNames, FileLayouts, TraceLevel, DeclSet0, DeclSet)
-		-->
+		ProcLayoutNames, FileLayouts, TraceLevel, SuppressedEvents,
+		DeclSet0, DeclSet) -->
 	output_module_string_table(ModuleName, StringTableSize, StringTable,
 		DeclSet0, DeclSet1),
 	output_module_layout_proc_vector_defn(ModuleName, ProcLayoutNames,
@@ -922,6 +922,8 @@
 	output_layout_name(FileVectorName),
 	io__write_string(",\n\t"),
 	io__write_string(trace_level_rep(TraceLevel)),
+	io__write_string(",\n\t"),
+	io__write_int(SuppressedEvents),
 	io__write_string("\n};\n"),
 	{ decl_set_insert(DeclSet4, data_addr(layout_addr(ModuleLayoutName)),
 		DeclSet) }.
Index: compiler/llds_common.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds_common.m,v
retrieving revision 1.44
diff -u -b -r1.44 llds_common.m
--- compiler/llds_common.m	30 Aug 2002 07:22:38 -0000	1.44
+++ compiler/llds_common.m	27 Sep 2002 01:56:23 -0000
@@ -186,7 +186,7 @@
 	LayoutData0 = closure_proc_id_data(_, _, _, _, _, _, _),
 	LayoutData = LayoutData0.
 llds_common__process_layout_data(LayoutData0, LayoutData, Info, Info) :-
-	LayoutData0 = module_layout_data(_, _, _, _, _, _),
+	LayoutData0 = module_layout_data(_, _, _, _, _, _, _),
 	LayoutData = LayoutData0.
 llds_common__process_layout_data(LayoutData0, LayoutData, Info, Info) :-
 	LayoutData0 = proc_static_data(_, _, _, _, _),
Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.200
diff -u -b -r1.200 llds_out.m
--- compiler/llds_out.m	9 Sep 2002 07:42:25 -0000	1.200
+++ compiler/llds_out.m	27 Sep 2002 01:59:20 -0000
@@ -769,7 +769,7 @@
 output_debugger_init_list_decls([Data | Datas], DeclSet0, DeclSet) -->
 	(
 		{ Data = layout_data(LayoutData) },
-		{ LayoutData = module_layout_data(ModuleName, _, _, _, _, _) }
+		{ LayoutData = module_layout_data(ModuleName, _,_,_,_,_,_) }
 	->
 		output_data_addr_decls(layout_addr(module_layout(ModuleName)),
 			"", "", 0, _, DeclSet0, DeclSet1)
@@ -789,7 +789,7 @@
 output_debugger_init_list([Data | Datas]) -->
 	(
 		{ Data = layout_data(LayoutData) },
-		{ LayoutData = module_layout_data(ModuleName, _, _, _, _, _) }
+		{ LayoutData = module_layout_data(ModuleName, _,_,_,_,_,_) }
 	->
 		io__write_string("\tif (MR_register_module_layout != NULL) {\n"),
 		io__write_string("\t\t(*MR_register_module_layout)("),
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.71
diff -u -b -r1.71 stack_layout.m
--- compiler/stack_layout.m	30 Aug 2002 07:22:38 -0000	1.71
+++ compiler/stack_layout.m	27 Sep 2002 00:10:37 -0000
@@ -78,6 +78,7 @@
 	globals__lookup_bool_option(Globals, procid_stack_layout,
 		ProcIdLayout),
 	globals__get_trace_level(Globals, TraceLevel),
+	globals__get_trace_suppress(Globals, TraceSuppress),
 	globals__have_static_code_addresses(Globals, StaticCodeAddr),
 	map__init(LayoutLabels0),
 
@@ -121,9 +122,10 @@
 		),
 		stack_layout__format_label_tables(EffLabelTables,
 			SourceFileLayouts),
+		SuppressedEvents = encode_suppressed_events(TraceSuppress),
 		ModuleLayout = layout_data(module_layout_data(ModuleName,
 			StringOffset, ConcatStrings, ProcLayoutNames,
-			SourceFileLayouts, TraceLevel)),
+			SourceFileLayouts, TraceLevel, SuppressedEvents)),
 		StaticLayouts = [ModuleLayout | StaticLayouts0]
 	;
 		StaticLayouts = StaticLayouts0
Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.12
diff -u -b -r1.12 trace_params.m
--- compiler/trace_params.m	9 Sep 2002 08:54:10 -0000	1.12
+++ compiler/trace_params.m	27 Sep 2002 08:22:13 -0000
@@ -92,15 +92,16 @@
 	% This is used to represent the trace level in the module layout.
 :- func trace_level_rep(trace_level) = string.
 
+:- func encode_suppressed_events(trace_suppress_items) = int.
+
 :- implementation.
 
-:- import_module char, string, list, set.
+:- import_module int, char, string, list, set.
 
 :- type trace_level
 	--->	none
 	;	shallow
 	;	deep
-	;	decl
 	;	decl_rep.
 
 :- type trace_suppress_item
@@ -115,16 +116,16 @@
 
 convert_trace_level("minimum", no,  no,  yes(none)).
 convert_trace_level("minimum", yes, no,  yes(shallow)).
-convert_trace_level("minimum", _,   yes, yes(decl)).
+convert_trace_level("minimum", _,   yes, yes(deep)).
 convert_trace_level("shallow", _,   no,  yes(shallow)).
 convert_trace_level("shallow", _,   yes, no).
 convert_trace_level("deep",    _,   no,  yes(deep)).
 convert_trace_level("deep",    _,   yes, no).
-convert_trace_level("decl",    _,   _,   yes(decl)).
+convert_trace_level("decl",    _,   _,   yes(deep)).
 convert_trace_level("rep",     _,   _,   yes(decl_rep)).
 convert_trace_level("default", no,  no,  yes(none)).
 convert_trace_level("default", yes, no,  yes(deep)).
-convert_trace_level("default", _,   yes, yes(decl)).
+convert_trace_level("default", _,   yes, yes(deep)).
 
 eff_trace_level(PredInfo, ProcInfo, TraceLevel) = EffTraceLevel :-
 	(
@@ -176,37 +177,31 @@
 trace_level_is_none(none) = yes.
 trace_level_is_none(shallow) = no.
 trace_level_is_none(deep) = no.
-trace_level_is_none(decl) = no.
 trace_level_is_none(decl_rep) = no.
 
 trace_level_needs_input_vars(none) = no.
 trace_level_needs_input_vars(shallow) = yes.
 trace_level_needs_input_vars(deep) = yes.
-trace_level_needs_input_vars(decl) = yes.
 trace_level_needs_input_vars(decl_rep) = yes.
 
 trace_level_needs_fixed_slots(none) = no.
 trace_level_needs_fixed_slots(shallow) = yes.
 trace_level_needs_fixed_slots(deep) = yes.
-trace_level_needs_fixed_slots(decl) = yes.
 trace_level_needs_fixed_slots(decl_rep) = yes.
 
 trace_level_needs_from_full_slot(none) = no.
 trace_level_needs_from_full_slot(shallow) = yes.
 trace_level_needs_from_full_slot(deep) = no.
-trace_level_needs_from_full_slot(decl) = no.
 trace_level_needs_from_full_slot(decl_rep) = no.
 
 trace_level_allows_delay_death(none) = no.
 trace_level_allows_delay_death(shallow) = no.
 trace_level_allows_delay_death(deep) = yes.
-trace_level_allows_delay_death(decl) = yes.
 trace_level_allows_delay_death(decl_rep) = yes.
 
 trace_level_needs_meaningful_var_names(none) = no.
 trace_level_needs_meaningful_var_names(shallow) = no.
 trace_level_needs_meaningful_var_names(deep) = yes.
-trace_level_needs_meaningful_var_names(decl) = yes.
 trace_level_needs_meaningful_var_names(decl_rep) = yes.
 
 trace_needs_return_info(TraceLevel, TraceSuppressItems) = Need :-
@@ -246,19 +241,16 @@
 trace_level_has_return_info(none) = no.
 trace_level_has_return_info(shallow) = yes.
 trace_level_has_return_info(deep) = yes.
-trace_level_has_return_info(decl) = yes.
 trace_level_has_return_info(decl_rep) = yes.
 
 trace_level_has_all_var_names(none) = no.
 trace_level_has_all_var_names(shallow) = no.
 trace_level_has_all_var_names(deep) = no.
-trace_level_has_all_var_names(decl) = yes.
 trace_level_has_all_var_names(decl_rep) = yes.
 
 trace_level_has_proc_body_reps(none) = no.
 trace_level_has_proc_body_reps(shallow) = no.
 trace_level_has_proc_body_reps(deep) = no.
-trace_level_has_proc_body_reps(decl) = no.
 trace_level_has_proc_body_reps(decl_rep) = yes.
 
 convert_trace_suppress(SuppressString, SuppressItemSet) :-
@@ -346,7 +338,6 @@
 trace_level_rep(none)	  = "MR_TRACE_LEVEL_NONE".
 trace_level_rep(shallow)  = "MR_TRACE_LEVEL_SHALLOW".
 trace_level_rep(deep)	  = "MR_TRACE_LEVEL_DEEP".
-trace_level_rep(decl)	  = "MR_TRACE_LEVEL_DECL".
 trace_level_rep(decl_rep) = "MR_TRACE_LEVEL_DECL_REP".
 
 %-----------------------------------------------------------------------------%
@@ -384,7 +375,6 @@
 trace_level_port_categories(none) = [].
 trace_level_port_categories(shallow) = [interface].
 trace_level_port_categories(deep) = [interface, internal, context].
-trace_level_port_categories(decl) = [interface, internal, context].
 trace_level_port_categories(decl_rep) = [interface, internal, context].
 
 :- func trace_level_allows_port_suppression(trace_level) = bool.
@@ -392,7 +382,6 @@
 trace_level_allows_port_suppression(none) = no.		% no ports exist
 trace_level_allows_port_suppression(shallow) = yes.
 trace_level_allows_port_suppression(deep) = yes.
-trace_level_allows_port_suppression(decl) = no.
 trace_level_allows_port_suppression(decl_rep) = no.
 
 trace_needs_port(TraceLevel, TraceSuppressItems, Port) = NeedsPort :-
@@ -409,3 +398,37 @@
 	;
 		NeedsPort = no
 	).
+
+encode_suppressed_events(SuppressedEvents) = SuppressedEventsInt :-
+	set__fold(maybe_add_suppressed_event, SuppressedEvents,
+		0, SuppressedEventsInt).
+
+:- pred maybe_add_suppressed_event(trace_suppress_item::in, int::in, int::out)
+	is det.
+
+maybe_add_suppressed_event(SuppressItem, SuppressedEventsInt0,
+		SuppressedEventsInt) :-
+	( SuppressItem = port(Port) ->
+		SuppressedEventsInt = SuppressedEventsInt0 \/
+			(1 << port_number(Port))
+	;
+		SuppressedEventsInt = SuppressedEventsInt0
+	).
+
+:- func port_number(trace_port) = int.
+
+port_number(call) = 1.
+port_number(exit) = 2.
+port_number(redo) = 3.
+port_number(fail) = 4.
+port_number(exception) = 5.
+port_number(ite_cond) = 6.
+port_number(ite_then) = 7.
+port_number(ite_else) = 8.
+port_number(neg_enter) = 9.
+port_number(neg_success) = 10.
+port_number(neg_failure) = 11.
+port_number(disj) = 12.
+port_number(switch) = 13.
+port_number(nondet_pragma_first) = 14.
+port_number(nondet_pragma_later) = 15.
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.327
diff -u -b -r1.327 user_guide.texi
--- doc/user_guide.texi	19 Sep 2002 13:59:04 -0000	1.327
+++ doc/user_guide.texi	27 Sep 2002 08:23:57 -0000
@@ -1175,9 +1175,13 @@
 To use the debugger, you must
 first compile your program with debugging enabled.
 You can do this by using
-one of the @samp{--debug} and @samp{--decl-debug} options
+ at c XXX .decldebug isn't usefull different from .debug
+ at c one of the @samp{--debug} and @samp{--decl-debug} options
+the @samp{--debug} option
 when invoking @samp{mmc},
-or by including @samp{GRADEFLAGS = --debug} or @samp{GRADEFLAGS = --decl-debug}
+or by including @samp{GRADEFLAGS = --debug}
+ at c XXX .decldebug isn't usefull different from .debug
+ at c or @samp{GRADEFLAGS = --decl-debug}
 in your @file{Mmakefile}.
 
 @findex --debug
@@ -1607,8 +1611,11 @@
 The simpler way is to compile a program in a debugging grade,
 which you can do directly by specifying a grade
 that includes the word ``debug'' (e.g.@: @samp{asm_fast.gc.debug}),
-or indirectly by specifying one of the @samp{--debug} or @samp{--decl-debug}
-grade options to the compiler, linker, and other tools
+ at c XXX .decldebug isn't usefull different from .debug
+ at c or indirectly by specifying one of the @samp{--debug} or @samp{--decl-debug}
+ at c grade options to the compiler, linker, and other tools
+or indirectly by specifying the @samp{--debug}
+grade option to the compiler, linker, and other tools
 (in particular @code{mmc}, @code{mgnuc}, @code{ml}, and @code{c2init}).
 If you follow this way,
 and accept the default settings of the various compiler options
@@ -1625,8 +1632,8 @@
 to prepare a program for debugging,
 one that does not require the use of a debugging grade.
 With this way, you can decide, individually for each module,
-which of five trace levels,
- at samp{none}, @samp{shallow}, @samp{deep}, @samp{decl} and @samp{rep}
+which of four trace levels,
+ at samp{none}, @samp{shallow}, @samp{deep}, and @samp{rep}
 you want to compile them with:
 
 @cindex debugger trace level
@@ -1640,27 +1647,20 @@
 @item deep
 A procedure compiled with trace level @samp{deep}
 will always generate all the events requested by the user.
-By default, this is all the usual events,
+By default, this is all possible events,
 but you can tell the compiler that
 you are not interested in some kinds of events
 via compiler options (see below).
- at item decl
-A procedure compiled with trace level @samp{decl}
-will always generate all possible events,
-including all the events generated at trace level @samp{deep}
-as well as other events which describe
-the entry into and exit from negations.
-These events are required for the declarative debugging feature
-to operate properly,
-so the @samp{dd} command will only be available under @samp{mdb}
-at trace levels that generate all events,
-i.e. at trace levels decl and rep.
+However, declarative debugging requires all events to be generated
+if it is to operate properly,
+so do not disable the generation of any event types
+if you want to use declarative debugging.
 For more details see @ref{Declarative debugging}.
 @item rep
-This trace level is the same as trace level @samp{decl},
+This trace level is the same as trace level @samp{deep},
 except that a representation of the module is stored in the executable
 along with the usual debugging information.
-The declarative debugger is able to use this extra information
+The declarative debugger can use this extra information
 to help it avoid asking unnecessary questions,
 so this trace level has the effect of better declarative debugging
 at the cost of increased executable size.
@@ -1689,10 +1689,6 @@
 if you suspect there may be a bug in the module,
 or if you think that being able to examine what happens inside that module
 can help you locate a bug.
- at item decl
-You should compile a module with trace level @samp{decl}
-if you suspect there may be a bug in the module,
-and you wish to use the declarative debugger to help locate it.
 @item rep
 You should compile a module with trace level @samp{rep}
 if you suspect there may be a bug in the module,
@@ -1713,7 +1709,7 @@
 
 In general, it is a good idea for most or all modules
 that can be called from modules compiled with trace level
- at samp{deep}, @samp{decl} or @samp{rep}
+ at samp{deep} or @samp{rep}
 to be compiled with at least trace level @samp{shallow}.
 
 You can control what trace level a module is compiled with
@@ -1724,8 +1720,6 @@
 This always sets the trace level to @samp{shallow}.
 @item --trace deep
 This always sets the trace level to @samp{deep}.
- at item --trace decl
-This always sets the trace level to @samp{decl}.
 @item --trace rep
 This always sets the trace level to @samp{rep}.
 @item --trace minimum
@@ -4847,8 +4841,9 @@
 @item @samp{.debug}
 @code{--debug}.
 
- at item @samp{.decldebug}
- at code{--decl-debug}.
+ at c XXX .decldebug isn't usefull different from .debug
+ at c @item @samp{.decldebug}
+ at c @code{--decl-debug}.
 
 @end table
 
@@ -4977,14 +4972,16 @@
 that allow the program to be debugged with @samp{mdb} (see @ref{Debugging}).
 This option is not yet supported for the @samp{--high-level-code} back-ends.
 
- at sp 1
- at item @code{--decl-debug} (grades: any grade containing @samp{.decldebug})
- at findex --decl-debug
- at cindex Debugging
-Enables the inclusion in the executable of code and data structures
-that allow the program to be debugged
-with the declarative debugging facilities of @samp{mdb} (see @ref{Debugging}).
-This option is not yet supported for the @samp{--high-level-code} back-ends.
+ at c XXX .decldebug isn't usefull different from .debug
+ at c @sp 1
+ at c @item @code{--decl-debug} (grades: any grade containing @samp{.decldebug})
+ at c @findex --decl-debug
+ at c @cindex Debugging
+ at c Enables the inclusion in the executable of code and data structures
+ at c that allow the program to be debugged
+ at c with the declarative debugging facilities of @samp{mdb}
+ at c (see @ref{Debugging}).
+ at c This option is not yet supported for the @samp{--high-level-code} back-ends.
 
 @sp 1
 @item @code{--profiling}, @code{--time-profiling} (grades: any grade containing @samp{.prof})
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/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/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
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 java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_stack_layout.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_layout.h,v
retrieving revision 1.62
diff -u -b -r1.62 mercury_stack_layout.h
--- runtime/mercury_stack_layout.h	30 Aug 2002 07:24:49 -0000	1.62
+++ runtime/mercury_stack_layout.h	27 Sep 2002 08:18:24 -0000
@@ -892,13 +892,17 @@
 ** The MR_ml_trace_level field gives the trace level that the module was
 ** compiled with.  If the MR_Trace_Level enum is modified, then the
 ** corresponding function in compiler/trace_params.m must also be updated.
+**
+** The MR_ml_suppressed_events events field encodes the set of event types
+** (ports) that were suppressed when generating code for this module. The bit
+** given by the expression (1 << MR_PORT_XXX) will be set in this integer
+** iff trace port MR_PORT_XXX is suppressed.
 */
 
 typedef enum {
 	MR_DEFINE_MERCURY_ENUM_CONST(MR_TRACE_LEVEL_NONE),
 	MR_DEFINE_MERCURY_ENUM_CONST(MR_TRACE_LEVEL_SHALLOW),
 	MR_DEFINE_MERCURY_ENUM_CONST(MR_TRACE_LEVEL_DEEP),
-	MR_DEFINE_MERCURY_ENUM_CONST(MR_TRACE_LEVEL_DECL),
 	MR_DEFINE_MERCURY_ENUM_CONST(MR_TRACE_LEVEL_DECL_REP)
 } MR_Trace_Level;
 
@@ -919,6 +923,7 @@
 	MR_Integer			MR_ml_filename_count;
 	const MR_Module_File_Layout	**MR_ml_module_file_layout;
 	MR_Trace_Level			MR_ml_trace_level;
+	MR_int_least32_t		MR_ml_suppressed_events;
 };
 
 /*-------------------------------------------------------------------------*/
Index: runtime/mercury_trace_base.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_trace_base.h,v
retrieving revision 1.27
diff -u -b -r1.27 mercury_trace_base.h
--- runtime/mercury_trace_base.h	11 Sep 2002 07:20:28 -0000	1.27
+++ runtime/mercury_trace_base.h	27 Sep 2002 00:00:37 -0000
@@ -25,9 +25,10 @@
 
 /*
 ** This enum should EXACTLY match the definition of the `trace_port_type'
-** type in browser/util.m, the definition of the predicates
-** `llds_out__trace_port_to_{int,string}', and the port names list
-** in the C source file of this module (mercury_trace_base.c).
+** type in browser/util.m, the definition of the predicate
+** `layout_out__trace_port_to_string' and the function
+** `stack_layout__port_number', and the port names list
+** in the C source file of this module (mercury_trace_base.c),
 */
 
 typedef	enum {
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
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
Index: tests/debugger/declarative/Mercury.options
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/Mercury.options,v
retrieving revision 1.3
diff -u -b -r1.3 Mercury.options
--- tests/debugger/declarative/Mercury.options	9 Sep 2002 08:55:19 -0000	1.3
+++ tests/debugger/declarative/Mercury.options	27 Sep 2002 14:20:50 -0000
@@ -1,5 +1,5 @@
 
-MCFLAGS-deep_sub=--trace deep
+MCFLAGS-deep_sub=--trace deep --suppress-trace context
 MCFLAGS-dependency=--trace rep
 MCFLAGS-dependency2=--trace rep
 MCFLAGS-input_term_dep=--trace rep
Index: tests/debugger/declarative/deep_warning.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/deep_warning.exp,v
retrieving revision 1.1
diff -u -b -r1.1 deep_warning.exp
--- tests/debugger/declarative/deep_warning.exp	10 Nov 2000 01:01:01 -0000	1.1
+++ tests/debugger/declarative/deep_warning.exp	27 Sep 2002 14:23:53 -0000
@@ -28,6 +28,6 @@
 mdb> finish
        7:      3  3 EXIT pred deep_sub:q/1-0 (multi) deep_sub.m:5 (deep_warning.m:29)
 mdb> dd
-mdb: cannot start declarative debugging, because this procedure was not
-compiled with trace level `decl'.
+mdb: cannot start declarative debugging, because some event types were
+suppressed when this procedure was compiled.
 mdb> quit -y
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/structure_reuse
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/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
Index: trace/mercury_trace_declarative.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_declarative.c,v
retrieving revision 1.56
diff -u -b -r1.56 mercury_trace_declarative.c
--- trace/mercury_trace_declarative.c	5 Aug 2002 21:46:18 -0000	1.56
+++ trace/mercury_trace_declarative.c	27 Sep 2002 08:47:16 -0000
@@ -239,7 +239,7 @@
 	MR_Unsigned		depth;
 	MR_Trace_Node		trace;
 	MR_Event_Details	event_details;
-	MR_Trace_Level		trace_level;
+	MR_Integer		trace_suppress;
 
 	entry = event_info->MR_event_sll->MR_sll_entry;
 	depth = event_info->MR_call_depth;
@@ -301,8 +301,8 @@
 		return NULL;
 	}
 
-	trace_level = entry->MR_sle_module_layout->MR_ml_trace_level;
-	if (trace_level == MR_TRACE_LEVEL_DEEP) {
+	trace_suppress = entry->MR_sle_module_layout->MR_ml_suppressed_events;
+	if (trace_suppress != 0) {
 		/*
 		** We ignore events from modules that were not compiled
 		** with the necessary information.  Procedures in those
@@ -1070,7 +1070,8 @@
 	entry = event_info->MR_event_sll->MR_sll_entry;
 	if (!MR_PROC_LAYOUT_HAS_EXEC_TRACE(entry)) {
 		fflush(MR_mdb_out);
-		fprintf(MR_mdb_err, "mdb: cannot start declarative debugging, "
+		fprintf(MR_mdb_err,
+			"mdb: cannot start declarative debugging, "
 				"because this procedure was not\n"
 				"compiled with execution tracing enabled.\n");
 		return MR_FALSE;
@@ -1078,19 +1079,30 @@
 
 	if (MR_PROC_LAYOUT_COMPILER_GENERATED(entry)) {
 		fflush(MR_mdb_out);
-		fprintf(MR_mdb_err, "mdb: cannot start declarative debugging "
+		fprintf(MR_mdb_err,
+			"mdb: cannot start declarative debugging "
 				"at compiler generated procedures.\n");
 		return MR_FALSE;
 	}
 
 	trace_level = entry->MR_sle_module_layout->MR_ml_trace_level;
-	if (trace_level != MR_TRACE_LEVEL_DECL &&
-		trace_level != MR_TRACE_LEVEL_DECL_REP)
+	if (trace_level != MR_TRACE_LEVEL_DEEP
+		&& trace_level != MR_TRACE_LEVEL_DECL_REP)
 	{
 		fflush(MR_mdb_out);
-		fprintf(MR_mdb_err, "mdb: cannot start declarative debugging, "
+		fprintf(MR_mdb_err,
+			"mdb: cannot start declarative debugging, "
 				"because this procedure was not\n"
-				"compiled with trace level `decl'.\n");
+			"compiled with trace level `deep' or `rep'.\n");
+		return MR_FALSE;
+	}
+
+	if (entry->MR_sle_module_layout->MR_ml_suppressed_events != 0) {
+		fflush(MR_mdb_out);
+		fprintf(MR_mdb_err,
+			"mdb: cannot start declarative debugging, "
+			"because some event types were\n"
+			"suppressed when this procedure was compiled.\n");
 		return MR_FALSE;
 	}
 
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