Skip to content

Commit

Permalink
Merge branch 'master' into branch/2024-11-09/perf-patch-job004007 to …
Browse files Browse the repository at this point in the history
…catch up with fixes to automatic build and checks.
  • Loading branch information
rptb1 committed Nov 27, 2024
2 parents d71e84d + 9fd0577 commit 36cd29c
Show file tree
Hide file tree
Showing 56 changed files with 1,100 additions and 825 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
# See <https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy>.

strategy:
fail-fast: false # don't cancel all builds when one build fails
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [clang, gcc]
Expand All @@ -44,7 +45,7 @@ jobs:

# See design.mps.tests.ci.run.posix.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # see <https://github.com/actions/checkout/blob/main/README.md#usage>
- run: CC=${{ matrix.compiler }} ./configure
- run: make
- run: make test
Expand All @@ -59,7 +60,7 @@ jobs:
# <https://github.com/actions/runner-images/blob/e6fcf60b8e6c0f80a065327eaefe836881c28b68/images/win/Windows2022-Readme.md?plain=1#L215>.

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # see <https://github.com/actions/checkout/blob/main/README.md#usage>
- run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fixme-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
check-fixme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # see <https://github.com/actions/checkout/blob/main/README.md#usage>
- run: tool/check-fixme
2 changes: 1 addition & 1 deletion .github/workflows/rst-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
check-rst:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # see <https://github.com/actions/checkout/blob/main/README.md#usage>
- name: Install docutils
run: sudo apt-get install -y docutils
- name: Check reStructuredText syntax
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shell-script-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
check-shell-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # see <https://github.com/actions/checkout/blob/main/README.md#usage>
- name: Install shellcheck
run: sudo apt-get install -y shellcheck
- name: Check shell scripts
Expand Down
2 changes: 1 addition & 1 deletion code/addrobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ int main(int argc, char *argv[])

test_main();

printf("%s: Conculsion, failed to find any defects.\n", argv[0]);
printf("%s: Conclusion, failed to find any defects.\n", argv[0]);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion code/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ Res ArenaFreeLandDelete(Arena arena, Addr base, Addr limit)
}


