The main objective of this change is to get bootchecks in the csharp
and java grades to actually build the slice, profiler, deep_profiler
and mfilterjavac directories, which (due to the bug this diff fixes)
they weren't doing before.
However, since one side effect of this change is to eliminate
one source of annoying warnings from mmake about references to undefined
variables, a subsidiary objective is to eliminate other sources of such
warnings as well, which mostly come from the rules for making tags files.
browser/Mmakefile:
deep_profiler/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
ssdb/Mmakefile:
When creating stage 3, the bootcheck builds, in each directory,
only the files that it wants to compare against their stage 2 versions.
This means that it wants to build all the .c, .cs or .java files,
which it does via the cs, css and javas mmake targets.
The correct definitions of the rules of these targets depends on
whether mmc --make is being used or not, so we need at least two
sets of definitions: one for mmc --make, and for no mmc --make,
and conditionally selecting the appropriate one. The latter definition
has the problem that it refers to mmake variables that are intended
to be defined in .dv files created by mmc --generate-dependencies,
but until that has been run, those mmake variables are undefined.
Until now, the only directories that had both the mmc --make
and the no mmc --make definitions were the ones needed to build
the compiler. Bootchecks in the csharp and java grades, which
always use --make make, got errors when they tried to build
the directories that bootcheck builds after the compiler:
the slice, profiler, deep_prof and mfilterjavac directories.
This diff ensures that all directories we build in bootcheck
get all both versions of the os, cs, css, and javas targets.
In fact, they get two subversions of the no mmc --make version:
one for use in the presence of .dv files, and one for use in their
absence. The latter just builds the .dv files and invokes mmake
again. This avoids one source of warnings about undefined mmake
variables.
To avoid another source, make the rules for tags files and their
proxies depends on *.m instead of mmake variables such as $(mcov.ms),
since this makes sense even before making dependencies. The only price
is that any untracked Mercury source files in the directory have to
either be given some other suffix, or moved somewhere else.
Where relevant, make the mtags invocation prefer the master versions
of files that are copied from the mdbcomp directory to other directories,
since this is the only writeable version.
Make the os and cs rules consistently NOT build the _init.[co] files.
The way we use those files in bootcheck, we never need them;
when we need them, the right target to give is the executable anyway.
In the slice directory, don't put mcov between mtc_union and mtc_diff.
Eliminate unnecessary duplication, e.g. of sources in rules.
Eliminate double negatives in conditionals.
Fix formatting.
Mmake.common.in:
bindist/Mmakefile:
bytecode/Mmakefile:
compiler/Mmakefile:
doc/Mmakefile:
grade_lib/Mmakefile:
robdd/Mmakefile:
samples/Mmakefile:
scripts/Mmakefile:
tools/Mmakefile:
trace/Mmakefile:
util/Mmakefile:
Add "ft=make" to vim modelines. This is redundant for the files whose
names is Mmakefile, but it is needed for Mmake.common.
LICENSE:
Move licensing information into this new file.
.README.in:
bindist/bindist.README:
Reference the new file.
bindist/Mmakefile:
Include LICENSE into binary distributions.
GC_stackbottom, GC_gc_no and GC_dont_gc are now deprecated. These changes
use new options in the API where possible.
Update scripts to copy the boehm_gc and libatomic_ops directories correctly.
Pass Boehm GC the correct flags for thread support
Update documentation regarding the version of Boehm GC.
runtime/mercury_wrapper.c:
Don't use the deprecated GC_dont_gc variable.
library/benchmarking.m:
Use GC_get_stackbottom() to get the bottom of stack and GC_get_gc_no()
to get the number of collections so far.
util/mkinit.c:
Do not explicitly set GC_stackbottom anymore, except on AIX where it
cannot be found automatically.
scripts/prepare_install_dir.in:
tools/bootcheck:
tools/build_srcdist:
Add some missing files present in Boehm GC 7.4.2 that wern't present
earlier and remove some old ones.
Coby and link the libatomic_ops directory correctly.
.README.in:
bindist/bindist.README:
Update documentation regarding the version of Boehm GC.
configure.ac:
Something in Boehm GC's build system has changed and we must now pass
-DGC_THREADS whenever building threadsafe versions of BOehm GC. This is now
done using the BOEHM_MISC_CFLAGS_FOR_THREADS autoconf variable, which has
been renamed to BOEHM_CFLAGS_FOR_THREADS now that it is more generally used.
Boehm GC no longer (or perhaps never did) require developers to specify the
type of threading to use, eg -DGC_LINUX_THREADS rather than -DGC_THREADS.
With the exception of win32-pthreads. We now pass -DGC_THREADS whereever
possible.
Mmake.common.in:
Rename BOEHM_MISC_CFLAGS_FOR_THREADS.
Fix the years in copyright messages so that they record move from The
University of Melbourne to The Mercury Team correctly.
I recall the time correctly because it's when i submitted my thesis :-)
.README.in:
bindist/bindist.README:
compiler/handle_options.m:
doc/faq.texi:
doc/library.texi:
doc/reference_manual.texi:
doc/transition_guide.texi:
doc/user_guide.texi:
profiler/mercury_profile.m:
trace/mercury_trace_internal.c:
As above.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.
*/Makefile:
*/Mmakefile:
As above.
tests/hard_coded/.gitignore:
Don't ignore the purity subdir. This ignore must have been left over
from when purity.m was a test in hard_coded, not hard_coded/purity,
and it ignored an executable, not a directory.
Say that the GPL terms apply to the compiler and tools, not to the
"implementation". As stated right after, the libraries and runtime are
distributed under the terms of the LGPL.
Don't say Mercury is free software "but" it is copyrighted.
There's nothing strange about it.
Fix spelling ("licence" is a noun).
.README.in:
bindist/bindist.README:
As above.
Delete the empty lazy_evaluation directory from extras.
*/.cvsignore:
Make this into .gitignore files.
(Update them where necessary.)
extra/lazy_evalution:
Delete this directory; its former contents were moved
elsewhere some time ago.
Estimated hours taken: 4
Branches: main
Upgrade to version 7.2 of the boehm gc.
This upgrade was done as 7.2 alpha 4 doesn't compile cleanly under Solaris 10.
Branches: main, 11.07
.README.in:
bindist/bindist.README:
compiler/handle_options.m:
doc/*.texi:
profiler/mercury_profile.m:
trace/mercury_trace_internal.c:
Bump the year in the copyright messages.
Branches: main, 11.01
.README.in:
bindist/bindist.README:
compiler/handle_options.m:
doc/*.texi:
profiler/mercury_profile.m:
trace/mercury_trace_internal.c:
Bump the year in the usage messages.
Be more specific about which parts of the system are distributed
under the LGPL.
bindist/bindist.README:
Delete some text that was accidently pasted in from the
README file for the source distribution.
List all libraries that are licensed under the LGPL.
.README.in:
As per the second point above.
Branches: main, 10.04
Filter out warning message from gcc 4.x which are emitted when compiling
low-level C code using assembler labels, at least until a better fix is
available.
util/Mmakefile:
util/mfiltercc.c:
Add a new program, mfiltercc.
compiler/options.m:
Add `--filtercc-command' option (undocumented).
compiler/compile_target_code.m:
Filter compiler output with mfiltercc if using assembler labels.
scripts/mgnuc.in:
Filter compiler output with mfiltercc if using assembler labels, but
only if mfiltercc can be found on the $PATH. The bootstrap compiler
may not have mfiltercc.
.mercury-compiler.spec.in:
Makefile:
README.MinGW:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
scripts/mercury_config.in:
Mention mfiltercc in various places.
primary motivation for this is resolve various problems with Mac OS 10.6, such
as the parallel grades not building (bug #121). The upgrade should also pave
the way for supporting a 64-bit version of Mercury on Mac OS 10.6.
(Unfortunately, the reg grades still do not work - bug #120.)
Reduce the number of merge conflicts we get when upgrading the collector by
(1) removing some local changes to support DLLs that were merged into the
official version of the collector sometime ago, and (2) removing our local copy
of the Makefile, and creating it from the file Makefile.direct. (We were
making local changes to the former, and the GC developers are now only updating
the latter - both files were out of sync with each other.)
boehm_gc/Makefile:
Create Makefile from Makefile.direct and have the submake target
depend upon it. (Despite what the GC documentation says about
Makefile.direct, if you use the direct method it has to be called
Makefile because the object files are set to depend upon it by
that name, i.e. using make's -f option won't work.)
scripts/prepare_install_dir.in:
tools/bootcheck:
.README.in:
bindist/bindist.README:
Conform to the above changes.
NOTE: the slight modification referred to above is the following, backported from
the current head of the collector. It is required for Mac OS 10.6.
--- gc_priv.h 2010-02-24 02:12:59.000000000 +1100
+++ ../../../../../gc_7_2b/ws-upgrade2/boehm_gc/include/private/gc_priv.h 2010-02-24 14:54:42.000000000 +1100
@@ -511,10 +511,7 @@
The structure has changed its definition in different Darwin versions.
This now defaults to the (older) names without __, thus hopefully,
not breaking any existing Makefile.direct builds. */
-# if defined (HAS_PPC_THREAD_STATE___R0) \
- || defined (HAS_PPC_THREAD_STATE64___R0) \
- || defined (HAS_X86_THREAD_STATE32___EAX) \
- || defined (HAS_X86_THREAD_STATE64___RAX)
+# if __DARWIN_UNIX03
# define THREAD_FLD(x) __ ## x
# else
# define THREAD_FLD(x) x
@@ -2119,14 +2116,14 @@
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
# endif
-# else /* !GC_LINUX_THREADS */
+# elif !defined(GC_OPENBSD_THREADS) && !defined(GC_DARWIN_THREADS)
# if defined(_SIGRTMIN)
# define SIG_SUSPEND _SIGRTMIN + 6
# else
# define SIG_SUSPEND SIGRTMIN + 6
# endif
# endif
-# endif /* !SIG_SUSPEND */
+# endif /* !SIG_SUSPEND */
# endif
.README.in:
bindist/bindist.README:
compiler/handle_options.m:
doc/*.texi:
profiler/mercury_profile.m:
trace/mercury_trace_internal.c:
Bump the year in the copyright message.
.README.in:
bindist/bindist.README:
compiler/handle_options.m:
doc/faq.texi:
doc/library/texi:
doc/reference_manual.texi:
doc/transition_guide.texi:
profiler/mercury_profile.m:
trace/mercury_trace_internal.c:
Bump the year in the usage messages.
bindist/bindist.Makefile.in:
Output the reminder about setting PATH etc to the post_install
step. As part of the install step it gets lost amongst the output
from configure that follows.
bindist/bindist.README:
Update this file and bring it more into line with the
README file for the source distribution (modulo a few
differences regarding the lack of source files in the
binary distribution).
Estimated hours taken: 0.1
Branches: main
bindist/Mmakefile:
bindist/bindist.Makefile.in:
Delete references to the mercury_cleanup_install script.
It was deleted earlier this year.
doc/reference_manual.texi:
Fix the order of the arguments of list.filter/3.
.INSTALL.in:
Mmakefile:
bindist/bindist.Makefile.in:
Use add-to-list and remove unnecessary calls to expand-file-name.
doc/mercury.info.in:
Make the menu work with Emac's info viewer.
Estimated hours taken: 1
Branches: main, release
Prepare for the 0.13 release and fix/update documentation.
NEWS:
HISTORY:
Update the NEWS and HISTORY files for the 0.13 release.
RELEASE_NOTES:
s/0.12/0.13/
Add Linux/x86_64 to the list of architectures supported by this
release.
Remove Solaris 8/x86 from the same list.
.README.in:
extras/README:
Remove references to the clp(r) binding. We no longer support it.
bindist/bindist.README:
Update the year in the copyright message.
Fix the gc version; 0.13 uses 6.5.
BUGS:
README.DotNet:
README.Java:
README.gcc-backend:
doc/faq.texi:
doc/make_manpage:
doc/mercury.html.in:
doc/mercury.info.in:
s/.cs.mu.oz.au/.csse.unimelb.edu.au/
library/array.m:
library/builtin.m:
library/eqvclass.m:
library/graph.m:
samples/README:
Fix typos.
Estimated hours taken: 1
Branches: main, release
Fix the scripts that build and install the binary packages for Linux. These
have been broken since the change that moved the executables, mercury_compile,
mercury_profile etc, into $(INSTALL_PREFIX)/bin.
bindist/Mmakefile:
Tar up the bin directory of the installation we are building
the binary package from since it now contains the executables.
Conform to the current structure of the library installation
hierarchy.
bindist/bindist.Mmakefile.in:
Conform to the above changes when installing.
Estimated hours taken: 1
Branches: main and 0.12
Remove the architecture string from the installed directory structure
and put the executables in $PREFIX/bin, instead of
$PREFIX/lib/mercury/bin/$FULLARCH.
The reason for this change is to reduce the need for unix shell scripts in
the top-level bin directory that call the actual programs in the
lib/mercury/bin/FULLARCH directory. The unix scripts can't be run on Windows
without a unix emulation environment like Cygwin.
Because the executables are now in the top-level bin directory, we cannot
install multiple architectures under the same directory structure. However
this is not a real loss, since the binaries for different architectures can
just be installed to different locations, as we currently do anyway on
mundula.cs.mu.oz.au.
The plan is to rename mercury_compile to mmc and do away with the mmc unix
script. This will allow mmc to be run on Windows without Cygwin or MSYS.
This proposal replaces a previous proposal to implement a C version of the
mmc script. That solution turned out to be quite complicated and
unreliable.
This diff will also mean mdice, mslice and mtc_union will be in the same
directory as mmc, so will be in the PATH as long as mmc is in the PATH.
configure.in:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
compiler/compile_target_code.m:
compiler/handle_options.m:
compiler/make.program_target.m:
debian/rules:
library/Mmakefile:
scripts/Mmake.vars.in:
scripts/mdprof.in:
scripts/mercury.bat.in:
scripts/mgnuc.in:
scripts/ml.in:
scripts/mmc.in:
scripts/mprof.in:
tools/run_all_tests_from_cron:
tools/test_mercury:
Remove FULLARCH from the installed directory structure.
Install executables to the top-level bin directory.
Estimated hours taken: 0.5
Branches: main, release
bindist/bindist.Makefile.in:
Fix a bug: don't depend on $(INSTALL_CGI_PROG), since if the
binary distribution was built without deep profiling enabled
(as it must be on some architectures), then $(INSTALL_CGI_PROG)
won't exist.
Estimated hours taken: 20
Branches: main
Move the setting of configuration options from mmc.in to
an options file Mercury.config. This has a few advantages:
- reduces the duplication between mmc and mercury.bat
- reduces the chance of running out of environment space
on crappy operating systems (although we probably exceed
the command line length limits on those systems anyway).
- makes it easier to bootstrap changes which add new
configuration options.
Always read the options files, even without `--make',
to avoid inconsistent behaviour.
scripts/Mercury.config.in:
New file containing the configuration code from mmc.in.
configure.in:
Create scripts/Mercury.config.
bindist/Mmakefile:
Make sure Mercury.config.in goes in the binary distribution.
Mmakefile:
bindist/Mmakefile:
Mmake.common.in:
Make sure we get the correct setting of INSTALL_PREFIX
when building the binary distribution.
scripts/Mmakefile:
scripts/mercury_config.in:
bindist/bindist.Mmakefile.in:
Install Mercury.config.
compiler/options.m:
doc/user_guide.texi:
Add documentation for the `--config-file' option, which gives
the name of the configuration file to read.
Add an option `read-config-file-2003-03-01' which will be
used in configure.in to test whether the compiler is up
to date after the configuration code is removed from mmc.in
(after this change is installed everywhere).
Add `--mercury-config-dir' as an abbreviation for
`--mercury-configuration-directory'.
Mmake.workspace:
Use the configuration file in scripts/Mercury.config.
browser/Mmakefile:
compiler/Mmakefile:
scripts/Mmake.vars.in:
Always pass ALL_MCFLAGS to mmc so that mmc will
use the configuration file specified in the options.
compiler/handle_options.m:
Handle the default value of `--config-file'.
compiler/mercury_compile.m:
Read the configuration file.
Always read the options files, even without `--make',
to avoid inconsistent behaviour.
compiler/make.m:
Pass the variable settings from the configuration file
to make__process_args.
The options files have already been read in mercury_compile.m,
so don't read them again here.
compiler/make.util.m:
Add a version of build_with_module_options which doesn't
need a make_info, for use by mercury_compile.m.
compiler/options_file.m:
Export a predicate to read a single options file.
Make the predicates to read options files add to an initial
options_variables map, rather than always creating a new one.
Allow MERCURY_STDLIB_DIR and MERCURY_CONFIG_DIR
to be set in the options file or environment.
scripts/mmc.in:
Set MERCURY_STDLIB_DIR and MERCURY_CONFIG_DIR in
mercury_compile's environment.
Estimated hours taken: 20
Branches: main
Allow reconfiguration of existing installations, for example
to use a different C compiler. The reconfiguration works
by making a new copy of the scripts and mercury_conf.h,
and storing them in a partial installation directory tree
which uses the libraries and executables from the existing
installation.
Use this method to configure binary distributions, rather
than using a cut down version of the configuration script,
to avoid code duplication and to handle the case where the
C compiler in use on the installation machine is different
than that used to build the binary distribution.
This is more robust than the previous method of using a different
C compiler, which was to set the MERCURY_C_COMPILER variable and
hope the different C compilers were compatible enough.
Mmakefile:
runtime/Mmakefile:
scripts/Mmakefile:
Modify the `install' targets to store files needed to create
a new configuration in $INSTALL_LIBDIR/reconf.
runtime/Mmakefile:
Install mercury_conf.h in $INSTALL_LIBDIR/conf, rather than
$INSTALL_LIBDIR/inc, so that it can be overridden by a
different configuration.
scripts/mercury_config.in:
Create a new configuration, by creating part of a Mercury
source tree from the files stored in $INSTALL_LIBDIR/reconf,
running configure, then copying the files into a partial
installation tree.
scripts/Mmake.vars.in:
Define ENABLE_DEEP_PROFILER, for use by bindist/bindist.Makefile.
Define variables INSTALL_CONF_DIR (contains the files describing
the configuration) and INSTALL_RECONF_DIR (contains files needed
to reconfigure an installation).
configure.in:
Add an option `--enable-reconfigure', for use by
mercury_config.in.
Don't look for runtime/mercury_wrapper.c when checking
for the sources -- it isn't present when reconfiguring.
Look for scripts/mmc.in instead.
Look for the runtime headers in the installation hierarchy
rather than the `runtime/' and `trace/' directories when
reconfiguring.
Output the help message for the `configure' script to
`configure.help'. This is included in the help message
for `mercury_config'.
Add new configuration variables CONFIG_PREFIX and CONFIG_LIBDIR,
which are like PREFIX and LIBDIR except that they point
to the configuration files, not the library files.
In the normal case PREFIX and CONFIG_PREFIX will be the same.
bindist/bindist.INSTALL.in:
bindist/bindist.Makefile.in:
Use mercury_config to configure binary distributions.
bindist/Mmakefile:
bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
Remove bindist.configure.in and bindist.build_vars.in.
compiler/options.m:
scripts/parse_ml_options.sh-subr.in:
scripts/mgnuc.in:
doc/user_guide.texi:
Add an option `--mercury-config-dir', and an environment
variable MERCURY_CONFIG_DIR, which tell the compiler and
scripts where to find the configuration files for the
installation.
MERCURY_CONFIG_DIR is not documented because it should
only be used by the scripts.
compiler/compile_target_code.m:
Pass `--mercury-config-dir' to the scripts.
compiler/handle_options.m:
Add `--c-include-directory $MERCURY_CONFIG_DIR/conf'.
library/getopt.m:
Handle `maybe_string_special' options.
doc/user_guide.texi:
Update the "Using a different C compiler" chapter.
NEWS:
Document the changes.
Estimated hours taken: 20
Branches: main
Make it easier to use shared libraries on x86 with
`mmc --make'.
There is now a third kind of object file, `.lpic_o'.
These files are compiled with `--pic-reg' but not with
CFLAGS_FOR_PIC, so they can be linked with shared Mercury
libraries.
On x86, executables which are linked with shared Mercury
libraries now depend on $(main_module.lpic_os), not
$(main_module.os).
This doesn't work with Mmake because ml doesn't know
which libraries are Mercury libraries, so it can't
link with the static versions of those libraries if
MERCURY_LINKAGE is set to "static".
configure.in:
bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
Work out whether `.lpic_o' files are needed.
compiler/modules.m:
Add `.lpic_o' to the list of grade or architecture
dependent files.
NEWS:
README.Linux:
compiler/options.m:
doc/user_guide.texi:
Document MERCURY_LINKAGE, LINKAGE, --linkage,
--mercury-linkage and -R.
compiler/options_file.m:
compiler/make.program_target.m:
Handle LINKAGE and MERCURY_LINKAGE variables.
Allow LIBGRADES, LINKAGE and MERCURY_LINKAGE to be target-specific.
scripts/mmc.in:
Set up the default linkage using the MERCURY_LINKAGE
variable.
compiler/compile_target_code.m:
Build `.lpic_o' files.
Work out which type of object files to link with.
When linking statically with Mercury libraries,
find the absolute pathname for the `.a' file
for each Mercury library, and pass that to ml,
rather than just using `-lname'.
Pass `-R' options to ml for each `-R' option to mmc.
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/mercury_compile.m:
Specify which type of object files to build.
compiler/make.program_target.m:
compiler/make.module_target.m:
Make sure all generated object files are cleaned up.
compiler/prog_io.m:
Add a better message for files which can't be found.
compiler/make.util.m:
Add `.lpic_o' to the list of extensions.
compiler/Mmakefile:
profiler/Mmakefile:
deep_profiler/Mmakefile:
Pass `--linkage shared' to mmc (`--shared' is in MLFLAGS).
tests/Mmakefile:
tests/mmc_make/Mmakefile:
tests/mmc_make/Mercury.options:
tests/mmc_make/complex_test.{m,exp}:
tests/mmc_make/hello.{m,exp}:
Test `mmc --make'.
tests/lib/complex*.m:
The complex numbers library from the extras distribution,
for use in the mmc_make tests.
Estimated hours taken: 1
Branches: main, release
bindist/bindist.configure.in:
Fix a bug: add scripts/parse_ml_options.sh-subr to the list of
files output by AC_OUTPUT().
This will hopefully fix a problem where we were using the version
of parse_ml_options.sh-subr copied from the source build, which may
have been configured with a different --prefix.
Estimated hours taken: 0.25
Branches: main, release
bindist/Mmakefile:
Fix a bug: don't try to include mdprof_cgi in the binary
distribution if the deep profiler was not enabled.
Estimated hours taken: 0.5
Branches: main, release
Fix a bug where building the binary distribution failed when deep
profiling was enabled, due to the mdprof_cgi program not having
been built.
deep_profiler/Mmakefile:
Install mdprof_cgi in <prefix>/lib/mercury/<fullarch>/bin,
as well as in /var/lib/cgi-bin.
bindist/Mmakefile:
Use the installed mdprof_cgi from <prefix>/lib/mercury/<fullarch>/bin,
rather than the version in the build directory (../deep_profiler),
since the latter may not be around when the binary distribution
is being created.
Estimated hours taken: 2
Branches: main
Apply Zoltan's deep profiler changes to the main branch. Zoltan committed
these changes to the release branch, but forgot to commit them to the main
branch.
Mmakefile:
NEWS:
configure.in:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
doc/user_guide.texi:
library/exception.m:
library/io.m:
runtime/mercury_conf.h.in:
runtime/mercury_conf_param.h:
runtime/mercury_misc.c:
runtime/mercury_misc.h:
scripts/Mmakefile:
deep_profiler/.nocopyright:
deep_profiler/Mercury.options:
deep_profiler/Mmakefile:
deep_profiler/callgraph.m:
deep_profiler/cliques.m:
deep_profiler/conf.m:
deep_profiler/html_format.m:
deep_profiler/interface.m:
deep_profiler/mdprof_cgi.m:
deep_profiler/query.m:
deep_profiler/startup.m:
deep_profiler/timeout.m:
deep_profiler/mdprof_server.m:
deep_profiler/server.m:
Merge in changes from the release branch.
Enclosed below is Zoltan's original log message.
----------
Estimated hours taken: 0.3 (on release branch)
Branches: release
Make the deep profiler work again.
The existing process structure of the deep profiler made it very hard to debug,
mainly because the Mercury debugger is confused by forks and stymied by execs.
This change completely replaces the process structure. The old structure had
two separate programs, mdprof_cgi and mdprof_server, the first always acting
as client and the second always acting as server. The new structure has only
one program, mdprof_cgi, which acts as a server if there is no existing server
for the relevant profiling data file, and as a client otherwise.
Although mdprof_cgi normally forks when it becomes a server to let the parent
exit and let the web server know that the web page it has generated is
complete, the fork can be disabled for debugging via an option. This allows
the communication between client and server to be debugged by running two
instances of mdprof_cgi in different windows, one or both under mdb.
deep_profiler/DESIGN:
New file describing the new process structure, its race conditions,
and their solutions.
deep_profiler/.nocopyright:
Add DESIGN.
deep_profiler/mdprof_cgi.m:
A complete rewrite of this module to enable it act as both client and
server.
deep_profiler/mdprof_test.m:
A new module to hold the testing functionality of mdprof_server.m.
deep_profiler/mdprof_server.m:
deep_profiler/server.m:
Delete these now unnecessary modules.
Mmakefile:
Replace references to mdprof_server with references to mdprof_test.
deep_profiler/Mmakefile:
Replace references to mdprof_server with references to mdprof_test.
Move the include of Mmake.deep.params, to allow it to override
top level parameter settings.
deep_profiler/Mercury.options:
Work around a compiler bug by turning off the offending optimization.
deep_profiler/timeout.m:
A rewrite of major parts of this module to support the new design
of mdprof_cgi.m, and to make unexpected signals easier to debug.
deep_profiler/interface.m:
Implement the mechanisms needed by the new process structure.
Change the characters we use to separate components of the URL.
The old ones were special to the shell, and screwed up command lines.
(As double insurance, we ignore the command line anyway when invoked
by the web server.)
Change some names to be more expressive.
deep_profiler/conf.m:
Add a new function, getpid, for use by interface.m.
Rewrite some code to use streams explicitly, not implicitly.
deep_profiler/callgraph.m:
deep_profiler/cliques.m:
Add (now commented out) code to help debug these modules, for use
in cases where mdb doesn't help, because the program works perfectly
with debugging enabled :-(
deep_profiler/query.m:
Move the predicate try_exec here from the deleted file server.m.
deep_profiler/html_format.m:
Trivial change to conform to name change in interface.m.
deep_profiler/startup.m:
Generate debugging output to a caller specified stream, not to
stdout and stderr.
Disable the generation of statistics temporarily, since the diff
to make statistics reporting routines write to a specified stream
instead of stdout and stderr won't be committed on the release branch.
Currently, they always write to stdout, which in the new design
goes to the web page, not to the startup file.
configure.in:
Detect the presence of opendir, readdir and closedir, and the header
file they need, dirent.h. Enable the deep profiler only if all exist,
since the deep profiler now needs them.
runtime/mercury_conf.h.in:
Support the changes to configure.in.
runtime/mercury_misc.[ch]:
Add a mechanism for registering cleanup functions to be executed when
we terminate the program due to an uncaught exception.
library/exception.m:
Invoke the registered cleanup functions just before terminating
the program due to an uncaught exception.
Estimated hours taken: 0.75
Branches: main, release
bindist/bindist.configure.in:
Fix some bugs:
- invoke MERCURY_CHECK_LOCAL_C_LIB_DIRS.
This is needed to set @ALL_LOCAL_C_LIB_DIRS@ which
is reference in scripts/ml.in.
- set CPPFLAGS after invoking MERCURY_CHECK_LOCAL_C_INCL_DIRS
(and set LIBS after invoking MERCURY_CHECK_LOCAL_C_LIB_DIRS).
This is needed so that the binary distribution's configure check for
GNU Readline will look in /usr/local/include and /usr/local/lib,
like the source distribution's configure check does.
configure.in:
Add an XXX comment warning abou the code duplication
between configure.in and bindist/bindist.build_vars.in.
Estimated hours taken: 0.5
Branches: main, release
bindist/bindist.build_vars.in:
Fix a bug introduced in stayl's last change: add CYGPATH to
the list of configure variables whose values for the binary
distribution should be copied from the values obtained when the
binary distribution was built.
Estimated hours taken: 3
Branches: main
Minor corrections to the bindist build.
bindist/Mmakefile:
Revised a comment concerning the Aditi release.
Ensure that the configure file is executable.
bindist/bindist.configure.in:
Fixed a typo that was causing problems with the
binary installation.
Estimated hours taken: 0.25
Branches: main
Fix "cygpath: command not found" errors with `mmake --use-mmc-make'.
configure.in:
bindist/bindist.configure.in:
scripts/Mmake.vars.in:
Check that `cygpath' exists, rather than hard-coding
it in Mmake.vars.in.
Estimated hours taken: 0.1
Branches: main
Mmakefile:
Build WORK_IN_PROGRESS and TODO before building the
binary distribution.
bindist/Mmakefile:
Add TODO to the binary distribution.
Estimated hours taken: 3
Branches: main
Fix a bug where `mercury.dll' was not being found by the C# compiler.
when you configured with a non-MS C compiler. This bug broke
tests/hard_coded/foreign_type in grade il.
configure.in:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
Rename CYGPATH as FIX_PATH_FOR_CC.
scripts/Mmake.vars.in:
Rename CYGPATH as FIX_PATH_FOR_CC,
and add new variables FIX_PATH_FOR_CL and FIX_PATH_FOR_CSC.
The new variables are currently hard-wired as `cygpath -w',
since currently we only support the MS versions of CL and CSC.
Also, change the definition of MERC_DLL_DIR to use $(GRADE)
rather than hard-coding "ilc".
scripts/Mmake.rules:
Use the new variables, rather than $(CYGPATH).
Also, update various comments, and delete the unnecessary version
number from the MS_VC7_INCLUDES_DIR and MS_VC7_INCLUDES variable
names.
library/Mmakefile:
Use the new variables, rather than directly hard-coding `cygpath -w`.
scripts/ml.in:
Use @FIX_PATH_FOR_CC@ rather than @CYGPATH@.
Estimated hours taken: 3
Branches: main
Fix a bug where `mercury.dll' was not being found by the C# compiler.
when you configured with a non-MS C compiler. This bug broke
tests/hard_coded/foreign_type in grade il.
configure.in:
bindist/bindist.build_vars.in:
Rename CYGPATH as FIX_PATH_FOR_CC.
scripts/Mmake.vars.in:
Rename CYGPATH as FIX_PATH_FOR_CC,
and add new variables FIX_PATH_FOR_CL and FIX_PATH_FOR_CSC.
The new variables are currently hard-wired as `cygpath -w',
since currently we only support the MS versions of CL and CSC.
Also, change the definition of MERC_DLL_DIR to use $(GRADE)
rather than hard-coding "ilc".
scripts/Mmake.rules:
Use the new variables, rather than $(CYGPATH).
Also, update various comments, and delete the unnecessary version
number from the MS_VC7_INCLUDES_DIR and MS_VC7_INCLUDES variable
names.
scripts/ml.in:
Use @FIX_PATH_FOR_CC@ rather than @CYGPATH@.
Estimated hours taken: 2.5
Branches: main
Compile the boehmgc collector with the correct makefile when using the
MS Visual C compiler. This fixes the problem introduced by fjh's
previous change to make merging to a new boehmgc collector easier.
configure.in:
Mmake.common.in:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
Set the USING_MICROSOFT_CL_COMPILER variable when we are using
the MS compiler.
Delete BOEHMGC_MAKEFILE as it's no longer needed.
boehm_gc/Mmakefile:
Use USING_MICROSOFT_CL_COMPILER to determine which makefile
and make program to use when building the collector.