mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-10 03:13:46 +00:00
Branches: main Add `--boehm-gc-free-space-divisor <n>' option for MERCURY_OPTIONS. This sets the value of a tunable parameter in Boehm GC to trade off heap size for collection time. runtime/mercury_wrapper.c: Add the option. doc/user_guide.texi: Add documentation. scripts/mdprof.in: Add some sample code to enable the option when calling the deep profiler CGI program.
31 lines
1.2 KiB
Bash
31 lines
1.2 KiB
Bash
#! /bin/sh
|
|
#---------------------------------------------------------------------------#
|
|
# Copyright (C) 2001, 2005 The University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#---------------------------------------------------------------------------#
|
|
#
|
|
# This should set up PATH to include the directory containing the installed
|
|
# mdprof_cgi and mprof_server programs. This should allow this shell script
|
|
# to find the right version of mdprof_cgi, and it should allow the mdprof_cgi
|
|
# process to find the right mdprof_server.
|
|
#
|
|
# We ignore the argument(s) of this script. The web server passes us the same
|
|
# information in the environment variable QUERY_STRING, but QUERY_STRING is
|
|
# unprocessed, which is what we want; the web servers breaks up QUERY_STRING
|
|
# on boundaries inappropriate for us when computing the command line arguments.
|
|
|
|
PATH=@prefix@/bin:$PATH
|
|
export PATH
|
|
|
|
# Use less heap at the expense of increased time spent in the GC.
|
|
# The value is "experimentally determined" (guessed).
|
|
if false
|
|
then
|
|
MERCURY_OPTIONS_mdprof_cgi="--boehm-gc-free-space-divisor 10 \
|
|
${MERCURY_OPTIONS_mdprof_cgi}"
|
|
export MERCURY_OPTIONS_mdprof_cgi
|
|
fi
|
|
|
|
exec mdprof_cgi
|