/* ArenaFreeLandAlloc -- allocate a continguous range of tracts of
/* ArenaFreeLandAlloc -- allocate a contiguous range of tracts of
* size bytes from the arena's free land.
*
* size, zones, and high are as for LandFindInZones.
Expand Down
4 changes: 2 additions & 2 deletions code/commpre.nmk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# .description: This makefile fragment is included in more specific
# makefiles for platforms which use the "mv" builder. This is
# the first of two common makefile fragements (the other is commpost.nmk).
# the first of two common makefile fragments (the other is commpost.nmk).
# Alas, due to shortcomings in nmake, it is not possible to use only one
# common fragment.
#
Expand Down Expand Up @@ -41,7 +41,7 @@
#
# EDITING
#
# To add new targets. varieties, and parts:
# To add new targets, varieties, and parts:
# Search for the string "%%TARGET", "%%VARIETY", or "%%PART" in this makefile
# and follow the instructions.
#
Expand Down
2 changes: 1 addition & 1 deletion code/dbgpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static Bool patternCheck(ReadonlyAddr pattern, Size size, Addr base, Addr limit)

/* debugPoolSegIterate -- iterate over a range of segments in an arena
*
* Expects to be called on a range corresponding to objects withing a
* Expects to be called on a range corresponding to objects within a
* single pool.
*
* NOTE: This relies on pools consistently using segments
Expand Down
2 changes: 1 addition & 1 deletion code/gcbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static obj_t new_tree(mps_ap_t ap, obj_t oldtree, unsigned d)

/* Update tree to be identical tree but with nodes reallocated
* with probability pupdate. This avoids writing to vector slots
* if unecessary. */
* if unnecessary. */
static obj_t update_tree(mps_ap_t ap, obj_t oldtree, unsigned d)
{
obj_t tree;
Expand Down
4 changes: 2 additions & 2 deletions code/ld.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void LDReset(mps_ld_t ld, Arena arena)
* .add.sync: Add must take place _before_ the location of the reference
* is depended on. If the reference changes between adding and
* depending it will show up as moved because the movement will have
* occured since the epoch recorded in the dependency. If the location
* occurred since the epoch recorded in the dependency. If the location
* were used first only the new location of the reference would end up
* in the set.
*
Expand Down Expand Up @@ -212,7 +212,7 @@ void LDAdd(mps_ld_t ld, Arena arena, Addr addr)
* to use the prehistory instead.
*
* .stale.old: Otherwise, if the dependency is older than the length
* of the history, check it against all movement that has ever occured.
* of the history, check it against all movement that has ever occurred.
*/
Bool LDIsStaleAny(mps_ld_t ld, Arena arena)
{
Expand Down
2 changes: 1 addition & 1 deletion code/mpsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SRCID(mpsi, "$Id$");
/* mpsi_check -- check consistency of interface mappings
*
* .check.purpose: The mpsi_check function attempts to check whether
* the defintions in <code/mpsi.h> match the equivalent definition in
* the definitions in <code/mpsi.h> match the equivalent definition in
* the MPM. It is checking the assumptions made in the other functions
* in this implementation.
*
Expand Down
4 changes: 2 additions & 2 deletions code/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SRCID(policy, "$Id$");
*
* pref describes the address space preferences for the allocation.
* size is the amount of memory requested to be allocated, in bytes.
* pool is the pool that is requresting the memory.
* pool is the pool that is requesting the memory.
*
* If successful, update *tractReturn to point to the initial tract of
* the allocated memory and return ResOK. Otherwise return a result
Expand Down Expand Up @@ -198,7 +198,7 @@ Bool PolicyShouldCollectWorld(Arena arena, double availableTime,
}


/* policyCondemnChain -- condemn approriate parts of this chain
/* policyCondemnChain -- condemn appropriate parts of this chain
*
* If successful, set *mortalityReturn to an estimate of the mortality
* of the condemned parts of this chain and return ResOK.
Expand Down
2 changes: 1 addition & 1 deletion code/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Bool PoolClassCheck(PoolClass klass)
CHECKL(FUNCHECK(klass->freeSize));
CHECKL(FUNCHECK(klass->addrObject));

/* Check that pool classes overide sets of related methods. */
/* Check that pool classes override sets of related methods. */
CHECKL((klass->init == PoolAbsInit) ==
(klass->instClassStruct.finish == PoolAbsFinish));
CHECKL((klass->bufferFill == PoolNoBufferFill) ==
Expand Down
2 changes: 1 addition & 1 deletion code/poolamc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ enum {
/* amcSegStruct -- AMC-specific fields appended to GCSegStruct
*
* .seg.accounted-as-buffered: The "accountedAsBuffered" flag is TRUE
* if the segment has an atached buffer and is accounted against the
* if the segment has an attached buffer and is accounted against the
* pool generation's bufferedSize. But note that if this is FALSE, the
* segment might still have an attached buffer -- this happens if the
* segment was condemned while the buffer was attached.
Expand Down
2 changes: 1 addition & 1 deletion code/poolawl.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static void AWLNoteScan(Seg seg, ScanState ss)
/* This is "successful" scan at proper rank. */
++ awl->stats.goodScans;
if (0 < awlseg->singleAccesses) {
/* Accesses have been proceesed singly. Record that we
/* Accesses have been processed singly. Record that we
* genuinely did save a protection-provoked scan */
++ awl->stats.savedScans;
awl->stats.savedAccesses += awlseg->singleAccesses;
Expand Down
2 changes: 1 addition & 1 deletion code/poolmrg.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ static void MRGFinish(Inst inst)
/* We call RingRemove on the master node for the rings, thereby */
/* effectively emptying them, but leaving the rest of the ring */
/* "dangling". This is okay as we are about to destroy all the */
/* segments so the contents of the rings will dissappear soon. */
/* segments so the contents of the rings will disappear soon. */

/* .finish.no-final: Note that this relies on the fact that no */
/* Guardians are in the FINAL state and hence on the Arena Message */
Expand Down
2 changes: 1 addition & 1 deletion code/shield.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Bool ShieldCheck(Shield shield)
remember to sync it before we return to the mutator. */
CHECKL(shield->limit + shield->queuePending >= shield->unsynced);

/* The mutator is suspeneded if there are any holds. */
/* The mutator is suspended if there are any holds. */
CHECKL(shield->holds == 0 || shield->suspended);

/* This is too expensive to check all the time since we have an
Expand Down
4 changes: 2 additions & 2 deletions code/splay.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static Compare SplaySplay(SplayTree splay, TreeKey key,
#endif

/* Short-circuit common cases. Splay trees often bring recently
acccessed nodes to the root. */
accessed nodes to the root. */
if (SplayTreeIsEmpty(splay) ||
compare(SplayTreeRoot(splay), key) == CompareEQUAL)
return CompareEQUAL;
Expand Down Expand Up @@ -1337,7 +1337,7 @@ Bool SplayFindLast(Tree *nodeReturn, SplayTree splay,
* node affected by the change in properties at the given node (which has
* the given key) in an appropriate order.
*
* The function fullfils its job by first splaying at the given node, and
* The function fulfils its job by first splaying at the given node, and
* updating the single node. In the MPS it is used by the CBS during
* coalescing, when the node is likely to be at (or adjacent to) the top
* of the tree anyway.
Expand Down
2 changes: 1 addition & 1 deletion code/tagtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef struct cons_s {
} cons_s, *cons_t;

typedef mps_word_t imm_t; /* Immediate value. */
typedef mps_word_t fwd_t; /* Fowarding pointer. */
typedef mps_word_t fwd_t; /* Forwarding pointer. */

static mps_word_t tag_bits; /* Number of tag bits */
static mps_word_t tag_cons; /* Tag bits indicating pointer to cons */
Expand Down
9 changes: 3 additions & 6 deletions code/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ Res TransformAddOldNew(Transform transform,
{
Res res;
Index i;
Count added = 0;
Arena arena;

AVERT(Transform, transform);
Expand All @@ -164,8 +163,8 @@ Res TransformAddOldNew(Transform transform,
lists (old_list, new_list), using ArenaRead. Insisting on
parking keeps things simple. */
arena = transform->arena;
AVER(ArenaGlobals(arena)->clamped);
AVER(arena->busyTraces == TraceSetEMPTY);
AVER(ArenaGlobals(arena)->clamped); /* .assume.parked */
AVER(arena->busyTraces == TraceSetEMPTY); /* .assume.parked */

res = TableGrow(transform->oldToNew, count);
if (res != ResOK)
Expand All @@ -179,7 +178,7 @@ Res TransformAddOldNew(Transform transform,

/* .old-white: Old refs must be in managed memory, because
transformFix is only reached when a reference is to something
in the condemned set. Other referenes are eliminated by
in the condemned set. Other references are eliminated by
TraceFix, and we can't (currently) transformation of them. */
{
Seg seg;
Expand All @@ -190,8 +189,6 @@ Res TransformAddOldNew(Transform transform,
AVER(res != ResFAIL); /* It's a static error to add the same old twice. */
if (res != ResOK)
return res;

++added;
}

AVERT(Transform, transform);
Expand Down
2 changes: 1 addition & 1 deletion design/finalize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ is that if an object is finalized multiple times, then multiple
guardians are created in the final pool, and so multiple messages will
be posted to the message queue when the object is determined to be
finalizable. But this behaviour is not guaranteed by the
documentation, leaving us free to change the iplementation.
documentation, leaving us free to change the implementation.

_`.int.finalize.write`: Writes a reference to the object into the
guardian object.
Expand Down
2 changes: 1 addition & 1 deletion design/freelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ it is merged with adjacent ranges so as to maintain

_`.impl.rule.break`: The use of ``freelistEND`` to mark the end of the
list violates the rule that exceptional values should not be used to
distinguish exeptional situations. This infraction allows the
distinguish exceptional situations. This infraction allows the
implementation to meet `.req.zero-overhead`_. (There are other ways to
do this, such as using another tag to indicate the last block in the
list, but these would be more complicated.)
Expand Down
2 changes: 1 addition & 1 deletion design/io.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ modify their modules.
_`.if.msg.dgram`: Neither the MPM nor the external tools should assume
that the messages will be delivered in finite time, exactly once, or
in order. This will allow the I/O modules to be implemented using
unreliable transport layers such as the Internet User Datagram Protocl
unreliable transport layers such as the Internet User Datagram Protocol
(UDP). It will also give the I/O module the freedom to drop
information rather than block on a congested network, or stop the
memory manager when the disk is full, or similar events which really
Expand Down
4 changes: 2 additions & 2 deletions design/message-gc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ collections in those circumstances.

_`.req.queue`: Must support a client that enables, but does not
promptly retrieve, GC messages. Messages that have not yet been
retrived must remain queued, and the client must be able to retrieve
retrieved must remain queued, and the client must be able to retrieve
them later without loss. It is not acceptable to stop issuing GC
messages for subsequent collections merely because messages from
previous collections have not yet been retrieved. _`.req.queue.why`:
Expand Down Expand Up @@ -185,7 +185,7 @@ using ``ControlAlloc()``.

.. _job001570: https://www.ravenbrook.com/project/mps/issue/job001570/

Poiters to these messages are stored in ``tsMessage[ti]`` and
Pointers to these messages are stored in ``tsMessage[ti]`` and
``tMessage[ti]`` arrays in the ``ArenaStruct``.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion design/nailboard.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ is *no* ambiguous reference to that address, but that can only be
established when the trace is complete.)

_`.req.range`: A nailboard must be able to determine if any nail is
set in a continguous range. (Because we must preserve the whole object
set in a contiguous range. (Because we must preserve the whole object
if there is any ambiguous reference to it.)

_`.req.range.cost`: Determining if any nail is set in a continuous
Expand Down
6 changes: 3 additions & 3 deletions design/object-debug.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ in the fencepost pattern. Possibly something like this (while we could
still store the parameters in the pool or allocation point, there
seems little point in doing so in this case, and having them as
explicit parameters to the macros allows the client to specify
constants to gain effiency)::
constants to gain efficiency)::

#define mps_add_fencepost(size, fp_size)
#define mps_fill_fenceposts(obj, size, fp_size, fp_pattern)
Expand Down Expand Up @@ -227,7 +227,7 @@ problem; we can turn features on or off with pool init parameters.

_`.fence.pool.abstract`: We could simply use pool init parameters only
to control all debugging features (optargs would be useful here).
While there migh be subclasses and wrappers internally, the client
While there might be subclasses and wrappers internally, the client
would only see a single pool class; in the internal view, this would
be an abstract class, and the parameters would determine which
concrete class actually gets instantiated.
Expand Down Expand Up @@ -325,7 +325,7 @@ _`.interface.fenceposting.format`: A function to wrap a format
``typedef void (*mps_fmt_adjust_fencepost_t)(size_t *size_io)``

_`.interface.fenceposting.adjust`: A format method to adjust size of a
block about to be allocted to allow for fenceposts.
block about to be allocated to allow for fenceposts.

``typedef void (*mps_fmt_put_fencepost_t)(mps_addr_t * addr_io, size_t size)``

Expand Down
2 changes: 1 addition & 1 deletion design/pool.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _`.struct.outer`: The *outer structure* of a pool belonging to the ABC
pool class is a C object of type ``ABCPoolStruct``, which is a typedef
for ``struct PoolABCStruct``.

_`.stuct.outer.sig`: See `design.mps.sig.field.end.outer`_.
_`.struct.outer.sig`: See `design.mps.sig.field.end.outer`_.

.. _design.mps.sig.field.end.outer: sig.txt#field-end-outer

Expand Down
2 changes: 1 addition & 1 deletion design/poolams.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ white sets, each trace needs its own set of tables.

_`.colour.check`: The grey-and-non-white state is illegal, and free
objects must be white as explained in
analysis.non-moving-colour.contraint.reclaim.
analysis.non-moving-colour.constraint.reclaim.


Iteration
Expand Down
6 changes: 3 additions & 3 deletions design/poolmvt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ with a particular response time or throughput, just so long as we
don't block for too long. Clearly there is a missing requirement.]

_`.req.attr.performance.time`: By inference, the time overhead must be
competetive.
competitive.

_`.req.attr.performance.space`: By inference, the space overhead must
be competetive.
be competitive.

_`.req.attr.reliability`: The pool class must have "rock-solid
reliability" (source: req.dylan.attr.rel.mtbf, req.epcore.attr.rel,
Expand Down Expand Up @@ -829,7 +829,7 @@ free" (`mail.ptw.1997-12-05.19-07`_) being added in the future.
.. _mail.ptw.1997-12-05.19-07: https://info.ravenbrook.com/project/mps/mail/1997/12/05/19-07/0.txt

_`.impl.c.parameters`: The pool parameters are calculated as follows
from the input parameters: minimum, mean, and maximum size are taked
from the input parameters: minimum, mean, and maximum size are taken
directly from the parameters.

_`.impl.c.parameter.fill-size`: The fill size is set to the maximum
Expand Down
2 changes: 1 addition & 1 deletion design/prot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if write accesses to the range are to be forbidden, and contains the
``AccessREAD`` bit if read accesses to the range are to be forbidden.

_`.if.set.read`: If the request is to forbid read accesses (that is,
``AccessREAD`` is set) then the implemntation may also forbid write
``AccessREAD`` is set) then the implementation may also forbid write
accesses, but read accesses must not be forbidden unless
``AccessREAD`` is set.

Expand Down
Loading

0 comments on commit 36cd29c

Please sign in to comment.