diff --git a/code/.gitignore b/code/.gitignore index ff483930b8..f69a449ca2 100644 --- a/code/.gitignore +++ b/code/.gitignore @@ -12,6 +12,7 @@ lia6gc lia6ll lii3gc lii6gc +lii6gp lii6ll w3i3mv w3i6mv diff --git a/code/lii6gp.gmk b/code/lii6gp.gmk new file mode 100644 index 0000000000..657e797d41 --- /dev/null +++ b/code/lii6gp.gmk @@ -0,0 +1,63 @@ +# -*- makefile -*- +# +# lii6gp.gmk: BUILD FOR LINUX/x64/GCC PLATFORM WITH GPROF +# +# $Id$ +# Copyright (c) 2001-2023 Ravenbrook Limited. See end of file for license. +# +# FIXME: This file is almost identical to lii6ll.gmk. Share common +# stuff or work out another way to use gprof. +# +# Example use:: +# +# $ lii6gp/hot/gcbench -x 6415986 amc +# $ gprof lii6gp/hot/gcbench +# + +PFM = lii6gp + +MPMPF = \ + lockix.c \ + prmci6.c \ + prmcix.c \ + prmclii6.c \ + protix.c \ + protsgix.c \ + pthrdext.c \ + span.c \ + thix.c \ + vmix.c + +LIBS = -lm -lpthread + +include gp.gmk + + +# C. COPYRIGHT AND LICENSE +# +# Copyright (C) 2001-2023 Ravenbrook Limited . +# +# 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. +# +# 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 AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR 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. + diff --git a/code/seg.c b/code/seg.c index 9782e43b3c..8225987241 100644 --- a/code/seg.c +++ b/code/seg.c @@ -241,16 +241,19 @@ static void SegFinish(Seg seg) void SegSetGrey(Seg seg, TraceSet grey) { - AVERT(Seg, seg); - AVERT(TraceSet, grey); - AVER(grey == TraceSetEMPTY || SegRankSet(seg) != RankSetEMPTY); + AVERT_CRITICAL(Seg, seg); + AVERT_CRITICAL(TraceSet, grey); + AVER_CRITICAL(grey == TraceSetEMPTY || SegRankSet(seg) != RankSetEMPTY); /* Don't dispatch to the class method if there's no actual change in greyness, or if the segment doesn't contain any references. */ + /* FIXME: ``Method`` includes ``MustBeA`` and not + ``MustBeA_CRITICAL``. Experiment with a new ``Method_CRITICAL`` + and measure if it's worthwhile. */ if (grey != SegGrey(seg) && SegRankSet(seg) != RankSetEMPTY) Method(Seg, seg, setGrey)(seg, grey); - EVENT3(SegSetGrey, PoolArena(SegPool(seg)), seg, grey); + EVENT_CRITICAL3(SegSetGrey, PoolArena(SegPool(seg)), seg, grey); }