[m-dev.] for review: trace executable sizes

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


I would like to commit this together with the diff enabling the use of
line numbers, because both changes introduce an incompatibility. This means
that both work only if the compiler that generates a traced object file and
the runtime system the traced object file is linked with agree on whether
the change has been applied.

When these changes are installed, you will need to recompile all modules
whose object files are traced.

Note that the incompatibilities affect only traced object files; nontraced
object files are not affected.

Estimated hours taken: 0.2

Reduce the size of traced executables slightly.

runtime/mercury_stack_layout.h:
	Change the type of three fields of proc layouts from MR_int_least16_t
	MR_int_least8_t, since all three are the numbers of initially allocated
	stack slots. They are thus guaranteed to be less than 10, and thus
	fit into 8 bits with plenty to spare.

compiler/stack_layout.m:
	Make the corresponding change when generating proc layouts.

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/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.36
diff -u -b -r1.36 stack_layout.m
--- stack_layout.m	1999/10/19 04:11:34	1.36
+++ stack_layout.m	1999/11/12 08:05:36
@@ -72,13 +72,13 @@
 %				layout structure of the call event
 %	module layout		(MR_Module_Layout *) - points to the layout
 %				struct of the containing module.
-%	maybe from full		(int_least16_t) - number of the stack slot of
+%	maybe from full		(int_least8_t) - number of the stack slot of
 %				the from_full flag, if the procedure is
 %				shallow traced
-%	maybe decl debug	(int_least16_t) - number of the first of two
+%	maybe decl debug	(int_least8_t) - number of the first of two
 %				stack slots used by the declarative debugger,
 %				if --trace-decl is set
-%	maybe trail		(int_least16_t) - number of the first of two
+%	maybe trail		(int_least8_t) - number of the first of two
 %				stack slots used for recording the state of
 %				the trail, if trailing is enabled
 %
@@ -501,7 +501,7 @@
 		),
 		Rvals = [CallRval, ModuleRval,
 			FromFullRval, DeclRval, TrailRval],
-		ArgTypes = initial([2 - yes(data_ptr), 3 - yes(int_least16)],
+		ArgTypes = initial([2 - yes(data_ptr), 3 - yes(int_least8)],
 			none)
 	;
 		% Indicate the absence of the trace layout fields.
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
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/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 lp_solve
cvs diff: Diffing profiler
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.29
diff -u -b -r1.29 mercury_stack_layout.h
--- mercury_stack_layout.h	1999/10/18 06:53:47	1.29
+++ mercury_stack_layout.h	1999/11/12 08:04:38
@@ -366,9 +366,9 @@
 				*MR_sle_call_label;
 	struct MR_Module_Layout_Struct
 				*MR_sle_module_layout;
-	MR_int_least16_t	MR_sle_maybe_from_full;
-	MR_int_least16_t	MR_sle_maybe_decl_debug;
-	MR_int_least16_t	MR_sle_maybe_trail;
+	MR_int_least8_t		MR_sle_maybe_from_full;
+	MR_int_least8_t		MR_sle_maybe_decl_debug;
+	MR_int_least8_t		MR_sle_maybe_trail;
 } MR_Stack_Layout_Entry;
 
 #define	MR_sle_user	MR_sle_proc_id.MR_proc_user
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