Author: housel
Date: Tue Sep 27 18:23:25 2005
New Revision: 10223
Added:
trunk/mps/code/expgen.sh (contents, props changed)
trunk/mps/code/exposet0.c (contents, props changed)
trunk/mps/code/expt825.c (contents, props changed)
trunk/mps/code/finaltest.c (contents, props changed)
trunk/mps/code/libcbt.c (contents, props changed)
trunk/mps/code/mpslibcb.c (contents, props changed)
trunk/mps/code/mpslibcb.h (contents, props changed)
trunk/mps/code/protxc.c (contents, props changed)
trunk/mps/code/protxcpp.c (contents, props changed)
trunk/mps/code/ssxcpp.s
trunk/mps/code/w3build.bat (contents, props changed)
trunk/mps/code/w3gen.def
trunk/mps/code/walkt0.c (contents, props changed)
trunk/mps/design/fix/
trunk/mps/design/fix/index.html (contents, props changed)
trunk/mps/design/object-debug/
trunk/mps/design/object-debug/index.html (contents, props changed)
trunk/mps/design/thread-manager/
trunk/mps/design/thread-manager/index.html (contents, props changed)
trunk/mps/design/thread-safety/
trunk/mps/design/thread-safety/index.html (contents, props changed)
trunk/mps/manual/build-notes/
trunk/mps/manual/build-notes/index.html (contents, props changed)
Modified:
trunk/mps/code/abq.c
trunk/mps/code/abq.h
trunk/mps/code/abqtest.c
trunk/mps/code/amcss.c
trunk/mps/code/amcsshe.c
trunk/mps/code/amcssth.c
trunk/mps/code/amsss.c
trunk/mps/code/amssshe.c
trunk/mps/code/apss.c
trunk/mps/code/arena.c
trunk/mps/code/arenacl.c
trunk/mps/code/arenacv.c
trunk/mps/code/arenavm.c
trunk/mps/code/awlut.c
trunk/mps/code/awluthe.c
trunk/mps/code/awlutth.c
trunk/mps/code/boot.c
trunk/mps/code/boot.h
trunk/mps/code/bt.c
trunk/mps/code/bt.h
trunk/mps/code/btcv.c
trunk/mps/code/bttest.c
trunk/mps/code/buffer.c
trunk/mps/code/cbs.c
trunk/mps/code/cbs.h
trunk/mps/code/cbstest.c
trunk/mps/code/chain.h
trunk/mps/code/check.h
trunk/mps/code/comm.gmk
trunk/mps/code/commpost.nmk
trunk/mps/code/commpre.nmk
trunk/mps/code/config.h
trunk/mps/code/cx.gmk
trunk/mps/code/dbgpool.c
trunk/mps/code/dbgpool.h
trunk/mps/code/dbgpooli.c
trunk/mps/code/dc.gmk
trunk/mps/code/dumper.c
trunk/mps/code/eg.gmk
trunk/mps/code/event.c
trunk/mps/code/event.h
trunk/mps/code/eventcnv.c
trunk/mps/code/eventcom.h
trunk/mps/code/eventdef.h
trunk/mps/code/eventgen.h
trunk/mps/code/eventgen.pl
trunk/mps/code/eventpro.c
trunk/mps/code/eventpro.h
trunk/mps/code/eventrep.c
trunk/mps/code/eventrep.h
trunk/mps/code/finalcv.c
trunk/mps/code/fmtdy.c
trunk/mps/code/fmtdy.h
trunk/mps/code/fmtdytst.c
trunk/mps/code/fmtdytst.h
trunk/mps/code/fmthe.c
trunk/mps/code/fmthe.h
trunk/mps/code/fmtno.c
trunk/mps/code/fmtno.h
trunk/mps/code/format.c
trunk/mps/code/fri4gc.gmk
trunk/mps/code/gc.gmk
trunk/mps/code/global.c
trunk/mps/code/gp.gmk
trunk/mps/code/i6cc.gmk
trunk/mps/code/iam4cc.gmk
trunk/mps/code/ic.gmk
trunk/mps/code/idlench.awk
trunk/mps/code/lc.gmk
trunk/mps/code/ld.c
trunk/mps/code/lii3eg.gmk
trunk/mps/code/lii4gc.gmk
trunk/mps/code/lippgc.gmk
trunk/mps/code/lo.h
trunk/mps/code/locbwcss.c
trunk/mps/code/lock.h
trunk/mps/code/lockan.c
trunk/mps/code/lockcov.c
trunk/mps/code/lockfr.c
trunk/mps/code/lockli.c
trunk/mps/code/lockutw3.c
trunk/mps/code/lockw3.c
trunk/mps/code/locus.c
trunk/mps/code/locusss.c
trunk/mps/code/locv.c
trunk/mps/code/message.c
trunk/mps/code/messtest.c
trunk/mps/code/meter.c
trunk/mps/code/meter.h
trunk/mps/code/misc.h
trunk/mps/code/mpm.c
trunk/mps/code/mpm.h
trunk/mps/code/mpmss.c
trunk/mps/code/mpmst.h
trunk/mps/code/mpmtypes.h
trunk/mps/code/mps.h
trunk/mps/code/mpsacl.h
trunk/mps/code/mpsavm.h
trunk/mps/code/mpscamc.h
trunk/mps/code/mpscams.h
trunk/mps/code/mpscawl.h
trunk/mps/code/mpsclo.h
trunk/mps/code/mpscmv.h
trunk/mps/code/mpscmv2.h
trunk/mps/code/mpscmvff.h
trunk/mps/code/mpscsnc.h
trunk/mps/code/mpsi.c
trunk/mps/code/mpsicv.c
trunk/mps/code/mpsio.h
trunk/mps/code/mpsioan.c
trunk/mps/code/mpsiw3.c
trunk/mps/code/mpslib.h
trunk/mps/code/mpsliban.c
trunk/mps/code/mpstd.h
trunk/mps/code/mpsw3.h
trunk/mps/code/mpswin.h
trunk/mps/code/mv2test.c
trunk/mps/code/o1alcc.gmk
trunk/mps/code/o1algc.gmk
trunk/mps/code/ossu.h
trunk/mps/code/osxc.h
trunk/mps/code/pool.c
trunk/mps/code/poolabs.c
trunk/mps/code/poolamc.c
trunk/mps/code/poolams.c
trunk/mps/code/poolams.h
trunk/mps/code/poolamsi.c
trunk/mps/code/poolawl.c
trunk/mps/code/poollo.c
trunk/mps/code/poolmfs.c
trunk/mps/code/poolmfs.h
trunk/mps/code/poolmrg.c
trunk/mps/code/poolmrg.h
trunk/mps/code/poolmv.c
trunk/mps/code/poolmv.h
trunk/mps/code/poolmv2.c
trunk/mps/code/poolmv2.h
trunk/mps/code/poolmvff.c
trunk/mps/code/pooln.c
trunk/mps/code/pooln.h
trunk/mps/code/poolncv.c
trunk/mps/code/poolsnc.c
trunk/mps/code/prmcan.c
trunk/mps/code/prmcfr.h
trunk/mps/code/prmci3.h
trunk/mps/code/prmci3li.c
trunk/mps/code/prmci3w3.c
trunk/mps/code/prmcli.h
trunk/mps/code/prmcw3.h
trunk/mps/code/protan.c
trunk/mps/code/protfr.c
trunk/mps/code/protfri3.c
trunk/mps/code/proti3.c
trunk/mps/code/protli.c
trunk/mps/code/protlii3.c
trunk/mps/code/proto1.c
trunk/mps/code/protocol.c
trunk/mps/code/protocol.h
trunk/mps/code/protso.c
trunk/mps/code/protsu.c
trunk/mps/code/protw3.c
trunk/mps/code/pthrdext.c
trunk/mps/code/pthrdext.h
trunk/mps/code/qs.c
trunk/mps/code/ref.c
trunk/mps/code/replay.c
trunk/mps/code/reserv.c
trunk/mps/code/ring.c
trunk/mps/code/ring.h
trunk/mps/code/root.c
trunk/mps/code/s7ppac/Makefile
trunk/mps/code/sac.c
trunk/mps/code/sac.h
trunk/mps/code/sacss.c
trunk/mps/code/sc.gmk
trunk/mps/code/seg.c
trunk/mps/code/segsmss.c
trunk/mps/code/shield.c
trunk/mps/code/sos8cx.gmk
trunk/mps/code/sos8gc.gmk
trunk/mps/code/sos8gp.gmk
trunk/mps/code/sos9sc.gmk
trunk/mps/code/span.c
trunk/mps/code/spi3.c
trunk/mps/code/splay.c
trunk/mps/code/splay.h
trunk/mps/code/ss.h
trunk/mps/code/ssan.c
trunk/mps/code/ssfri3.c
trunk/mps/code/sslii3.c
trunk/mps/code/sso1al.s
trunk/mps/code/sssos8.s
trunk/mps/code/sssus8.c
trunk/mps/code/sssus8.s
trunk/mps/code/ssw3i3.c
trunk/mps/code/steptest.c
trunk/mps/code/sus8gc.gmk
trunk/mps/code/table.c
trunk/mps/code/table.h
trunk/mps/code/teletest.c
trunk/mps/code/testlib.c
trunk/mps/code/testlib.h
trunk/mps/code/th.h
trunk/mps/code/than.c
trunk/mps/code/thfri4.c
trunk/mps/code/thlii4.c
trunk/mps/code/thw3i3.c
trunk/mps/code/trace.c
trunk/mps/code/tract.c
trunk/mps/code/tract.h
trunk/mps/code/version.c
trunk/mps/code/vman.c
trunk/mps/code/vmfr.c
trunk/mps/code/vmi5.c
trunk/mps/code/vmli.c
trunk/mps/code/vmo1.c
trunk/mps/code/vmso.c
trunk/mps/code/vmsu.c
trunk/mps/code/vmw3.c
trunk/mps/code/vmxc.c
trunk/mps/code/w3almv.nmk
trunk/mps/code/w3i3mv.nmk
trunk/mps/code/w3ppmv.nmk
trunk/mps/code/walk.c
trunk/mps/code/xcppgc.gmk
trunk/mps/design/alloc-frame/index.html
trunk/mps/design/arena/index.html
trunk/mps/design/arenavm/index.html
trunk/mps/design/bt/index.html
trunk/mps/design/buffer/index.html
trunk/mps/design/cbs/index.html
trunk/mps/design/check/index.html
trunk/mps/design/class-interface/index.html
trunk/mps/design/collection/index.html
trunk/mps/design/config/index.html
trunk/mps/design/finalize/index.html
trunk/mps/design/index.html
trunk/mps/design/interface-c/index.html
trunk/mps/design/io/index.html
trunk/mps/design/lib/index.html
trunk/mps/design/lock/index.html
trunk/mps/design/locus/index.html
trunk/mps/design/message/index.html
trunk/mps/design/pool/index.html
trunk/mps/design/poolamc/index.html
trunk/mps/design/poolams/index.html
trunk/mps/design/poolawl/index.html
trunk/mps/design/poollo/index.html
trunk/mps/design/poolmfs/index.html
trunk/mps/design/poolmrg/index.html
trunk/mps/design/poolmv/index.html
trunk/mps/design/poolmvff/index.html
trunk/mps/design/poolmvt/index.html
trunk/mps/design/prot/index.html
trunk/mps/design/protan/index.html
trunk/mps/design/protli/index.html
trunk/mps/design/protocol/index.html
trunk/mps/design/protsu/index.html
trunk/mps/design/pthreadext/index.html
trunk/mps/design/reservoir/index.html
trunk/mps/design/ring/index.html
trunk/mps/design/root/index.html
trunk/mps/design/scan/index.html
trunk/mps/design/seg/index.html
trunk/mps/design/sig/index.html
trunk/mps/design/splay/index.html
trunk/mps/design/sso1al/index.html
trunk/mps/design/telemetry/index.html
trunk/mps/design/trace/index.html
trunk/mps/design/type/index.html
trunk/mps/design/version-library/index.html
trunk/mps/design/version/index.html
trunk/mps/design/vm/index.html
trunk/mps/design/vman/index.html
trunk/mps/design/vmo1/index.html
trunk/mps/design/vmso/index.html
trunk/mps/design/writef/index.html
trunk/mps/index.html
trunk/mps/license.txt
trunk/mps/manual/index.html
trunk/mps/manual/reference/index.html
trunk/mps/procedure/index.html
trunk/mps/procedure/release-build/index.html
trunk/mps/readme.txt
trunk/mps/test/test/script/runtest
trunk/mps/test/test/testlib/testlib.c
trunk/mps/test/test/testlib/testlib.h
trunk/mps/tool/index.html
Log:
Job: mps
Update to the current MPS development trunk, obtained via:
wget -r -L http://www.ravenbrook.com/project/mps/master
Modified: trunk/mps/code/abq.c
==============================================================================
--- trunk/mps/code/abq.c (original)
+++ trunk/mps/code/abq.c Tue Sep 27 18:23:25 2005
@@ -1,13 +1,13 @@
/* abq.c: AVAILABLE BLOCK QUEUE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/abq.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/abq.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: Any MPS developer
*
* .purpose: A FIFO queue substrate for <code/poolmv2.c>
*
- * .design: See <design/poolmv2/>
+ * .design: See <design/poolmvt/>
*/
#include "meter.h"
@@ -15,7 +15,7 @@
#include "cbs.h"
#include "mpm.h"
-SRCID(abq, "$Id: //info.ravenbrook.com/project/mps/version/1.100/code/abq.c#1
$");
+SRCID(abq, "$Id: //info.ravenbrook.com/project/mps/master/code/abq.c#10 $");
/* Private prototypes */
Modified: trunk/mps/code/abq.h
==============================================================================
--- trunk/mps/code/abq.h (original)
+++ trunk/mps/code/abq.h Tue Sep 27 18:23:25 2005
@@ -1,11 +1,11 @@
/* abq.h: ABQ INTERFACE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/abq.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/abq.h#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .purpose: A FIFO queue substrate for <code/poolmv2.c>
*
- * .source: <design/poolmv2/>
+ * .source: <design/poolmvt/>
*/
#ifndef abq_h
Modified: trunk/mps/code/abqtest.c
==============================================================================
--- trunk/mps/code/abqtest.c (original)
+++ trunk/mps/code/abqtest.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* abqtest.c: AVAILABLE BLOCK QUEUE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/abqtest.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/abqtest.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
@@ -20,7 +20,7 @@
#include <math.h>
-SRCID(abqtest, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/abqtest.c#1 $");
+SRCID(abqtest, "$Id: //info.ravenbrook.com/project/mps/master/code/abqtest.c#9
$");
static ABQStruct abq; /* the ABQ which we will use */
Modified: trunk/mps/code/amcss.c
==============================================================================
--- trunk/mps/code/amcss.c (original)
+++ trunk/mps/code/amcss.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* amcss.c: POOL CLASS AMC STRESS TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/amcss.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/amcss.c#14 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*/
Modified: trunk/mps/code/amcsshe.c
==============================================================================
--- trunk/mps/code/amcsshe.c (original)
+++ trunk/mps/code/amcsshe.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* amcsshe.c: POOL CLASS AMC STRESS TEST WITH HEADER
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/amcsshe.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/amcsshe.c#12 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*/
Modified: trunk/mps/code/amcssth.c
==============================================================================
--- trunk/mps/code/amcssth.c (original)
+++ trunk/mps/code/amcssth.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* amcssth.c: POOL CLASS AMC STRESS TEST WITH TWO THREADS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/amcssth.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/amcssth.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
Modified: trunk/mps/code/amsss.c
==============================================================================
--- trunk/mps/code/amsss.c (original)
+++ trunk/mps/code/amsss.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* amsss.c: POOL CLASS AMS STRESS TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/amsss.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/amsss.c#11 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
Modified: trunk/mps/code/amssshe.c
==============================================================================
--- trunk/mps/code/amssshe.c (original)
+++ trunk/mps/code/amssshe.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* amssshe.c: POOL CLASS AMS STRESS TEST WITH HEADERS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/amssshe.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/amssshe.c#4 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .design: Adapted from amsss.c.
Modified: trunk/mps/code/apss.c
==============================================================================
--- trunk/mps/code/apss.c (original)
+++ trunk/mps/code/apss.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* apss.c: AP MANUAL ALLOC STRESS TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/apss.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/apss.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*/
Modified: trunk/mps/code/arena.c
==============================================================================
--- trunk/mps/code/arena.c (original)
+++ trunk/mps/code/arena.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* arena.c: ARENA ALLOCATION FEATURES
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/arena.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/arena.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .sources: <design/arena/> is the main design document. */
@@ -9,7 +9,7 @@
#include "poolmv.h"
#include "mpm.h"
-SRCID(arena, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/arena.c#1 $");
+SRCID(arena, "$Id: //info.ravenbrook.com/project/mps/master/code/arena.c#10
$");
/* ArenaControlPool -- get the control pool */
Modified: trunk/mps/code/arenacl.c
==============================================================================
--- trunk/mps/code/arenacl.c (original)
+++ trunk/mps/code/arenacl.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* arenacl.c: ARENA CLASS USING CLIENT MEMORY
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/arenacl.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/arenacl.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .design: See <design/arena/#client>.
@@ -17,7 +17,7 @@
#include "mpm.h"
#include "mpsacl.h"
-SRCID(arenacl, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/arenacl.c#1 $");
+SRCID(arenacl, "$Id: //info.ravenbrook.com/project/mps/master/code/arenacl.c#9
$");
/* ClientArenaStruct -- Client Arena Structure */
Modified: trunk/mps/code/arenacv.c
==============================================================================
--- trunk/mps/code/arenacv.c (original)
+++ trunk/mps/code/arenacv.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* arenacv.c: ARENA COVERAGE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/arenacv.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/arenacv.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .coverage: At the moment, we're only trying to cover the new code
Modified: trunk/mps/code/arenavm.c
==============================================================================
--- trunk/mps/code/arenavm.c (original)
+++ trunk/mps/code/arenavm.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* arenavm.c: VIRTUAL MEMORY ARENA CLASS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/arenavm.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/arenavm.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
*
@@ -27,7 +27,7 @@
#include "mpm.h"
#include "mpsavm.h"
-SRCID(arenavm, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/arenavm.c#1 $");
+SRCID(arenavm, "$Id: //info.ravenbrook.com/project/mps/master/code/arenavm.c#9
$");
/* @@@@ Arbitrary calculation for the maximum number of distinct */
Modified: trunk/mps/code/awlut.c
==============================================================================
--- trunk/mps/code/awlut.c (original)
+++ trunk/mps/code/awlut.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* awlut.c: POOL CLASS AWL UNIT TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/awlut.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/awlut.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* DESIGN
Modified: trunk/mps/code/awluthe.c
==============================================================================
--- trunk/mps/code/awluthe.c (original)
+++ trunk/mps/code/awluthe.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* awluthe.c: POOL CLASS AWL UNIT TEST WITH OBJECT HEADERS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/awluthe.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/awluthe.c#3 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* DESIGN
Modified: trunk/mps/code/awlutth.c
==============================================================================
--- trunk/mps/code/awlutth.c (original)
+++ trunk/mps/code/awlutth.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* awlutth.c: THREADING UNIT TEST USING POOL CLASS AWL
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/awlutth.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/awlutth.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* DESIGN
Modified: trunk/mps/code/boot.c
==============================================================================
--- trunk/mps/code/boot.c (original)
+++ trunk/mps/code/boot.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* boot.c: BOOTSTRAP ALLOCATOR
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/boot.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/boot.c#8 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .overview: A structure and protocols for allocating memory from a
@@ -14,7 +14,7 @@
#include "boot.h"
#include "mpm.h"
-SRCID(boot, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/boot.c#1 $");
+SRCID(boot, "$Id: //info.ravenbrook.com/project/mps/master/code/boot.c#8 $");
#define BootBlockSig ((Sig)0x519B002B) /* SIGnature BOOT Block */
Modified: trunk/mps/code/boot.h
==============================================================================
--- trunk/mps/code/boot.h (original)
+++ trunk/mps/code/boot.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* boot.h: BOOTSTRAP ALLOCATOR INTERFACE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/boot.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/boot.h#8 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .overview: A protocol for allocating memory from a given block.
Modified: trunk/mps/code/bt.c
==============================================================================
--- trunk/mps/code/bt.c (original)
+++ trunk/mps/code/bt.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* bt.c: BIT TABLES
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/bt.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/bt.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* READERSHIP
@@ -17,7 +17,7 @@
#include "check.h"
#include "mpm.h"
-SRCID(bt, "$Id: //info.ravenbrook.com/project/mps/version/1.100/code/bt.c#1
$");
+SRCID(bt, "$Id: //info.ravenbrook.com/project/mps/master/code/bt.c#9 $");
/* BTIndexAlignUp, BTIndexAlignDown -- Align bit-table indices
Modified: trunk/mps/code/bt.h
==============================================================================
--- trunk/mps/code/bt.h (original)
+++ trunk/mps/code/bt.h Tue Sep 27 18:23:25 2005
@@ -1,9 +1,10 @@
/* bt.h: Bit Table Interface
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/bt.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/bt.h#3 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * .source: design.mps.bt. */
+ * .source: <design/bt/>
+ */
#ifndef bt_h
#define bt_h
@@ -11,10 +12,9 @@
#include "mpmtypes.h"
-/* design.mps.bt.if.size */
+/* <design/bt#if.size> */
extern size_t (BTSize)(unsigned long length);
#define BTSize(n) (((n) + MPS_WORD_WIDTH-1) / MPS_WORD_WIDTH * sizeof(Word))
-
/* <design/bt/#if.get> */
extern Bool (BTGet)(BT bt, Index index);
Modified: trunk/mps/code/btcv.c
==============================================================================
--- trunk/mps/code/btcv.c (original)
+++ trunk/mps/code/btcv.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* btss.c: BIT TABLE COVERAGE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/btcv.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/btcv.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: MPS developers
@@ -19,7 +19,7 @@
#include <stdlib.h>
-SRCID(btcv, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/btcv.c#1 $");
+SRCID(btcv, "$Id: //info.ravenbrook.com/project/mps/master/code/btcv.c#9 $");
/* bt*Symmetric -- Symmetric operations on bit tables
Modified: trunk/mps/code/bttest.c
==============================================================================
--- trunk/mps/code/bttest.c (original)
+++ trunk/mps/code/bttest.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* bttest.c: BIT TABLE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/bttest.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/bttest.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
@@ -18,7 +18,7 @@
#endif
#include <time.h>
-SRCID(bttest, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/bttest.c#1 $");
+SRCID(bttest, "$Id: //info.ravenbrook.com/project/mps/master/code/bttest.c#10
$");
static BT bt; /* the BT which we will use */
@@ -223,17 +223,17 @@
"d destroy the current BT\n"
"s <i> set the bit index 'i'\n"
"r <i> reset the bit index 'i'\n"
- "g <i> get the bit index 'i'\n"
- "sr [<i> <i>] set the specified range\n"
+ "g <i> get the bit index 'i'\n");
+ printf("sr [<i> <i>] set the specified range\n"
"rr [<i> <i>] reset the specified range\n"
"is [<i> <i>] is the specified range set?\n"
- "ir [<i> <i>] is the specified range reset?\n"
- "f <l> [<i> <i>] find a reset range of length 'l'.\n"
+ "ir [<i> <i>] is the specified range reset?\n");
+ printf("f <l> [<i> <i>] find a reset range of length 'l'.\n"
"fh <l> [<i> <i>] find a reset range length 'l', working downwards\n"
"fl <l> [<i> <i>] find a reset range of length at least 'l'\n"
"q quit\n"
- "? print this message\n"
- "\n"
+ "? print this message\n");
+ printf("\n"
"No way of testing BTSize, BTRangesSame, or BTCopyInvertRange.\n");
}
Modified: trunk/mps/code/buffer.c
==============================================================================
--- trunk/mps/code/buffer.c (original)
+++ trunk/mps/code/buffer.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* buffer.c: ALLOCATION BUFFER IMPLEMENTATION
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/buffer.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/buffer.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .purpose: This is (part of) the implementation of allocation buffers.
@@ -26,7 +26,7 @@
#include "mpm.h"
-SRCID(buffer, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/buffer.c#1 $");
+SRCID(buffer, "$Id: //info.ravenbrook.com/project/mps/master/code/buffer.c#9
$");
/* forward declarations */
Modified: trunk/mps/code/cbs.c
==============================================================================
--- trunk/mps/code/cbs.c (original)
+++ trunk/mps/code/cbs.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* cbs.c: COALESCING BLOCK STRUCTURE IMPLEMENTATION
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/cbs.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/cbs.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .intro: This is a portable implementation of coalescing block
@@ -18,7 +18,7 @@
#include "poolmfs.h"
#include "mpm.h"
-SRCID(cbs, "$Id: //info.ravenbrook.com/project/mps/version/1.100/code/cbs.c#1
$");
+SRCID(cbs, "$Id: //info.ravenbrook.com/project/mps/master/code/cbs.c#9 $");
/* See <design/cbs/#align> */
Modified: trunk/mps/code/cbs.h
==============================================================================
--- trunk/mps/code/cbs.h (original)
+++ trunk/mps/code/cbs.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* cbs.h: CBS -- Coalescing Block Structure
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/cbs.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/cbs.h#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .source: <design/cbs/>.
Modified: trunk/mps/code/cbstest.c
==============================================================================
--- trunk/mps/code/cbstest.c (original)
+++ trunk/mps/code/cbstest.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* cbstest.c: COALESCING BLOCK STRUCTURE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/cbstest.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/cbstest.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
@@ -18,7 +18,7 @@
#endif
#include <time.h>
-SRCID(cbstest, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/cbstest.c#1 $");
+SRCID(cbstest, "$Id:
//info.ravenbrook.com/project/mps/master/code/cbstest.c#10 $");
#define ArraySize ((Size)123456)
@@ -607,7 +607,7 @@
"failed to allocate block");
dummyBlock = (Addr)p; /* avoid pun */
- printf("Allocated block [%p, %p)\n", dummyBlock,
+ printf("Allocated block [%p, %p)\n", (void*)dummyBlock,
(char *)dummyBlock + ArraySize);
checkCBS(cbs, allocTable, dummyBlock);
Modified: trunk/mps/code/chain.h
==============================================================================
--- trunk/mps/code/chain.h (original)
+++ trunk/mps/code/chain.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* chain.h: GENERATION CHAINS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/chain.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/chain.h#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
@@ -32,7 +32,7 @@
Size capacity; /* capacity in kB */
double mortality;
double proflow; /* predicted proportion of survivors promoted */
- RingStruct locusRing; /* this generation in all the pools using the chain */
+ RingStruct locusRing; /* Ring of all PoolGen's in this GenDesc (locus) */
} GenDescStruct;
@@ -47,7 +47,8 @@
Serial nr; /* generation number */
Pool pool; /* pool this belongs to */
Chain chain; /* chain this belongs to */
- RingStruct genRing; /* this generation in all the pools using this chain */
+ /* link in ring of all PoolGen's in this GenDesc (locus) */
+ RingStruct genRing;
Size totalSize; /* total size of segs in gen in this pool */
Size newSize; /* size allocated since last GC */
} PoolGenStruct;
Modified: trunk/mps/code/check.h
==============================================================================
--- trunk/mps/code/check.h (original)
+++ trunk/mps/code/check.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* check.h: ASSERTION INTERFACE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/check.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/check.h#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
Modified: trunk/mps/code/comm.gmk
==============================================================================
--- trunk/mps/code/comm.gmk (original)
+++ trunk/mps/code/comm.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# comm.gmk: COMMON GNUMAKEFILE FRAGMENT
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/comm.gmk#2 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/comm.gmk#19 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# DESCRIPTION
@@ -266,19 +266,22 @@
all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
mpsicv lockcov poolncv locv qs apss \
- finalcv arenacv bttest teletest \
+ finalcv finaltest arenacv bttest teletest \
abqtest cbstest btcv mv2test messtest steptest \
- eventcnv mps.a
+ eventcnv walkt0 libcbt \
+ mps.a
swall: mmsw.a replaysw
-# Runs the automatic tests that are built with CONFIG_PROD_MPS
+# Runs the automatic tests that are built with CONFIG_PROD_MPS.
# These tests are run overnight (see design.buildsys.overnight).
# bttest & teletest cannot be run unattended
# mv2test cannot be run because MV2 is broken
+# %%TARGET: If target is suitable for the overnight tests, then
+# add it here.
testrun: mpmss apss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
- mpsicv lockcov poolncv locv qs finalcv arenacv \
- abqtest cbstest btcv messtest steptest
+ mpsicv lockcov poolncv locv qs finalcv finaltest arenacv \
+ abqtest cbstest btcv messtest steptest walkt0
$(^:%=date && $(PFM)/$(VARIETY)/% &&) true
# These convenience targets allow one to type "make foo" to build target
@@ -288,9 +291,13 @@
mpmss sacss amcss amcssth amcsshe amsss amssshe segsmss awlut awlutth \
awluthe mpsicv lockcov poolncv locv qs apss \
- finalcv arenacv bttest teletest \
+ finalcv finaltest arenacv bttest teletest \
+ expt825 \
+ libcbt \
abqtest cbstest btcv mv2test \
messtest steptest \
+ walkt0 \
+ exposet0 \
eventcnv replay replaysw \
mps.a mmsw.a mpsplan.a mmdw.a: phony
ifdef VARIETY
@@ -317,6 +324,7 @@
$(MAKE) -f $(PFM).gmk VARIETY=hi variety
$(MAKE) -f $(PFM).gmk VARIETY=ci variety
$(MAKE) -f $(PFM).gmk VARIETY=ti variety
+ $(MAKE) -f $(PFM).gmk VARIETY=wi variety
endif
endif
@@ -342,86 +350,103 @@
ifdef VARIETY
$(PFM)/$(VARIETY)/finalcv: $(PFM)/$(VARIETY)/finalcv.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+
+$(PFM)/$(VARIETY)/finaltest: $(PFM)/$(VARIETY)/finaltest.o \
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+
+$(PFM)/$(VARIETY)/expt825: $(PFM)/$(VARIETY)/expt825.o \
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+
+$(PFM)/$(VARIETY)/libcbt: $(PFM)/$(VARIETY)/libcbt.o \
+ $(PFM)/$(VARIETY)/mpslibcb.o \
+ $(PFM)/$(VARIETY)/mpsioan.o \
+ $(MPMOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/locv: $(PFM)/$(VARIETY)/locv.o \
- $(MPMOBJ) $(LOOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/mpmss: $(PFM)/$(VARIETY)/mpmss.o \
- $(MPMOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/apss: $(PFM)/$(VARIETY)/apss.o \
- $(MPMOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/sacss: $(PFM)/$(VARIETY)/sacss.o \
- $(MPMOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/bttest: $(PFM)/$(VARIETY)/bttest.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/teletest: $(PFM)/$(VARIETY)/teletest.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/lockcov: $(PFM)/$(VARIETY)/lockcov.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/mpsicv: $(PFM)/$(VARIETY)/mpsicv.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/amcss: $(PFM)/$(VARIETY)/amcss.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/amcssth: $(PFM)/$(VARIETY)/amcssth.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/amcsshe: $(PFM)/$(VARIETY)/amcsshe.o \
- $(FMTHETSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/amsss: $(PFM)/$(VARIETY)/amsss.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMSOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/amssshe: $(PFM)/$(VARIETY)/amssshe.o \
- $(FMTHETSTOBJ) $(MPMOBJ) $(AMSOBJ) $(TESTLIBOBJ)
+ $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/segsmss: $(PFM)/$(VARIETY)/segsmss.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMSOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/awlut: $(PFM)/$(VARIETY)/awlut.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/awluthe: $(PFM)/$(VARIETY)/awluthe.o \
- $(FMTHETSTOBJ) $(MPMOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
+ $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/awlutth: $(PFM)/$(VARIETY)/awlutth.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/poolncv: $(PFM)/$(VARIETY)/poolncv.o \
- $(MPMOBJ) $(TESTLIBOBJ) $(POOLNOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(POOLNOBJ)
$(PFM)/$(VARIETY)/qs: $(PFM)/$(VARIETY)/qs.o \
- $(AMCOBJ) $(MPMOBJ) $(TESTLIBOBJ)
+ $(AMCOBJ) $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/arenacv: $(PFM)/$(VARIETY)/arenacv.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/abqtest: $(PFM)/$(VARIETY)/abqtest.o \
- $(PFM)/$(VARIETY)/abq.o $(MPMOBJ) $(TESTLIBOBJ)
+ $(PFM)/$(VARIETY)/abq.o $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/cbstest: $(PFM)/$(VARIETY)/cbstest.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/btcv: $(PFM)/$(VARIETY)/btcv.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/mv2test: $(PFM)/$(VARIETY)/mv2test.o \
$(PFM)/$(VARIETY)/poolmv2.o $(PFM)/$(VARIETY)/abq.o \
- $(MPMOBJ) $(TESTLIBOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/messtest: $(PFM)/$(VARIETY)/messtest.o \
$(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/steptest: $(PFM)/$(VARIETY)/steptest.o \
- $(FMTDYTSTOBJ) $(MPMOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+
+$(PFM)/$(VARIETY)/walkt0: $(PFM)/$(VARIETY)/walkt0.o \
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
+
+$(PFM)/$(VARIETY)/exposet0: $(PFM)/$(VARIETY)/exposet0.o \
+ $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ)
$(PFM)/$(VARIETY)/eventcnv: $(PFM)/$(VARIETY)/eventcnv.o \
$(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o
@@ -429,7 +454,8 @@
$(PFM)/$(VARIETY)/replay: $(PFM)/$(VARIETY)/replay.o \
$(PFM)/$(VARIETY)/eventrep.o \
$(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o \
- $(MPMOBJ) $(AWLOBJ) $(AMSOBJ) $(POOLNOBJ) $(AMCOBJ) $(SNCOBJ) $(MVFFOBJ)
+ $(MPMOBJ) $(PLINTHOBJ) $(AWLOBJ) $(AMSOBJ) $(POOLNOBJ) \
+ $(AMCOBJ) $(SNCOBJ) $(MVFFOBJ)
$(PFM)/$(VARIETY)/mps.a: $(MPMOBJ) $(AMCOBJ) $(SNCOBJ) $(MVFFOBJ)
Modified: trunk/mps/code/commpost.nmk
==============================================================================
--- trunk/mps/code/commpost.nmk (original)
+++ trunk/mps/code/commpost.nmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# commpost.nmk: SECOND COMMON FRAGMENT FOR PLATFORMS USING MV AND NMAKE
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/commpost.nmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/commpost.nmk#21 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# DESCRIPTION
@@ -16,7 +16,7 @@
all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe
awluthe.exe\
mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \
- finalcv.exe arenacv.exe bttest.exe teletest.exe protcv.exe \
+ finalcv.exe finaltest.exe arenacv.exe bttest.exe teletest.exe protcv.exe \
abqtest.exe cbstest.exe btcv.exe mv2test.exe messtest.exe steptest.exe \
locbwcss.exe locusss.exe \
eventcnv.exe
@@ -31,11 +31,14 @@
mpmss.exe amcss.exe amcsshe.exe amsss.exe amssshe.exe segsmss.exe awlut.exe
awluthe.exe dwstress.exe \
mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \
- finalcv.exe arenacv.exe bttest.exe teletest.exe protcv.exe \
+ finalcv.exe finaltest.exe arenacv.exe bttest.exe teletest.exe protcv.exe \
+ expt825.exe \
abqtest.exe cbstest.exe btcv.exe mv2test.exe messtest.exe steptest.exe \
- locbwcss.exe locusss.exe \
+ walkt0.exe locbwcss.exe locusss.exe \
+ exposet0.exe \
replay.exe replaysw.exe eventcnv.exe \
- mmdw.lib mmsw.lib mps_conf.lib mpsplan.lib:
+ mmdw.lib mmsw.lib mps.lib mpsplan.lib mpsplcb.lib \
+ mpsdy.dll:
!IFDEF VARIETY
$(MAKE) /nologo /f $(PFM).nmk TARGET=$@ variety
!ELSE
@@ -63,6 +66,7 @@
$(MAKE) /nologo /f $(PFM).nmk VARIETY=hi variety
$(MAKE) /nologo /f $(PFM).nmk VARIETY=ci variety
$(MAKE) /nologo /f $(PFM).nmk VARIETY=ti variety
+ $(MAKE) /nologo /f $(PFM).nmk VARIETY=wi variety
!ENDIF
!ENDIF
@@ -106,6 +110,14 @@
$(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(DWOBJ) $(DWTESTOBJ) \
$(MRGOBJ) $(TESTLIBOBJ)
+$(PFM)\$(VARIETY)\finaltest.exe: $(PFM)\$(VARIETY)\finaltest.obj \
+ $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(DWOBJ) $(DWTESTOBJ) \
+ $(MRGOBJ) $(TESTLIBOBJ)
+
+$(PFM)\$(VARIETY)\expt825.exe: $(PFM)\$(VARIETY)\expt825.obj \
+ $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(DWOBJ) $(DWTESTOBJ) \
+ $(MRGOBJ) $(TESTLIBOBJ)
+
$(PFM)\$(VARIETY)\locv.exe: $(PFM)\$(VARIETY)\locv.obj \
$(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(LOOBJ)
@@ -140,7 +152,7 @@
$(TESTLIBOBJ)
$(PFM)\$(VARIETY)\amcsshe.exe: $(PFM)\$(VARIETY)\amcsshe.obj \
- $(CONFIGURAOBJ) $(AMCOBJ) $(PLINTHOBJ) $(HETESTOBJ) \
+ $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(HETESTOBJ) \
$(TESTLIBOBJ)
$(PFM)\$(VARIETY)\amsss.exe: $(PFM)\$(VARIETY)\amsss.obj \
@@ -219,6 +231,14 @@
$(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(DWOBJ) $(DWTESTOBJ) \
$(TESTLIBOBJ)
+$(PFM)\$(VARIETY)\walkt0.exe: $(PFM)\$(VARIETY)\walkt0.obj \
+ $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(DWOBJ) $(DWTESTOBJ) \
+ $(TESTLIBOBJ)
+
+$(PFM)\$(VARIETY)\exposet0.exe: $(PFM)\$(VARIETY)\exposet0.obj \
+ $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(DWOBJ) $(DWTESTOBJ) \
+ $(TESTLIBOBJ)
+
$(PFM)\$(VARIETY)\mmsw.lib: $(SWOBJ)
$(ECHO) $@
$(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
@@ -228,12 +248,29 @@
$(ECHO) $@
$(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
-$(PFM)\$(VARIETY)\mps_conf.lib: $(CONFIGURAOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
+$(PFM)\$(VARIETY)\mps.lib: $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
$(MVFFOBJ) $(AMSOBJ) $(AWLOBJ)
$(ECHO) $@
$(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
+# We would like to use $** in the linker command line here, but we
+# cannot because the target, mpsdy.dll, depends on the w3gen.def file,
+# but this is not to be treated as an object on the linker line. Sorry
+# about the repetition of the object list.
+$(PFM)\$(VARIETY)\mpsdy.dll: $(PFM)\$(VARIETY)\mpslibcb.obj \
+ $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
+ $(MVFFOBJ) $(AMSOBJ) $(AWLOBJ) w3gen.def
+ $(ECHO) $@
+ $(LINKER) $(LINKFLAGS) /def:w3gen.def /dll /OUT:$@ \
+ $(PFM)\$(VARIETY)\mpslibcb.obj \
+ $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
+ $(MVFFOBJ) $(AMSOBJ) $(AWLOBJ)
+
$(PFM)\$(VARIETY)\mpsplan.lib: $(PLINTHOBJ)
+ $(ECHO) $@
+ $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
+
+$(PFM)\$(VARIETY)\mpsplcb.lib: $(PFM)\$(VARIETY)\mpslibcb.obj
$(ECHO) $@
$(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
Modified: trunk/mps/code/commpre.nmk
==============================================================================
--- trunk/mps/code/commpre.nmk (original)
+++ trunk/mps/code/commpre.nmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# commpre.nmk: FIRST COMMON FRAGMENT FOR PLATFORMS USING MV AND NMAKE
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/commpre.nmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/commpre.nmk#12 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# DESCRIPTION
@@ -112,16 +112,6 @@
LINKFLAGSHOT = libcmt.lib
LINKFLAGSCOOL = libcmt.lib
-!elseif "$(TARGET)" == "mps_conf.lib" || "$(TARGET)" == "amcsshe.exe"
-CFLAGSTARGETPRE = /DCONFIG_PROD_CONFIGURA
-CFLAGSTARGETPOST =
-CRTFLAGSW = /ML
-CRTFLAGSH = /ML
-CRTFLAGSC = /MLd
-LINKFLAGSWHITE = libc.lib
-LINKFLAGSHOT = libc.lib
-LINKFLAGSCOOL = libcd.lib
-
!else
CFLAGSTARGETPRE = /DCONFIG_PROD_MPS
CFLAGSTARGETPOST =
@@ -139,7 +129,14 @@
# Flags for use in the variety combinations
CFLAGSHOT = /Ox /DNDEBUG
-CFLAGSCOOL = /Od /GZ
+# We used to have /GZ here (stack probe).
+# Note that GZ is specific to version 12 of the cl tool. drj 2003-11-04
+# It is ignored on earlier versions of the cl tool.
+# /GZ here generates a dependency on the C library and when we are
+# building a DLL, mpsdy.dll, the linker step will fail (error LNK2001:
+# unresolved external symbol __chkesp). See
+# http://support.microsoft.com/kb/q191669/
+CFLAGSCOOL = /Od
CFLAGSINTERNAL = /Zi
CFLAGSEXTERNAL =
Modified: trunk/mps/code/config.h
==============================================================================
--- trunk/mps/code/config.h (original)
+++ trunk/mps/code/config.h Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* config.h: MPS CONFIGURATION
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/config.h#2 $
- * Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
+ * $Id: //info.ravenbrook.com/project/mps/master/code/config.h#14 $
+ * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
* PURPOSE
@@ -210,6 +210,10 @@
/* I count 4 function calls to scan, 10 to copy. */
#define TraceCopyScanRATIO (1.5)
+/* Chosen so that the RememberedSummaryBlockStruct packs nicely into
+ pages */
+#define RememberedSummaryBLOCK 15
+
/* Events
@@ -264,25 +268,12 @@
#elif defined(CONFIG_PROD_DYLAN)
#define MPS_PROD_STRING "dylan"
#define MPS_PROD_DYLAN
-/* .prod.arena-size: ARENA_SIZE is currently set larger for the
- * MM/Dylan product as an interim solution.
- * See request.dylan.170170.sol.patch and change.dylan.buffalo.170170.
- */
-#define ARENA_SIZE ((Size)1<<30)
#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL)
#define THREAD_MULTI
#define PROTECTION
#define DONGLE_NONE
#define PROD_CHECK_DEFAULT CheckSHALLOW
-#elif defined(CONFIG_PROD_CONFIGURA)
-#define MPS_PROD_STRING "configura"
-#define MPS_PROD_CONFIGURA
-#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL)
-#define THREAD_SINGLE
-#define PROTECTION
-#define DONGLE_NONE
-
#elif defined(CONFIG_PROD_MPS)
#define MPS_PROD_STRING "mps"
#define MPS_PROD_MPS
@@ -296,6 +287,14 @@
#error "No target product configured."
#endif
+/* .prod.arena-size: ARENA_SIZE is currently set larger for the
+ * MM/Dylan product as an interim solution.
+ * See request.dylan.170170.sol.patch and change.dylan.buffalo.170170.
+ * Note that this define is only used by the implementation of the
+ * deprecated mps_space_create interface.
+ */
+#define ARENA_SIZE ((Size)1<<30)
+
/* if CHECK_DEFAULT hasn't been defined already (e.g. by a variety, or
* in a makefile), take the value from the product. */
@@ -324,7 +323,7 @@
/* C. COPYRIGHT AND LICENSE
*
- * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
+ * Copyright (C) 2001-2003 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*
Modified: trunk/mps/code/cx.gmk
==============================================================================
--- trunk/mps/code/cx.gmk (original)
+++ trunk/mps/code/cx.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# sc.gmk: GNUMAKEFILE FRAGMENT FOR CXREF
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/cx.gmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/cx.gmk#8 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# This file is included by platform makefiles that generate a c
Modified: trunk/mps/code/dbgpool.c
==============================================================================
--- trunk/mps/code/dbgpool.c (original)
+++ trunk/mps/code/dbgpool.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* dbgpool.c: POOL DEBUG MIXIN
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/dbgpool.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/dbgpool.c#11 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
@@ -13,7 +13,7 @@
#include "mpm.h"
#include <stdarg.h>
-SRCID(dbgpool, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/dbgpool.c#1 $");
+SRCID(dbgpool, "$Id:
//info.ravenbrook.com/project/mps/master/code/dbgpool.c#11 $");
/* tagStruct -- tags for storing info about allocated objects */
@@ -160,7 +160,7 @@
/* free-checking init */
/* @@@@ This parses a user argument, options, so it should really */
/* go through the MPS interface. The template needs to be copied */
- /* into Addr memory, to avoid breaking design.mps.type.addr.use. */
+ /* into Addr memory, to avoid breaking <design/type#addr.use>. */
debug->freeSize = options->freeSize;
if (debug->freeSize != 0) {
if (PoolAlignment(pool) % debug->freeSize != 0) {
@@ -420,7 +420,7 @@
UNUSED(pool);
res = PoolAlloc((Addr*)&tag, debug->tagPool, debug->tagSize, FALSE);
if (res != ResOK) {
- if (withReservoir) { /* design.mps.object-debug.out-of-space */
+ if (withReservoir) { /* <design/object-debug/#out-of-space */
debug->missingTags++;
return ResOK;
} else {
Modified: trunk/mps/code/dbgpool.h
==============================================================================
--- trunk/mps/code/dbgpool.h (original)
+++ trunk/mps/code/dbgpool.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* dbgpool.h: POOL DEBUG MIXIN
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/dbgpool.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/dbgpool.h#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*/
Modified: trunk/mps/code/dbgpooli.c
==============================================================================
--- trunk/mps/code/dbgpooli.c (original)
+++ trunk/mps/code/dbgpooli.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* dbgpooli.c: POOL DEBUG MIXIN C INTERFACE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/dbgpooli.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/dbgpooli.c#4 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
@@ -11,7 +11,7 @@
#include "mps.h"
#include "mpm.h"
-SRCID(dbgpooli, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/dbgpooli.c#1 $");
+SRCID(dbgpooli, "$Id:
//info.ravenbrook.com/project/mps/master/code/dbgpooli.c#4 $");
/* mps_pool_check_fenceposts -- check all the fenceposts in the pool */
@@ -21,7 +21,7 @@
Pool pool = (Pool)mps_pool;
Arena arena;
- /* CHECKT not AVERT, see design.mps.interface.c.check.space */
+ /* CHECKT not AVERT, see <design/interface-c/#check.space */
AVER(CHECKT(Pool, pool));
arena = PoolArena(pool);
@@ -41,7 +41,7 @@
Pool pool = (Pool)mps_pool;
Arena arena;
- /* CHECKT not AVERT, see design.mps.interface.c.check.space */
+ /* CHECKT not AVERT, see <design/interface-c/#check.space */
AVER(CHECKT(Pool, pool));
arena = PoolArena(pool);
Modified: trunk/mps/code/dc.gmk
==============================================================================
--- trunk/mps/code/dc.gmk (original)
+++ trunk/mps/code/dc.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# dc.gmk: GNUMAKEFILE FRAGMENT FOR DIGITAL C COMPILER (DEC UNIX/OSF)
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/dc.gmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/dc.gmk#8 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# See design.buildsys.unix
Modified: trunk/mps/code/dumper.c
==============================================================================
--- trunk/mps/code/dumper.c (original)
+++ trunk/mps/code/dumper.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* dumper.c: Simple Event Dumper
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/dumper.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/dumper.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: MM developers.
Modified: trunk/mps/code/eg.gmk
==============================================================================
--- trunk/mps/code/eg.gmk (original)
+++ trunk/mps/code/eg.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# eg.gmk: GNUMAKEFILE FRAGMENT FOR EGCS
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eg.gmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/eg.gmk#8 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# This file is included by platform makefiles that use the EGCS
Modified: trunk/mps/code/event.c
==============================================================================
--- trunk/mps/code/event.c (original)
+++ trunk/mps/code/event.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* event.c: EVENT LOGGING
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/event.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/event.c#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .sources: mps.design.event
@@ -25,7 +25,7 @@
#include "event.h"
#include "mpsio.h"
-SRCID(event, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/event.c#1 $");
+SRCID(event, "$Id: //info.ravenbrook.com/project/mps/master/code/event.c#9 $");
#ifdef EVENT /* .trans.ifdef */
Modified: trunk/mps/code/event.h
==============================================================================
--- trunk/mps/code/event.h (original)
+++ trunk/mps/code/event.h Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* <code/event.h> -- Event Logging Interface
*
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/event.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/event.h#9 $
*
* READERSHIP
*
Modified: trunk/mps/code/eventcnv.c
==============================================================================
--- trunk/mps/code/eventcnv.c (original)
+++ trunk/mps/code/eventcnv.c Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* eventcnv.c: Simple event log converter
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventcnv.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventcnv.c#9 $
*/
#include "config.h"
Modified: trunk/mps/code/eventcom.h
==============================================================================
--- trunk/mps/code/eventcom.h (original)
+++ trunk/mps/code/eventcom.h Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* <code/eventcom.h> -- Event Logging Common Definitions
*
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventcom.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventcom.h#9 $
*
* .sources: mps.design.telemetry
*/
Modified: trunk/mps/code/eventdef.h
==============================================================================
--- trunk/mps/code/eventdef.h (original)
+++ trunk/mps/code/eventdef.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* <code/eventdef.h> -- Event Logging Definitions
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventdef.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventdef.h#9 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .source: <design/telemetry/>
Modified: trunk/mps/code/eventgen.h
==============================================================================
--- trunk/mps/code/eventgen.h (original)
+++ trunk/mps/code/eventgen.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* <code/eventgen.h> -- Automatic event header
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventgen.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventgen.h#7 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* DO NOT EDIT THIS FILE!
Modified: trunk/mps/code/eventgen.pl
==============================================================================
--- trunk/mps/code/eventgen.pl (original)
+++ trunk/mps/code/eventgen.pl Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl -w
# impl.pl.eventgen: GENERATOR FOR <code/eventgen.h>
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventgen.pl#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/eventgen.pl#10 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# .how: Invoke this script in the src directory. It works by scanning
@@ -11,7 +11,7 @@
# You will need to have eventgen.h claimed, and you should
# remember to check it in afterwards.
-$ID = substr(q$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/eventgen.pl#1 $, 4, -1);
+$ID = substr(q$Id:
//info.ravenbrook.com/project/mps/master/code/eventgen.pl#10 $, 4, -1);
%Formats = ();
Modified: trunk/mps/code/eventpro.c
==============================================================================
--- trunk/mps/code/eventpro.c (original)
+++ trunk/mps/code/eventpro.c Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* eventpro.c: Event processing routines
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventpro.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventpro.c#9 $
*/
#include "config.h"
Modified: trunk/mps/code/eventpro.h
==============================================================================
--- trunk/mps/code/eventpro.h (original)
+++ trunk/mps/code/eventpro.h Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* eventpro.h: Interface for event processing routines
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventpro.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventpro.h#8 $
*/
#ifndef eventpro_h
Modified: trunk/mps/code/eventrep.c
==============================================================================
--- trunk/mps/code/eventrep.c (original)
+++ trunk/mps/code/eventrep.c Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* eventrep.c: Allocation replayer routines
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventrep.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventrep.c#8 $
*/
#include "config.h"
Modified: trunk/mps/code/eventrep.h
==============================================================================
--- trunk/mps/code/eventrep.h (original)
+++ trunk/mps/code/eventrep.h Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* eventrep.h: Allocation replayer interface
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/eventrep.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/eventrep.h#8 $
*/
#ifndef eventrep_h
Added: trunk/mps/code/expgen.sh
==============================================================================
--- (empty file)
+++ trunk/mps/code/expgen.sh Tue Sep 27 18:23:25 2005
@@ -0,0 +1,155 @@
+#!/bin/sh
+# $Header: //info.ravenbrook.com/project/mps/master/code/expgen.sh#1 $
+#
+# Copyright (C) 2004 Ravenbrook Limited. All rights reserved.
+#
+# expgen.sh
+#
+# Export Generator
+#
+# This is a script to generate the a list of exports that is required
+# for Windows DLL creation.
+#
+# It processed the mps header files and produces a .DEF file that is
+# suitable for use with the linker when producing a DLL file on Windows.
+#
+# When run, this script produces the following output files:
+# expgen - a plain text list of functions declared in the header files.
+# w3gen.def - a .def file suitable for use in the linker stage when
+# building a Windows .DLL.
+#
+# Procedure for rebuilding a new w3gen.def
+#
+# This procedure should be carried out when the contents of w3gen.def
+# would change. This is a bit tricky to say exactly when, but certainly
+# when:
+# a) new functions are declared in public header files.
+# b) different header files are released to a client.
+#
+# Procedure:
+#
+# 1) Ensure that the sources for w3gen.def are submitted. w3gen.def
+# must be built from versioned sources.
+# The sources are:
+# expgen.sh
+# w3build.bat
+# all the headers that get included.
+# For safety's sake better to ensure that no files are open:
+# p4 opened ...
+# should say '... - file(s) not opened on this client.'
+#
+# 2) Open w3gen.def for edit (making it writable)
+# p4 open w3gen.def
+#
+# 3) Run this script.
+# sh expgen.sh
+# There should be no output when successful.
+#
+# 4) Eyeball the diff.
+# p4 diff ...
+# Check the that resulting diff is sane. For most changes it should
+# just consist of a new symbol being included (plus some Header related
+# junk).
+#
+# 5) Submit the change.
+# p4 submit ...
+#
+#
+# Design
+#
+# The script works by using the -fdump-translation-unit option of gcc.
+# This produces a more easily parseable rendering of the header files.
+# A fairly simple awk script is used to process the output.
+#
+#
+# Dependencies
+#
+# This script currently depends fairly heavily on being run in a
+# Unix-like environment with access to the GNU compiler.
+#
+# It's also fairly sensitive to changes in the undocumented format
+# produced by gcc -fdump-translation-unit. Hopefully it is fairly easy
+# to adapt to changes in this output.
+#
+# Assumes it can freely write to the files "fun", "name-s".
+#
+#
+# Awk crash course
+#
+# Awk processes files line-by-line, thus the entire script is executed
+# for each line of the input file (more complex awk scripts can control
+# this using "next" and "getline" and so on).
+#
+# In awk $exp identifies a field within the line. $1 is the first
+# field, $2 is the second and so on. $0 is the whole line. By default
+# fields are separated by whitespace.
+#
+# string ~ RE is a matching expression and evaulated to true iff the
+# string is matched by the regular expression.
+#
+# REFERENCES
+#
+# [SUSV3] Single UNIX Specification Version 3,
+# http://www.unix.org/single_unix_specification/
+#
+# For documenation of the standard utilities: sh, awk, join, sort, sed
+#
+# [MSDN-LINKER-DEF] Module-Definition (.def) files,
+#
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_module.2d.definition_files.asp
+#
+# For documentation on the format of .def files.
+
+tu () {
+ # if invoked on a file called spong.h will produce a file named
+ # spong.h.tu
+ gcc -fdump-translation-unit -o /dev/null "$@"
+}
+
+# This list of header files is produced by
+# awk '/^copy.*\.h/{print $2}' w3build.bat
+# followed by manual removal of mpsw3.h mpswin.h (which gcc on UNIX
+# cannot parse). Also removed are mpsio.h mpslib.h as they defined
+# interfaces that mps _uses_ not defines. Also removed is mpscmvff.h as
+# it does not get included in mps.lib
+# The functions declared in mpsw3.h have to be added to the .def file by
+# hand later in this script.
+f='mps.h
+mpsavm.h
+mpsacl.h
+mpscamc.h
+mpscams.h
+mpscawl.h
+mpsclo.h
+mpscmv.h
+mpscsnc.h
+mpslibcb.h
+mpstd.h'
+
+tu $f
+
+>expgen
+
+for a in $f
+do
+ >fun
+ awk '
+ $2=="function_decl" && $7=="srcp:" && $8 ~ /^'$a':/ {print $4 >"fun"}
+ $2=="identifier_node"{print $1,$4}
+ ' $a.tu |
+ sort -k 1 >name-s
+
+ echo ';' $a >>expgen
+ sort -k 1 fun |
+ join -o 2.2 - name-s >>expgen
+done
+
+{
+ printf '; %sHeader%s\n' '$' '$'
+ echo '; DO NOT EDIT. Automatically generated by $Header:
//info.ravenbrook.com/project/mps/master/code/expgen.sh#1 $' | sed 's/\$/!/g'
+ echo 'EXPORTS'
+ cat expgen
+ # This is where we manually the functions declared in mpsw3.h
+ echo ';' mpsw3.h - by hand
+ echo mps_SEH_filter
+ echo mps_SEH_handler
+} > w3gen.def
Added: trunk/mps/code/exposet0.c
==============================================================================
--- (empty file)
+++ trunk/mps/code/exposet0.c Tue Sep 27 18:23:25 2005
@@ -0,0 +1,314 @@
+/* exposet0.c: ARENA EXPOSE TEST
+ *
+ * $Id: //info.ravenbrook.com/project/mps/master/code/exposet0.c#1 $
+ * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license.
+ * Portions copyright (C) 2002 Global Graphics Software.
+ *
+ * The primary purpose of this test is to test that mps_arena_expose does
+ * not protect any pages. This is only tested to any real extent on
+ * Windows where an exception handler in test_stepper is used to catch any
+ * would-be exceptions (there aren't any if the MPS is operating
+ * correctly).
+ *
+ */
+
+#include "fmtdy.h"
+#include "fmtdytst.h"
+#include "testlib.h"
+#include "mpscamc.h"
+#include "mpsavm.h"
+#include "mpstd.h"
+#ifdef MPS_OS_W3
+#include "mpsw3.h"
+#endif
+#include "mps.h"
+#include <stdlib.h>
+#include <string.h>
+
+
+/* These values have been tuned in the hope of getting one dynamic collection.
*/
+#define testArenaSIZE ((size_t)1000*1024)
+#define gen1SIZE ((size_t)150)
+#define gen2SIZE ((size_t)170)
+#define avLEN 3
+#define exactRootsCOUNT 180
+#define ambigRootsCOUNT 50
+#define genCOUNT 2
+#define collectionsCOUNT 37
+#define rampSIZE 9
+#define initTestFREQ 6000
+
+/* testChain -- generation parameters for the test */
+
+static mps_gen_param_s testChain[genCOUNT] = {
+ { gen1SIZE, 0.85 }, { gen2SIZE, 0.45 } };
+
+
+/* objNULL needs to be odd so that it's ignored in exactRoots. */
+#define objNULL ((mps_addr_t)0xDECEA5ED)
+
+
+static mps_pool_t pool_g;
+static mps_ap_t ap;
+static mps_addr_t exactRoots[exactRootsCOUNT];
+static mps_addr_t ambigRoots[ambigRootsCOUNT];
+
+
+/* report - report statistics from any terminated GCs */
+
+static void report(mps_arena_t arena)
+{
+ mps_message_t message;
+ static int nCollections = 0;
+
+ while (mps_message_get(&message, arena, mps_message_type_gc())) {
+ size_t live, condemned, not_condemned;
+
+ live = mps_message_gc_live_size(arena, message);
+ condemned = mps_message_gc_condemned_size(arena, message);
+ not_condemned = mps_message_gc_not_condemned_size(arena, message);
+
+ printf("\nCollection %d finished:\n", ++nCollections);
+ printf("live %lu\n", (unsigned long)live);
+ printf("condemned %lu\n", (unsigned long)condemned);
+ printf("not_condemned %lu\n", (unsigned long)not_condemned);
+
+ mps_message_discard(arena, message);
+
+ if (condemned > (gen1SIZE + gen2SIZE + (size_t)128) * 1024)
+ /* When condemned size is larger than could happen in a gen 2
+ * collection (discounting ramps, natch), guess that was a dynamic
+ * collection, and reset the commit limit, so it doesn't run out. */
+ die(mps_arena_commit_limit_set(arena, 2 * testArenaSIZE), "set limit");
+ }
+}
+
+
+/* make -- create one new object */
+
+static mps_addr_t make(void)
+{
+ size_t length = rnd() % (2*avLEN);
+ size_t size = (length+2) * sizeof(mps_word_t);
+ mps_addr_t p;
+ mps_res_t res;
+
+ do {
+ MPS_RESERVE_BLOCK(res, p, ap, size);
+ if (res)
+ die(res, "MPS_RESERVE_BLOCK");
+ res = dylan_init(p, size, exactRoots, exactRootsCOUNT);
+ if (res)
+ die(res, "dylan_init");
+ } while(!mps_commit(ap, p, size));
+
+ return p;
+}
+
+
+/* test_stepper -- stepping function for walk */
+
+static void test_stepper(mps_addr_t object, mps_fmt_t fmt, mps_pool_t pool,
+ void *p, size_t s)
+{
+ testlib_unused(fmt);
+ testlib_unused(pool);
+ testlib_unused(s);
+#ifdef MPS_OS_W3
+ __try {
+ dylan_mutate(object);
+ } __except(EXCEPTION_EXECUTE_HANDLER) {
+ error("Unexpected exception.\n");
+ }
+#else
+ dylan_mutate(object);
+#endif
+
+ (*(unsigned long *)p)++;
+}
+
+
+/* test -- the body of the test */
+
+static void *test(void *arg, size_t s)
+{
+ mps_addr_t busy_init;
+ mps_ap_t busy_ap;
+ mps_arena_t arena;
+ mps_chain_t chain;
+ mps_fmt_t format;
+ mps_root_t exactRoot, ambigRoot;
+ mps_word_t collections;
+ size_t i;
+ unsigned long objs;
+
+ arena = (mps_arena_t)arg;
+ (void)s; /* unused */
+
+ die(dylan_fmt(&format, arena), "fmt_create");
+ die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
+
+ die(mps_pool_create(&pool_g, arena, mps_class_amc(), format, chain),
+ "pool_create(amc)");
+
+ die(mps_ap_create(&ap, pool_g, MPS_RANK_EXACT), "BufferCreate");
+ die(mps_ap_create(&busy_ap, pool_g, MPS_RANK_EXACT), "BufferCreate 2");
+
+ for(i = 0; i < exactRootsCOUNT; ++i) {
+ exactRoots[i] = objNULL;
+ }
+ for(i = 0; i < ambigRootsCOUNT; ++i) {
+ ambigRoots[i] = rnd_addr();
+ }
+
+ die(mps_root_create_table_masked(&exactRoot, arena,
+ MPS_RANK_EXACT, (mps_rm_t)0,
+ &exactRoots[0], exactRootsCOUNT,
+ (mps_word_t)1),
+ "root_create_table(exact)");
+ die(mps_root_create_table(&ambigRoot, arena,
+ MPS_RANK_AMBIG, (mps_rm_t)0,
+ &ambigRoots[0], ambigRootsCOUNT),
+ "root_create_table(ambig)");
+
+ /* create an ap, and leave it busy */
+ die(mps_reserve(&busy_init, busy_ap, 64), "mps_reserve busy");
+
+ collections = 0;
+ objs = 0;
+ while (collections < collectionsCOUNT) {
+ unsigned long c;
+ size_t r;
+
+ c = mps_collections(arena);
+
+ if (collections != c) {
+ collections = c;
+ printf("\nCollection %lu started, %lu objects.\n", c, objs);
+
+ report(arena);
+ for (i = 0; i < exactRootsCOUNT; ++i) {
+ cdie(exactRoots[i] == objNULL
+ || (dylan_check(exactRoots[i])
+ && mps_arena_has_addr(arena, exactRoots[i])),
+ "all roots check");
+ }
+ cdie(!mps_arena_has_addr(arena, NULL),
+ "NULL in arena");
+
+ {
+ unsigned long object_count = 0;
+ mps_arena_expose(arena);
+ mps_arena_formatted_objects_walk(arena, test_stepper, &object_count, 0);
+ mps_arena_release(arena);
+ printf("stepped on %lu objects.\n", object_count);
+ }
+ }
+
+ r = (size_t)rnd();
+ if (r & 1) {
+ i = (r >> 1) % exactRootsCOUNT;
+ if (exactRoots[i] != objNULL) {
+ cdie(dylan_check(exactRoots[i]), "dying root check");
+ }
+ exactRoots[i] = make();
+ if (exactRoots[(exactRootsCOUNT-1) - i] != objNULL) {
+ dylan_write(exactRoots[(exactRootsCOUNT-1) - i],
+ exactRoots, exactRootsCOUNT);
+ }
+ } else {
+ i = (r >> 1) % ambigRootsCOUNT;
+ ambigRoots[(ambigRootsCOUNT-1) - i] = make();
+ /* Create random interior pointers */
+ ambigRoots[i] = (mps_addr_t)((char *)(ambigRoots[i/2]) + 1);
+ }
+
+ if (r % initTestFREQ == 0) {
+ *(int*)busy_init = -1; /* check that the buffer is still there */
+ }
+
+ if (objs % 1024 == 0) {
+ report(arena);
+ putchar('.');
+ fflush(stdout);
+ }
+
+ ++objs;
+ }
+
+ (void)mps_commit(busy_ap, busy_init, 64);
+ mps_ap_destroy(busy_ap);
+ mps_ap_destroy(ap);
+ mps_root_destroy(exactRoot);
+ mps_root_destroy(ambigRoot);
+ mps_pool_destroy(pool_g);
+ mps_chain_destroy(chain);
+ mps_fmt_destroy(format);
+
+ return NULL;
+}
+
+int main(int argc, char **argv)
+{
+ mps_arena_t arena;
+ mps_thr_t thread;
+ void *r;
+
+ randomize(argc, argv);
+
+ die(mps_arena_create(&arena, mps_arena_class_vm(), 2*testArenaSIZE),
+ "arena_create");
+ mps_message_type_enable(arena, mps_message_type_gc());
+ die(mps_arena_commit_limit_set(arena, testArenaSIZE), "set limit");
+ die(mps_thread_reg(&thread, arena), "thread_reg");
+ mps_tramp(&r, test, arena, 0);
+ mps_thread_dereg(thread);
+ report(arena);
+ mps_arena_destroy(arena);
+
+ fflush(stdout); /* synchronize */
+ fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
+ return 0;
+}
+
+
+/* C. COPYRIGHT AND LICENSE
+ *
+ * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
+ * All rights reserved. This is an open source license. Contact
+ * Ravenbrook for commercial licensing options.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Redistributions in any form must be accompanied by information on how
+ * to obtain complete source code for this software and any accompanying
+ * software that uses this software. The source code must either be
+ * included in the distribution or be available for no more than the cost
+ * of distribution plus a nominal fee, and must be freely redistributable
+ * under reasonable conditions. For an executable file, complete source
+ * code means the source code for all modules it contains. It does not
+ * include source code for modules or files that typically accompany the
+ * major components of the operating system on which the executable file
+ * runs.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
Added: trunk/mps/code/expt825.c
==============================================================================
--- (empty file)
+++ trunk/mps/code/expt825.c Tue Sep 27 18:23:25 2005
@@ -0,0 +1,314 @@
+/* expt825.c: Test for bug described in job000825
+ *
+ * $Id: //info.ravenbrook.com/project/mps/master/code/expt825.c#3 $
+ * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license.
+ * Portions copyright (C) 2002 Global Graphics Software.
+ *
+ * DESIGN
+ *
+ * Just a copy of finaltest.c with the following modifcations:
+ * maxtreeDEPTH is 2 rather than 12. This makes the test run and fail
+ * much more quickly.
+ *
+ * After trees have been created and finalized, call
+ * mps_arena_unsafe_expose_remember_protection / restore. If the bug
+ * is present then this sequence will fail.
+ *
+ *
+ * DEPENDENCIES
+ *
+ * This test uses the dylan object format, but the reliance on this
+ * particular format is not great and could be removed.
+ *
+ * NOTES
+ *
+ * This code was created by first copying <code/finalcv.c>
+ * and then further by copying <code/finaltest.c>
+ */
+
+#include "testlib.h"
+#include "mps.h"
+#include "mpscamc.h"
+#include "mpsavm.h"
+#include "fmtdy.h"
+#include "fmtdytst.h"
+#include "mpstd.h"
+#ifdef MPS_OS_W3
+#include "mpsw3.h"
+#endif
+#include <stdlib.h>
+
+
+#define testArenaSIZE ((size_t)16<<20)
+#define rootCOUNT 20
+#define maxtreeDEPTH 2
+#define collectionCOUNT 10
+#define genCOUNT 2
+
+/* testChain -- generation parameters for the test */
+
+static mps_gen_param_s testChain[genCOUNT] = {
+ { 150, 0.85 }, { 170, 0.45 } };
+
+
+/* global object counter */
+
+static mps_word_t object_count = 0;
+
+static mps_word_t make_numbered_cons(mps_word_t car, mps_word_t cdr,
+ mps_ap_t ap)
+{
+ mps_word_t cons;
+ die(make_dylan_vector(&cons, ap, 3), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(cons, 0) = car;
+ DYLAN_VECTOR_SLOT(cons, 1) = cdr;
+ DYLAN_VECTOR_SLOT(cons, 2) = DYLAN_INT(object_count);
+ ++ object_count;
+ return cons;
+}
+
+static mps_word_t make_numbered_tree(mps_word_t depth,
+ mps_ap_t ap)
+{
+ mps_word_t left, right;
+ if (depth < 2) {
+ left = DYLAN_INT(object_count);
+ right = DYLAN_INT(object_count);
+ } else {
+ left = make_numbered_tree(depth-1, ap);
+ right = make_numbered_tree(depth-1, ap);
+ }
+ return make_numbered_cons(left, right, ap);
+}
+
+static void register_numbered_tree(mps_word_t tree, mps_arena_t arena)
+{
+ /* don't finalize ints */
+ if ((tree & 1) == 0) {
+ mps_finalize(arena, (mps_addr_t *)&tree);
+ register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 0), arena);
+ register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 1), arena);
+ }
+}
+
+static mps_word_t make_indirect_cons(mps_word_t car, mps_word_t cdr,
+ mps_ap_t ap)
+{
+ mps_word_t cons, indirect;
+ die(make_dylan_vector(&indirect, ap, 1), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(indirect, 0) = DYLAN_INT(object_count);
+ die(make_dylan_vector(&cons, ap, 3), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(cons, 0) = car;
+ DYLAN_VECTOR_SLOT(cons, 1) = cdr;
+ DYLAN_VECTOR_SLOT(cons, 2) = indirect;
+ ++ object_count;
+ return cons;
+}
+
+static mps_word_t make_indirect_tree(mps_word_t depth,
+ mps_ap_t ap)
+{
+ mps_word_t left, right;
+ if (depth < 2) {
+ left = DYLAN_INT(object_count);
+ right = DYLAN_INT(object_count);
+ } else {
+ left = make_indirect_tree(depth-1, ap);
+ right = make_indirect_tree(depth-1, ap);
+ }
+ return make_indirect_cons(left, right, ap);
+}
+
+static void register_indirect_tree(mps_word_t tree, mps_arena_t arena)
+{
+ /* don't finalize ints */
+ if ((tree & 1) == 0) {
+ mps_word_t indirect = DYLAN_VECTOR_SLOT(tree,2);
+ mps_finalize(arena, (mps_addr_t *)&indirect);
+ register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 0), arena);
+ register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 1), arena);
+ }
+}
+
+
+static void *root[rootCOUNT];
+
+static void *test(void *arg, size_t s)
+{
+ mps_ap_t ap;
+ mps_fmt_t fmt;
+ mps_chain_t chain;
+ mps_word_t finals;
+ mps_pool_t amc;
+ mps_root_t mps_root;
+ mps_arena_t arena;
+ mps_message_t message;
+ size_t i;
+
+ arena = (mps_arena_t)arg;
+ (void)s;
+
+ die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create\n");
+ die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
+ die(mps_pool_create(&amc, arena, mps_class_amc(), fmt, chain),
+ "pool_create amc\n");
+ die(mps_root_create_table(&mps_root, arena, MPS_RANK_EXACT, (mps_rm_t)0,
+ root, (size_t)rootCOUNT),
+ "root_create\n");
+ die(mps_ap_create(&ap, amc, MPS_RANK_EXACT), "ap_create\n");
+
+ mps_message_type_enable(arena, mps_message_type_finalization());
+
+ mps_arena_park(arena);
+
+ object_count = 0;
+
+ printf("Making some finalized trees of objects.\n");
+ /* make some trees */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = (void *)make_numbered_tree(maxtreeDEPTH, ap);
+ register_numbered_tree((mps_word_t)root[i], arena);
+ }
+
+ mps_arena_unsafe_expose_remember_protection(arena);
+ mps_arena_unsafe_restore_protection(arena);
+
+ printf("Losing all pointers to the trees.\n");
+ /* clean out the roots */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = 0;
+ }
+
+ finals = 0;
+
+ while ((finals < object_count) &&
+ (mps_collections(arena) < collectionCOUNT)) {
+ mps_word_t final_this_time = 0;
+ printf("Collecting...");
+ fflush(stdout);
+ die(mps_arena_collect(arena), "collect");
+ printf(" Done.\n");
+ while (mps_message_poll(arena)) {
+ mps_word_t obj;
+ mps_addr_t objaddr;
+ cdie(mps_message_get(&message, arena,
+ mps_message_type_finalization()),
+ "get");
+ mps_message_finalization_ref(&objaddr, arena, message);
+ obj = (mps_word_t)objaddr;
+ mps_message_discard(arena, message);
+ ++ final_this_time;
+ }
+ finals += final_this_time;
+ printf("%lu objects finalized: total %lu of %lu\n",
+ final_this_time, finals, object_count);
+ }
+
+ object_count = 0;
+
+ printf("Making some indirectly finalized trees of objects.\n");
+ /* make some trees */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = (void *)make_indirect_tree(maxtreeDEPTH, ap);
+ register_indirect_tree((mps_word_t)root[i], arena);
+ }
+
+ printf("Losing all pointers to the trees.\n");
+ /* clean out the roots */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = 0;
+ }
+
+ finals = 0;
+
+ while ((finals < object_count) &&
+ (mps_collections(arena) < collectionCOUNT)) {
+ mps_word_t final_this_time = 0;
+ printf("Collecting...");
+ fflush(stdout);
+ die(mps_arena_collect(arena), "collect");
+ printf(" Done.\n");
+ while (mps_message_poll(arena)) {
+ mps_word_t obj;
+ mps_addr_t objaddr;
+ cdie(mps_message_get(&message, arena,
+ mps_message_type_finalization()),
+ "get");
+ mps_message_finalization_ref(&objaddr, arena, message);
+ obj = (mps_word_t)objaddr;
+ mps_message_discard(arena, message);
+ ++ final_this_time;
+ }
+ finals += final_this_time;
+ printf("%lu objects finalized: total %lu of %lu\n",
+ final_this_time, finals, object_count);
+ }
+
+ mps_ap_destroy(ap);
+ mps_root_destroy(mps_root);
+ mps_pool_destroy(amc);
+ mps_chain_destroy(chain);
+ mps_fmt_destroy(fmt);
+
+ return NULL;
+}
+
+
+int main(void)
+{
+ mps_arena_t arena;
+ mps_thr_t thread;
+ void *r;
+
+ die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
+ "arena_create\n");
+ die(mps_thread_reg(&thread, arena), "thread_reg\n");
+ mps_tramp(&r, test, arena, 0);
+ mps_thread_dereg(thread);
+ mps_arena_destroy(arena);
+
+ fflush(stdout); /* synchronize */
+ return 0;
+}
+
+
+/* C. COPYRIGHT AND LICENSE
+ *
+ * Copyright (C) 2001-2003 Ravenbrook Limited <http://www.ravenbrook.com/>.
+ * All rights reserved. This is an open source license. Contact
+ * Ravenbrook for commercial licensing options.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Redistributions in any form must be accompanied by information on how
+ * to obtain complete source code for this software and any accompanying
+ * software that uses this software. The source code must either be
+ * included in the distribution or be available for no more than the cost
+ * of distribution plus a nominal fee, and must be freely redistributable
+ * under reasonable conditions. For an executable file, complete source
+ * code means the source code for all modules it contains. It does not
+ * include source code for modules or files that typically accompany the
+ * major components of the operating system on which the executable file
+ * runs.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
Modified: trunk/mps/code/finalcv.c
==============================================================================
--- trunk/mps/code/finalcv.c (original)
+++ trunk/mps/code/finalcv.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* finalcv.c: FINALIZATION COVERAGE TEST
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/finalcv.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/finalcv.c#11 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
@@ -141,7 +141,7 @@
/* <design/poolmrg/#test.promise.ut.churn> */
while (mps_collections(arena) < collectionCOUNT) {
churn(ap);
- /* design.mps.poolmrg.test.promise.ut.drop */
+ /* <design/poolmrg/#test.promise.ut.drop> */
for (i = 0; i < rootCOUNT; ++i) {
if (root[i] != NULL && state[i] == rootSTATE) {
if (rnd() % finalizationRATE == 0) {
Added: trunk/mps/code/finaltest.c
==============================================================================
--- (empty file)
+++ trunk/mps/code/finaltest.c Tue Sep 27 18:23:25 2005
@@ -0,0 +1,301 @@
+/* finaltest.c: LARGE-SCALE FINALIZATION TEST
+ *
+ * $Id: //info.ravenbrook.com/project/mps/master/code/finaltest.c#1 $
+ * Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
+ * Portions copyright (C) 2002 Global Graphics Software.
+ *
+ * DESIGN
+ *
+ * DEPENDENCIES
+ *
+ * This test uses the dylan object format, but the reliance on this
+ * particular format is not great and could be removed.
+ *
+ * NOTES
+ *
+ * This code was created by first copying <code/finalcv.c>
+ */
+
+#include "testlib.h"
+#include "mps.h"
+#include "mpscamc.h"
+#include "mpsavm.h"
+#include "fmtdy.h"
+#include "fmtdytst.h"
+#include "mpstd.h"
+#ifdef MPS_OS_W3
+#include "mpsw3.h"
+#endif
+#include <stdlib.h>
+
+
+#define testArenaSIZE ((size_t)16<<20)
+#define rootCOUNT 20
+#define maxtreeDEPTH 12
+#define collectionCOUNT 10
+#define genCOUNT 2
+
+/* testChain -- generation parameters for the test */
+
+static mps_gen_param_s testChain[genCOUNT] = {
+ { 150, 0.85 }, { 170, 0.45 } };
+
+
+/* global object counter */
+
+static mps_word_t object_count = 0;
+
+static mps_word_t make_numbered_cons(mps_word_t car, mps_word_t cdr,
+ mps_ap_t ap)
+{
+ mps_word_t cons;
+ die(make_dylan_vector(&cons, ap, 3), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(cons, 0) = car;
+ DYLAN_VECTOR_SLOT(cons, 1) = cdr;
+ DYLAN_VECTOR_SLOT(cons, 2) = DYLAN_INT(object_count);
+ ++ object_count;
+ return cons;
+}
+
+static mps_word_t make_numbered_tree(mps_word_t depth,
+ mps_ap_t ap)
+{
+ mps_word_t left, right;
+ if (depth < 2) {
+ left = DYLAN_INT(object_count);
+ right = DYLAN_INT(object_count);
+ } else {
+ left = make_numbered_tree(depth-1, ap);
+ right = make_numbered_tree(depth-1, ap);
+ }
+ return make_numbered_cons(left, right, ap);
+}
+
+static void register_numbered_tree(mps_word_t tree, mps_arena_t arena)
+{
+ /* don't finalize ints */
+ if ((tree & 1) == 0) {
+ mps_finalize(arena, (mps_addr_t *)&tree);
+ register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 0), arena);
+ register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 1), arena);
+ }
+}
+
+static mps_word_t make_indirect_cons(mps_word_t car, mps_word_t cdr,
+ mps_ap_t ap)
+{
+ mps_word_t cons, indirect;
+ die(make_dylan_vector(&indirect, ap, 1), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(indirect, 0) = DYLAN_INT(object_count);
+ die(make_dylan_vector(&cons, ap, 3), "make_dylan_vector");
+ DYLAN_VECTOR_SLOT(cons, 0) = car;
+ DYLAN_VECTOR_SLOT(cons, 1) = cdr;
+ DYLAN_VECTOR_SLOT(cons, 2) = indirect;
+ ++ object_count;
+ return cons;
+}
+
+static mps_word_t make_indirect_tree(mps_word_t depth,
+ mps_ap_t ap)
+{
+ mps_word_t left, right;
+ if (depth < 2) {
+ left = DYLAN_INT(object_count);
+ right = DYLAN_INT(object_count);
+ } else {
+ left = make_indirect_tree(depth-1, ap);
+ right = make_indirect_tree(depth-1, ap);
+ }
+ return make_indirect_cons(left, right, ap);
+}
+
+static void register_indirect_tree(mps_word_t tree, mps_arena_t arena)
+{
+ /* don't finalize ints */
+ if ((tree & 1) == 0) {
+ mps_word_t indirect = DYLAN_VECTOR_SLOT(tree,2);
+ mps_finalize(arena, (mps_addr_t *)&indirect);
+ register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 0), arena);
+ register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 1), arena);
+ }
+}
+
+
+static void *root[rootCOUNT];
+
+static void *test(void *arg, size_t s)
+{
+ mps_ap_t ap;
+ mps_fmt_t fmt;
+ mps_chain_t chain;
+ mps_word_t finals;
+ mps_pool_t amc;
+ mps_root_t mps_root;
+ mps_arena_t arena;
+ mps_message_t message;
+ size_t i;
+
+ arena = (mps_arena_t)arg;
+ (void)s;
+
+ die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create\n");
+ die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
+ die(mps_pool_create(&amc, arena, mps_class_amc(), fmt, chain),
+ "pool_create amc\n");
+ die(mps_root_create_table(&mps_root, arena, MPS_RANK_EXACT, (mps_rm_t)0,
+ root, (size_t)rootCOUNT),
+ "root_create\n");
+ die(mps_ap_create(&ap, amc, MPS_RANK_EXACT), "ap_create\n");
+
+ mps_message_type_enable(arena, mps_message_type_finalization());
+
+ mps_arena_park(arena);
+
+ object_count = 0;
+
+ printf("Making some finalized trees of objects.\n");
+ /* make some trees */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = (void *)make_numbered_tree(maxtreeDEPTH, ap);
+ register_numbered_tree((mps_word_t)root[i], arena);
+ }
+
+ printf("Losing all pointers to the trees.\n");
+ /* clean out the roots */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = 0;
+ }
+
+ finals = 0;
+
+ while ((finals < object_count) &&
+ (mps_collections(arena) < collectionCOUNT)) {
+ mps_word_t final_this_time = 0;
+ printf("Collecting...");
+ fflush(stdout);
+ die(mps_arena_collect(arena), "collect");
+ printf(" Done.\n");
+ while (mps_message_poll(arena)) {
+ mps_word_t obj;
+ mps_addr_t objaddr;
+ cdie(mps_message_get(&message, arena,
+ mps_message_type_finalization()),
+ "get");
+ mps_message_finalization_ref(&objaddr, arena, message);
+ obj = (mps_word_t)objaddr;
+ mps_message_discard(arena, message);
+ ++ final_this_time;
+ }
+ finals += final_this_time;
+ printf("%lu objects finalized: total %lu of %lu\n",
+ final_this_time, finals, object_count);
+ }
+
+ object_count = 0;
+
+ printf("Making some indirectly finalized trees of objects.\n");
+ /* make some trees */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = (void *)make_indirect_tree(maxtreeDEPTH, ap);
+ register_indirect_tree((mps_word_t)root[i], arena);
+ }
+
+ printf("Losing all pointers to the trees.\n");
+ /* clean out the roots */
+ for(i = 0; i < rootCOUNT; ++i) {
+ root[i] = 0;
+ }
+
+ finals = 0;
+
+ while ((finals < object_count) &&
+ (mps_collections(arena) < collectionCOUNT)) {
+ mps_word_t final_this_time = 0;
+ printf("Collecting...");
+ fflush(stdout);
+ die(mps_arena_collect(arena), "collect");
+ printf(" Done.\n");
+ while (mps_message_poll(arena)) {
+ mps_word_t obj;
+ mps_addr_t objaddr;
+ cdie(mps_message_get(&message, arena,
+ mps_message_type_finalization()),
+ "get");
+ mps_message_finalization_ref(&objaddr, arena, message);
+ obj = (mps_word_t)objaddr;
+ mps_message_discard(arena, message);
+ ++ final_this_time;
+ }
+ finals += final_this_time;
+ printf("%lu objects finalized: total %lu of %lu\n",
+ final_this_time, finals, object_count);
+ }
+
+ mps_ap_destroy(ap);
+ mps_root_destroy(mps_root);
+ mps_pool_destroy(amc);
+ mps_chain_destroy(chain);
+ mps_fmt_destroy(fmt);
+
+ return NULL;
+}
+
+
+int main(int argc, char **argv)
+{
+ mps_arena_t arena;
+ mps_thr_t thread;
+ void *r;
+
+ die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
+ "arena_create\n");
+ die(mps_thread_reg(&thread, arena), "thread_reg\n");
+ mps_tramp(&r, test, arena, 0);
+ mps_thread_dereg(thread);
+ mps_arena_destroy(arena);
+
+ fflush(stdout); /* synchronize */
+ return 0;
+}
+
+
+/* C. COPYRIGHT AND LICENSE
+ *
+ * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
+ * All rights reserved. This is an open source license. Contact
+ * Ravenbrook for commercial licensing options.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Redistributions in any form must be accompanied by information on how
+ * to obtain complete source code for this software and any accompanying
+ * software that uses this software. The source code must either be
+ * included in the distribution or be available for no more than the cost
+ * of distribution plus a nominal fee, and must be freely redistributable
+ * under reasonable conditions. For an executable file, complete source
+ * code means the source code for all modules it contains. It does not
+ * include source code for modules or files that typically accompany the
+ * major components of the operating system on which the executable file
+ * runs.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
Modified: trunk/mps/code/fmtdy.c
==============================================================================
--- trunk/mps/code/fmtdy.c (original)
+++ trunk/mps/code/fmtdy.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmtdy.c: DYLAN OBJECT FORMAT IMPLEMENTATION
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmtdy.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmtdy.c#12 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
Modified: trunk/mps/code/fmtdy.h
==============================================================================
--- trunk/mps/code/fmtdy.h (original)
+++ trunk/mps/code/fmtdy.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmtdy.h: DYLAN OBJECT FORMAT
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmtdy.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmtdy.h#11 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
Modified: trunk/mps/code/fmtdytst.c
==============================================================================
--- trunk/mps/code/fmtdytst.c (original)
+++ trunk/mps/code/fmtdytst.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmtdytst.c: DYLAN FORMAT TEST CODE
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmtdytst.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmtdytst.c#12 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: MPS developers, Dylan developers.
@@ -50,14 +50,8 @@
vf);
}
-
-mps_res_t dylan_init(mps_addr_t addr, size_t size,
- mps_addr_t *refs, size_t nr_refs)
+static mps_res_t dylan_make_wrapper_wrapper(void)
{
-
- /* Make sure the size is aligned. */
- assert((size & (ALIGN-1)) == 0);
-
if(ww == NULL) {
ww = malloc(sizeof(mps_word_t) * (BASIC_WRAPPER_SIZE + 1));
if(ww == NULL) return MPS_RES_MEMORY;
@@ -84,10 +78,23 @@
tvw[WV] = dylan_make_WV(2, 0, 0, 2); /* traceable variable part */
tvw[WS] = 1; /* no patterns */
}
+ return MPS_RES_OK;
+}
+
+
+mps_res_t dylan_init(mps_addr_t addr, size_t size,
+ mps_addr_t *refs, size_t nr_refs)
+{
+ mps_res_t res;
+ /* Make sure the size is aligned. */
+ assert((size & (ALIGN-1)) == 0);
+
+ res = dylan_make_wrapper_wrapper();
+ if (res != MPS_RES_OK)
+ return res;
/* If there is enough room, make a vector, otherwise just */
/* make a padding object. */
-
if(size >= sizeof(mps_word_t) * 2) {
mps_word_t *p = (mps_word_t *)addr;
mps_word_t i, t = (size / sizeof(mps_word_t)) - 2;
@@ -102,12 +109,45 @@
else
p[2+i] = (mps_word_t)refs[(r >> 1) % nr_refs]; /* random ptr */
}
- } else
+ } else {
dylan_pad(addr, size);
+ }
return MPS_RES_OK;
}
+mps_res_t make_dylan_vector(mps_word_t *v, mps_ap_t ap, size_t slots)
+{
+ mps_res_t res;
+ mps_addr_t addr;
+ mps_word_t *p;
+ size_t size;
+ size_t i;
+
+ res = dylan_make_wrapper_wrapper();
+ if (res != MPS_RES_OK)
+ return res;
+
+ size = (slots + 2) * sizeof(mps_word_t);
+
+ do {
+ MPS_RESERVE_BLOCK(res, addr, ap, size);
+ if (res != MPS_RES_OK)
+ return res;
+
+ p = (mps_word_t *)addr;
+ p[0] = (mps_word_t)tvw; /* install vector wrapper */
+ p[1] = (slots << 2) | 1; /* tag the vector length */
+ /* fill all slots with zero ints. */
+ for (i=0; i<slots; ++i) {
+ DYLAN_VECTOR_SLOT(p, i) = DYLAN_INT(0);
+ }
+ } while (!mps_commit(ap, addr, size));
+
+ *v = (mps_word_t)p;
+ return MPS_RES_OK;
+}
+
void dylan_write(mps_addr_t addr, mps_addr_t *refs, size_t nr_refs)
{
@@ -126,6 +166,31 @@
}
}
+/* Writes to a dylan object.
+ Currently just swaps two refs if it can.
+ This is only used in a certain way by certain tests, it doesn't have
+ to be very general. */
+void dylan_mutate(mps_addr_t addr)
+{
+ mps_word_t *p = (mps_word_t *)addr;
+
+ if(p[0] == (mps_word_t)tvw) {
+ mps_word_t t = p[1] >> 2;
+
+ if(t > 0) {
+ mps_word_t tmp;
+ size_t i, j;
+
+ i = 2 + (rnd() % t);
+ j = 2 + (rnd() % t);
+
+ tmp = p[i];
+ p[i] = p[j];
+ p[j] = tmp;
+ }
+ }
+ return;
+}
mps_addr_t dylan_read(mps_addr_t addr)
{
@@ -158,18 +223,18 @@
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Redistributions in any form must be accompanied by information on how
* to obtain complete source code for this software and any accompanying
* software that uses this software. The source code must either be
@@ -180,7 +245,7 @@
* include source code for modules or files that typically accompany the
* major components of the operating system on which the executable file
* runs.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
Modified: trunk/mps/code/fmtdytst.h
==============================================================================
--- trunk/mps/code/fmtdytst.h (original)
+++ trunk/mps/code/fmtdytst.h Tue Sep 27 18:23:25 2005
@@ -13,11 +13,20 @@
mps_addr_t *refs, size_t nr_refs);
extern void dylan_write(mps_addr_t addr,
mps_addr_t *refs, size_t nr_refs);
+extern void dylan_mutate(mps_addr_t addr);
extern mps_addr_t dylan_read(mps_addr_t addr);
extern mps_bool_t dylan_check(mps_addr_t addr);
extern void dylan_pad(mps_addr_t addr, size_t size);
extern int dylan_wrapper_check(mps_word_t *w);
+extern mps_res_t make_dylan_vector(mps_word_t *v, mps_ap_t ap, size_t slots);
+
+#define DYLAN_VECTOR_SLOT(o,n) (((mps_word_t *) (o))[(n)+2])
+
+#define DYLAN_INT(n) (((n) << 2) | 1)
+
+#define DYLAN_INT_INT(d) ((d) >> 2)
+
#endif /* fmtdy_h */
@@ -26,18 +35,18 @@
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Redistributions in any form must be accompanied by information on how
* to obtain complete source code for this software and any accompanying
* software that uses this software. The source code must either be
@@ -48,7 +57,7 @@
* include source code for modules or files that typically accompany the
* major components of the operating system on which the executable file
* runs.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
Modified: trunk/mps/code/fmthe.c
==============================================================================
--- trunk/mps/code/fmthe.c (original)
+++ trunk/mps/code/fmthe.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmthe.c: DYLAN-LIKE OBJECT FORMAT WITH HEADERS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmthe.c#2 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmthe.c#14 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
Modified: trunk/mps/code/fmthe.h
==============================================================================
--- trunk/mps/code/fmthe.h (original)
+++ trunk/mps/code/fmthe.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmthe.h: HEADERS FOR DYLAN-LIKE OBJECT FORMATS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmthe.h#2 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmthe.h#13 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*/
Modified: trunk/mps/code/fmtno.c
==============================================================================
--- trunk/mps/code/fmtno.c (original)
+++ trunk/mps/code/fmtno.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmtno.c: NULL OBJECT FORMAT IMPLEMENTATION
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmtno.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmtno.c#2 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: MPS developers
Modified: trunk/mps/code/fmtno.h
==============================================================================
--- trunk/mps/code/fmtno.h (original)
+++ trunk/mps/code/fmtno.h Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* fmtdy.h: NULL OBJECT FORMAT
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fmtno.h#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/fmtno.h#2 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*/
Modified: trunk/mps/code/format.c
==============================================================================
--- trunk/mps/code/format.c (original)
+++ trunk/mps/code/format.c Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
/* format.c: OBJECT FORMATS
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/format.c#1 $
+ * $Id: //info.ravenbrook.com/project/mps/master/code/format.c#10 $
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2002 Global Graphics Software.
*
@@ -11,7 +11,7 @@
#include "mpm.h"
-SRCID(format, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/format.c#1 $");
+SRCID(format, "$Id: //info.ravenbrook.com/project/mps/master/code/format.c#10
$");
/* FormatCheck -- check a format */
Modified: trunk/mps/code/fri4gc.gmk
==============================================================================
--- trunk/mps/code/fri4gc.gmk (original)
+++ trunk/mps/code/fri4gc.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# fri4gc.gmk: BUILD FOR FreeBSD/INTEL/GCC PLATFORM
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/fri4gc.gmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/fri4gc.gmk#10 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
PFM = fri4gc
@@ -15,8 +15,9 @@
include gc.gmk
-CFLAGSDEBUG = -g
-CFLAGSOPT = -O -g
+CFLAGSCOMPILER := $(subst -pedantic,,$(CFLAGSCOMPILER))
+CFLAGSDEBUG = -g3
+CFLAGSOPT = -O -g3
CC = cc
Modified: trunk/mps/code/gc.gmk
==============================================================================
--- trunk/mps/code/gc.gmk (original)
+++ trunk/mps/code/gc.gmk Tue Sep 27 18:23:25 2005
@@ -1,6 +1,6 @@
# gc.gmk: GNUMAKEFILE FRAGMENT FOR GNU CC
#
-# $Id: //info.ravenbrook.com/project/mps/version/1.100/code/gc.gmk#1 $
+# $Id: //info.ravenbrook.com/project/mps/master/code/gc.gmk#8 $
# Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
#
# This file is included by platform makefiles that use the GNU CC
Modified: trunk/mps/code/global.c
==============================================================================
--- trunk/mps/code/global.c (original)
+++ trunk/mps/code/global.c Tue Sep 27 18:23:25 2005
@@ -1,7 +1,7 @@
/* global.c: ARENA-GLOBAL INTERFACES
*
- * $Id: //info.ravenbrook.com/project/mps/version/1.100/code/global.c#1 $
- * Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
+ * $Id: //info.ravenbrook.com/project/mps/master/code/global.c#18 $
+ * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
* .sources: See <design/arena/>. design.mps.thread-safety is relevant
@@ -27,7 +27,7 @@
#include "poolmv.h"
#include "mpm.h"
-SRCID(global, "$Id:
//info.ravenbrook.com/project/mps/version/1.100/code/global.c#1 $");
+SRCID(global, "$Id: //info.ravenbrook.com/project/mps/master/code/global.c#18
$");
/* All static data objects are declared here. See .static */
@@ -36,6 +36,9 @@
static Bool arenaRingInit = FALSE;
static RingStruct arenaRing; /* <design/arena/#static.ring> */
+/* forward declarations */
+void arenaEnterLock(Arena, int);
+void arenaLeaveLock(Arena, int);
/* ArenaControlPool -- get the control pool */
@@ -91,7 +94,7 @@
AVERT(Arena, arena);
/* Temporarily give up the arena lock to avoid deadlock, */
- /* see design.mps.thread-safety.deadlock. */
+ /* see <design/thread-safety/#deadlock>. */
ArenaLeave(arena);
/* Detach the arena from the global list. */
@@ -139,6 +142,11 @@
CHECKL(BoolCheck(arenaGlobals->bufferLogging));
CHECKL(RingCheck(&arenaGlobals->poolRing));
CHECKL(RingCheck(&arenaGlobals->rootRing));
+ CHECKL(RingCheck(&arenaGlobals->rememberedSummaryRing));
+ CHECKL(arenaGlobals->rememberedSummaryIndex < RememberedSummaryBLOCK);
+ /* <code/global.c#remembered.summary> RingIsSingle imples index == 0 */
+ CHECKL(!RingIsSingle(&arenaGlobals->rememberedSummaryRing) ||
+ arenaGlobals->rememberedSummaryIndex == 0);
CHECKL(RingCheck(&arena->formatRing));
CHECKL(RingCheck(&arena->messageRing));
/* Don't check enabledMessageTypes */
@@ -183,6 +191,10 @@
CHECKL(RingCheck(&arena->greyRing[rank]));
CHECKL(RingCheck(&arena->chainRing));
+ CHECKL(arena->tracedSize >= 0.0);
+ CHECKL(arena->tracedTime >= 0.0);
+ CHECKL(arena->lastWorldCollect >= 0);
+
/* can't write a check for arena->epoch */
/* check that each history entry is a subset of the next oldest */
@@ -250,6 +262,8 @@
arenaGlobals->poolSerial = (Serial)0;
RingInit(&arenaGlobals->rootRing);
arenaGlobals->rootSerial = (Serial)0;
+ RingInit(&arenaGlobals->rememberedSummaryRing);
+ arenaGlobals->rememberedSummaryIndex = 0;
RingInit(&arena->threadRing);
arena->threadSerial = (Serial)0;
@@ -261,6 +275,9 @@
arena->finalPool = NULL;
arena->busyTraces = TraceSetEMPTY; /* <code/trace.c> */
arena->flippedTraces = TraceSetEMPTY; /* <code/trace.c> */
+ arena->tracedSize = 0.0;
+ arena->tracedTime = 0.0;
+ arena->lastWorldCollect = mps_clock();
arena->insideShield = FALSE; /* <code/shield.c> */
arena->shCacheI = (Size)0;
arena->shCacheLimit = (Size)1;
@@ -269,7 +286,7 @@
for(i = 0; i < ShieldCacheSIZE; i++)
arena->shCache[i] = NULL;
- for (i=0; i < TraceLIMIT; i++) {
+ for (i=0; i < TraceLIMIT; i++) {
/* <design/arena/#trace.invalid> */
arena->trace[i].sig = SigInvalid;
}
@@ -402,6 +419,13 @@
}
}
+Ring GlobalsRememberedSummaryRing(Globals global)
+{
+ AVERT(Globals, global);
+
+ return &global->rememberedSummaryRing;
+}
+
/* ArenaEnter -- enter the state where you can look at the arena */
@@ -414,15 +438,45 @@
#else
void ArenaEnter(Arena arena)
{
+ arenaEnterLock(arena, 0);
+}
+#endif
+
+/* The recursive argument specifies whether to claim the lock
+ recursively or not. */
+void arenaEnterLock(Arena arena, int recursive)
+{
+ Lock lock;
+
+ /* This check is safe to do outside the lock. Unless the client
+ is also calling ArenaDestroy, but that's a protocol violation by
+ the client if so. */
AVER(CHECKT(Arena, arena));
StackProbe(StackProbeDEPTH);
- LockClaim(ArenaGlobals(arena)->lock);
+ lock = ArenaGlobals(arena)->lock;
+ if(recursive) {
+ LockClaimRecursive(lock);
+ } else {
+ LockClaim(lock);
+ }
AVERT(Arena, arena); /* can't AVER it until we've got the lock */
- ShieldEnter(arena);
+ if(recursive) {
+ /* already in shield */
+ } else {
+ ShieldEnter(arena);
+ }
+ return;
}
-#endif
+/* Same as ArenaEnter, but for the few functions that need to be
+ reentrant with respect to some part of the MPS.
+ For example, mps_arena_has_addr. */
+
+void ArenaEnterRecursive(Arena arena)
+{
+ arenaEnterLock(arena, 1);
+}
/* ArenaLeave -- leave the state where you can look at MPM data structures */
@@ -435,13 +489,36 @@
#else
void ArenaLeave(Arena arena)
{
+ arenaLeaveLock(arena, 0);
+}
+#endif
+
+void arenaLeaveLock(Arena arena, int recursive)
+{
+ Lock lock;
+
AVERT(Arena, arena);
- ShieldLeave(arena);
+
+ lock = ArenaGlobals(arena)->lock;
+
+ if(recursive) {
+ /* no need to leave shield */
+ } else {
+ ShieldLeave(arena);
+ }
ProtSync(arena); /* <design/prot/#if.sync> */
- LockReleaseMPM(ArenaGlobals(arena)->lock);
+ if(recursive) {
+ LockReleaseRecursive(lock);
+ } else {
+ LockReleaseMPM(lock);
+ }
+ return;
}
-#endif
+void ArenaLeaveRecursive(Arena arena)
+{
+ arenaLeaveLock(arena, 1);
+}
/* mps_exception_info -- pointer to exception info
*
@@ -547,28 +624,105 @@
globals->insidePoll = TRUE;
- (void)ArenaStep(globals, 0.0);
+ (void)ArenaStep(globals, 0.0, 0.0);
globals->insidePoll = FALSE;
}
#endif
-Bool ArenaStep(Globals globals, double interval)
+/* Work out whether we have enough time here to collect the world,
+ * and whether much time has passed since the last time we did that
+ * opportunistically. */
+static Bool arenaShouldCollectWorld(Arena arena,
+ double interval,
+ double multiplier,
+ Word now,
+ Word clocks_per_sec)
+{
+ double scanRate;
+ Size arenaSize;
+ double arenaScanTime;
+ double sinceLastWorldCollect;
+
+ /* don't collect the world if we're not given any time */
+ if ((interval > 0.0) && (multiplier > 0.0)) {
+ /* don't collect the world if we're already collecting. */
+ if (arena->busyTraces == TraceSetEMPTY) {
+ /* don't collect the world if it's very small */
+ arenaSize = ArenaCommitted(arena) - ArenaSpareCommitted(arena);
+ if (arenaSize > 1000000) {
+ /* how long would it take to collect the world? */
+ if ((arena->tracedSize > 1000000.0) &&
+ (arena->tracedTime > 1.0))
+ scanRate = arena->tracedSize / arena->tracedTime;
+ else
+ scanRate = 25000000.0; /* a reasonable default. */
+ arenaScanTime = arenaSize / scanRate;
+ arenaScanTime += 0.1; /* for overheads. */
+
+ /* how long since we last collected the world? */
+ sinceLastWorldCollect = ((now - arena->lastWorldCollect) /
+ (double) clocks_per_sec);
+ /* have to be offered enough time, and it has to be a long time
+ * since we last did it. */
+ if ((interval * multiplier > arenaScanTime) &&
+ sinceLastWorldCollect > arenaScanTime * 10.0) {
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+Bool ArenaStep(Globals globals, double interval, double multiplier)
{
double size;
- Bool b;
-
- UNUSED(interval);
+ Size scanned;
+ Bool stepped;
+ Word start, end, now;
+ Word clocks_per_sec;
+ Arena arena;
AVERT(Globals, globals);
+ AVER(interval >= 0.0);
+ AVER(multiplier >= 0.0);
+
+ arena = GlobalsArena(globals);
+ clocks_per_sec = mps_clocks_per_sec();
- b = TracePoll(globals);
+ start = mps_clock();
+ end = start + (Word)(interval * clocks_per_sec);
+ AVER(end >= start);
+
+ stepped = FALSE;
+
+ if (arenaShouldCollectWorld(arena, interval, multiplier,
+ start, clocks_per_sec)) {
+ ArenaStartCollect(globals);
+ arena->lastWorldCollect = start;
+ stepped = TRUE;
+ }
+
+ /* loop while there is work to do and time on the clock. */
+ do {
+ scanned = TracePoll(globals);
+ now = mps_clock();
+ if (scanned > 0) {
+ stepped = TRUE;
+ arena->tracedSize += scanned;
+ }
+ } while ((scanned > 0) && (now < end));
+
+ if (stepped) {
+ arena->tracedTime += (now - start) / (double) clocks_per_sec;
+ }
size = globals->fillMutatorSize;
globals->pollThreshold = size + ArenaPollALLOCTIME;
AVER(globals->pollThreshold > size); /* enough precision? */
- return b;
+ return stepped;
}
/* ArenaFinalize -- registers an object for finalization
@@ -599,7 +753,7 @@
/* ArenaDefinalize -- removes one finalization registration of an object
*
- * See design.mps.finalize. */
+ * See <design/finalize>. */
Res ArenaDefinalize(Arena arena, Ref obj)
{
@@ -736,7 +890,7 @@
arena = GlobalsArena(arenaGlobals);
res = WriteF(stream,
- " mpsVersion $S\n", arenaGlobals->mpsVersionString,
+ " mpsVersion $S\n", arenaGlobals->mpsVersionString,
" lock $P\n", (WriteFP)arenaGlobals->lock,
" pollThreshold $U kB\n",
(WriteFU)(aren |