[m-rev.] for review: disable tracing for slice tools
Ian MacLarty
maclarty at csse.unimelb.edu.au
Thu Oct 5 16:36:00 AEST 2006
For review by Zoltan.
Notes:
* This diff allows "tools/bootcheck --coverage-test" to build stage 2
with the stage 1 compiler built in grade asm_fast.gc.decldebug.
(stage 3 is still being built).
* I didn't need to disable tracing for any library modules.
Disabling tracing for the mdbcomp modules was sufficient.
Questions:
* Do we still need to copy the slice directory when building stage 2?
I'm guessing that the reason it was copied was to test that it could
be built with the workspace compiler (since the stage 1 slice directory
was built with the installed compiler). If this is the case is it
now okay to not copy the stage 2 slice directory in the bootcheck
script when coverage testing?
Estimated hours taken: 1
Branches: main
Copy the mdbcomp modules used by the slice tools to the slice
directory before building the slice tools.
Disable tracing for all modules in the slice directory so that mtc_union
doesn't blow its stack when called during coverage testing of the compiler.
slice/Mmakefile:
Copy mdbcomp modules to the slice directory before building
the slice tools.
slice/SLICE_FLAGS.in:
Add --force-disable-tracing.
tools/bootcheck:
Copy SLICE_FLAGS.in to the stage 2 slice directory.
Index: slice/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/slice/Mmakefile,v
retrieving revision 1.7
diff -u -r1.7 Mmakefile
--- slice/Mmakefile 2 Oct 2006 08:15:46 -0000 1.7
+++ slice/Mmakefile 4 Oct 2006 23:46:48 -0000
@@ -30,7 +30,19 @@
INT3S = $(patsubst %,%.int3s,$(MERCURY_MAIN_MODULES))
CHECKS = $(patsubst %,%.check,$(MERCURY_MAIN_MODULES))
-VPATH = $(MDBCOMP_DIR) $(LIBRARY_DIR)
+VPATH = $(LIBRARY_DIR)
+
+#-----------------------------------------------------------------------------#
+
+MDBCOMP_MODULES = \
+ mdbcomp.m \
+ prim_data.m \
+ program_representation.m \
+ rtti_access.m \
+ slice_and_dice.m \
+ trace_counts.m
+
+MDBCOMP_ORIG_MODULES = $(patsubst %,$(MDBCOMP_DIR)/%,$(MDBCOMP_MODULES))
#-----------------------------------------------------------------------------#
@@ -40,12 +52,25 @@
#-----------------------------------------------------------------------------#
.PHONY: depend
-depend: $(DEPENDS)
+depend: $(MDBCOMP_MODULES) $(DEPENDS)
$(DEPENDS): SLICE_FLAGS
.PHONY: all
-all: $(MERCURY_MAIN_MODULES) $(TAGS_FILE_EXISTS)
+all: $(MDBCOMP_MODULES) $(MERCURY_MAIN_MODULES) $(TAGS_FILE_EXISTS)
+
+#-----------------------------------------------------------------------------#
+# We need to start by turning write permission on for each copied file
+# in case some exist, but we need to ignore errors in case some don't exist.
+# The exit 0 is to prevent make itself from printing a message about the
+# (ignored) failure of an action.
+#
+# We could modify the action here to copy only the changed files.
+
+$(MDBCOMP_MODULES): $(MDBCOMP_ORIG_MODULES)
+ - at chmod a+w $(MDBCOMP_MODULES) > /dev/null 2>&1; exit 0
+ cp $(MDBCOMP_ORIG_MODULES) .
+ @chmod a-w $(MDBCOMP_MODULES)
#-----------------------------------------------------------------------------#
Index: slice/SLICE_FLAGS.in
===================================================================
RCS file: /home/mercury1/repository/mercury/slice/SLICE_FLAGS.in,v
retrieving revision 1.4
diff -u -r1.4 SLICE_FLAGS.in
--- slice/SLICE_FLAGS.in 2 Oct 2006 06:30:36 -0000 1.4
+++ slice/SLICE_FLAGS.in 4 Oct 2006 06:31:13 -0000
@@ -17,3 +17,4 @@
--c-include-directory ../browser/Mercury/mihs
--c-include-directory ../trace
--config-file ../scripts/Mercury.config.bootstrap
+--force-disable-tracing
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.186
diff -u -r1.186 bootcheck
--- tools/bootcheck 2 Oct 2006 05:21:43 -0000 1.186
+++ tools/bootcheck 4 Oct 2006 23:53:56 -0000
@@ -762,6 +762,7 @@
cd slice
$LN_S $root/slice/*.m .
cp $root/slice/Mmake* $root/slice/Mercury.options .
+ cp $root/slice/*_FLAGS.in .
cd $root/$stage2dir
else
$LN_S $root/slice .
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list