Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ lia6gc
lia6ll
lii3gc
lii6gc
lii6gp
lii6ll
w3i3mv
w3i6mv
Expand Down
63 changes: 63 additions & 0 deletions code/lii6gp.gmk
Original file line number Diff line number Diff line change
@@ -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 <https://www.ravenbrook.com/>.
#
# 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.

11 changes: 7 additions & 4 deletions code/seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down