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
50 changes: 50 additions & 0 deletions tool/git-fundiff
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
# tool/git-fundiff -- C functions changed between commits
#
# Prints a list of functions that differ in a C source file at the
# LLVM intermediate code level between two Git commits.
#
# NOTE: This will print false positivies because llvm-diff produces
# them, even when comparing a file with itself, e.g. ``llvm-diff x x``

set -e # exit on error

usage() {
echo 1>&2 "Usage: $0 <tree-ish> <tree-ish> <clang source>..."
echo 1>&2 "Example: $0 HEAD^ HEAD trace.c"
exit 2
}

if ! which clang llvm-diff-14 > /dev/null; then
echo 1>&2 "$0: clang or llvm-diff-14 command not found"
exit 2
fi

if test "$#" -lt 2; then usage; fi
left="$1"
right="$2"
shift 2

tmpdir=$(mktemp --directory)
# shellcheck disable=SC2064
trap "rm -rf -- '$tmpdir'" EXIT
mkdir -p "$tmpdir/left" "$tmpdir/right"
git archive "$left" code | tar -x -C "$tmpdir/left"
git archive "$right" code | tar -x -C "$tmpdir/right"

status=0
while test $# -gt 0; do
file="$1"
shift
(cd "$tmpdir/left/code" &&
clang -S -emit-llvm -o "../../left.ll" "$file")
(cd "$tmpdir/right/code" &&
clang -S -emit-llvm -o "../../right.ll" "$file")
# Try to reduce false positives where the output is identical
cmp "$tmpdir/left.ll" "$tmpdir/right.ll" && continue
llvm-diff-14 "$tmpdir/left.ll" "$tmpdir/right.ll" \
> "$tmpdir/diff" 2>&1 && continue
status=1
sed -ne 's/^in function \(.*\):$/\1/p' < "$tmpdir/diff"
done
exit "$status"
295 changes: 295 additions & 0 deletions tool/git-riskiness
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
# -*- mode: conf-space; -*-
# tool/git-riskiness -- estimate of risks of changing files in the MPS tree
#
# This file is used by the script tool/git-risks to assess the
# riskiness of changes made to the MPS. [Insert why it was developed,
# ref to issue, etc. RB 2023-02-24]
#
# First draft by manual inspection by RB and JPH on 2023-02-20.
#
# This file can contain blank lines and comments starting with '#'.
# See tool/git-risks.

# First column is risk to general MPS users
# Second column is risk to Configura
0 0 code/.gitignore
0 0 code/.p4ignore
1 0 code/abq.c
1 0 code/abq.h
0 0 code/abqtest.c
0 0 code/airtest.c
0 0 code/amcss.c
0 0 code/amcsshe.c
0 0 code/amcssth.c
0 0 code/amsss.c
0 0 code/amssshe.c
0 0 code/anangc.gmk
0 0 code/ananll.gmk
0 0 code/ananmv.nmk
0 0 code/apss.c
2 2 code/arena.c
2 0 code/arenacl.c
0 0 code/arenacv.c
2 2 code/arenavm.c
1 1 code/arg.c
1 1 code/arg.h
0 0 code/awlut.c
0 0 code/awluthe.c
0 0 code/awlutth.c
1 1 code/boot.c
1 1 code/boot.h
3 3 code/bt.c
3 3 code/bt.h
0 0 code/btcv.c
0 0 code/bttest.c
4 4 code/buffer.c
3 3 code/cbs.c
3 3 code/cbs.h
? ? chain.h extra file
3 3 code/check.h
1 0 code/clock.h
0 0 code/comm.gmk
0 0 code/commpost.nmk
0 0 code/commpre.nmk
1 1 code/config.h
2 0 code/dbgpool.c
2 0 code/dbgpool.h
2 0 code/dbgpooli.c
0 0 code/djbench.c
1 0 code/event.c
1 0 code/event.h
0 0 code/eventcnv.c
1 0 code/eventcom.h
1 0 code/eventdef.h
0 0 code/eventpy.c
0 0 code/eventsql.c
0 0 code/eventtxt.c
3 3 code/failover.c
3 3 code/failover.h
0 0 code/finalcv.c
0 0 code/finaltest.c
0 0 code/fmtdy.c
0 0 code/fmtdy.h
0 0 code/fmtdytst.c
0 0 code/fmtdytst.h
0 0 code/fmthe.c
0 0 code/fmthe.h
0 0 code/fmtno.c
0 0 code/fmtno.h
0 0 code/fmtscheme.c
0 0 code/fmtscheme.h
0 0 code/forktest.c
2 2 code/format.c
0 0 code/fotest.c
3 3 code/freelist.c
3 3 code/freelist.h
0 0 code/fri3gc.gmk
0 0 code/fri3ll.gmk
0 0 code/fri6gc.gmk
0 0 code/fri6ll.gmk
0 0 code/gc.gmk
0 0 code/gcbench.c
0 0 code/gcovfmt.py
0 0 code/getopt.h
0 0 code/getoptl.c
2 2 code/global.c
0 0 code/gp.gmk
3 3 code/land.c
0 0 code/landtest.c
4 4 code/ld.c
0 0 code/lia6gc.gmk
0 0 code/lia6ll.gmk
0 0 code/lii3gc.gmk
0 0 code/lii6gc.gmk
0 0 code/lii6ll.gmk
0 0 code/ll.gmk
0 0 code/locbwcss.c
1 1 code/lock.h
1 0 code/lockan.c
0 0 code/lockcov.c
2 0 code/lockix.c
0 0 code/lockut.c
0 0 code/lockutw3.c
2 2 code/lockw3.c
3 3 code/locus.c
3 3 code/locus.h
0 0 code/locusss.c
0 0 code/locv.c
1 1 code/message.c
0 0 code/messtest.c
1 1 code/meter.c
1 1 code/meter.h
3 3 code/misc.h
2 2 code/mpm.c
2 2 code/mpm.h
0 0 code/mpmss.c
2 2 code/mpmst.h
2 2 code/mpmtypes.h
1 1 code/mps.c
3 3 code/mps.h
0 0 code/mps.xcodeproj/project.pbxproj
2 0 code/mpsacl.h
2 2 code/mpsavm.h
1 1 code/mpscamc.h
1 0 code/mpscams.h
1 1 code/mpscawl.h
1 0 code/mpsclo.h
1 0 code/mpscmfs.h
1 0 code/mpscmv2.h
1 0 code/mpscmvff.h
1 0 code/mpscmvt.h
1 0 code/mpscsnc.h
2 2 code/mpsi.c
0 0 code/mpsicv.c
1 1 code/mpsio.h
1 1 code/mpsioan.c
2 2 code/mpsiw3.c
1 1 code/mpslib.h
1 1 code/mpsliban.c
1 1 code/mpstd.h
1 1 code/mpswin.h
0 0 code/mv.nmk
0 0 code/mv2test.c
3 3 code/nailboard.c
3 3 code/nailboard.h
0 0 code/nailboardtest.c
0 0 code/pc.nmk
3 3 code/policy.c
2 2 code/pool.c
1 1 code/poolabs.c
3 3 code/poolamc.c
3 0 code/poolams.c
1 0 code/poolams.h
3 3 code/poolawl.c
3 0 code/poollo.c
3 3 code/poolmfs.c
1 1 code/poolmfs.h
3 3 code/poolmrg.c
1 1 code/poolmrg.h
3 0 code/poolmv2.c
1 0 code/poolmv2.h
3 3 code/poolmvff.c
1 1 code/poolmvff.h
0 0 code/pooln.c
0 0 code/pooln.h
0 0 code/poolncv.c
3 0 code/poolsnc.c
3 3 code/prmc.h
3 0 code/prmcan.c
3 0 code/prmcanan.c
3 0 code/prmcfri3.c
3 0 code/prmcfri6.c
3 0 code/prmci3.c
3 0 code/prmci3.h
3 0 code/prmci3fr.c
3 0 code/prmci3li.c
3 0 code/prmci3w3.c
3 0 code/prmci3xc.c
3 3 code/prmci6.c
3 3 code/prmci6.h
3 0 code/prmci6fr.c
3 0 code/prmci6li.c
3 3 code/prmci6w3.c
3 0 code/prmci6xc.c
3 0 code/prmcix.c
3 0 code/prmcix.h
3 0 code/prmclia6.c
3 0 code/prmclii3.c
3 0 code/prmclii6.c
3 3 code/prmcw3.c
3 3 code/prmcw3.h
3 0 code/prmcw3i3.c
3 3 code/prmcw3i6.c
3 0 code/prmcxc.c
3 0 code/prmcxc.h
3 0 code/prmcxca6.c
3 0 code/prmcxci3.c
3 0 code/prmcxci6.c
1 1 code/prot.h
1 0 code/protan.c
2 0 code/proti3.c
2 2 code/proti6.c
2 0 code/protix.c
2 2 code/protocol.c
2 2 code/protocol.h
3 0 code/protsgix.c
3 3 code/protw3.c
3 0 code/protxc.c
3 0 code/protxc.h
2 0 code/pthrdext.c
2 0 code/pthrdext.h
0 0 code/qs.c
2 2 code/range.c
2 2 code/range.h
2 2 code/rangetree.c
2 2 code/rangetree.h
3 3 code/ref.c
2 2 code/ring.c
2 2 code/ring.h
3 3 code/root.c
3 3 code/sa.c
3 3 code/sa.h
2 0 code/sac.c
2 0 code/sac.h
0 0 code/sacss.c
4 4 code/scan.c
3 3 code/seg.c
0 0 code/segsmss.c
4 4 code/shield.c
0 0 code/sncss.c
1 1 code/sp.h
3 0 code/span.c
? ? spi3.c
3 3 code/splay.c
1 1 code/splay.h
3 0 code/spw3i3.c
3 3 code/spw3i6.c
3 3 code/ss.c
3 3 code/ss.h
0 0 code/steptest.c
2 2 code/table.c
1 1 code/table.h
0 0 code/tagtest.c
0 0 code/teletest.c
0 0 code/testlib.c
0 0 code/testlib.h
0 0 code/testthr.h
0 0 code/testthrix.c
0 0 code/testthrw3.c
1 1 code/th.h
1 0 code/than.c
2 0 code/thix.c
2 2 code/thw3.c
2 0 code/thxc.c
4 4 code/trace.c
3 3 code/traceanc.c
2 2 code/tract.c
2 2 code/tract.h
2 2 code/tree.c
1 1 code/tree.h
1 1 code/version.c
1 1 code/vm.c
1 1 code/vm.h
1 1 code/vman.c
2 2 code/vmix.c
2 2 code/vmw3.c
0 0 code/w3i3mv.nmk
0 0 code/w3i3pc.nmk
0 0 code/w3i6mv.bat
0 0 code/w3i6mv.nmk
0 0 code/w3i6pc.nmk
0 0 code/w3mv/.gitignore
0 0 code/w3mv/.p4ignore
0 0 code/w3mv/amcss/amcss.vcxproj
0 0 code/w3mv/eventcnv/eventcnv.vcxproj
0 0 code/w3mv/mps.sln
0 0 code/w3mv/mps/mps.vcxproj
3 3 code/walk.c
0 0 code/walkt0.c
0 0 code/xca6ll.gmk
0 0 code/xci3gc.gmk
0 0 code/xci3ll.gmk
0 0 code/xci6gc.gmk
0 0 code/xci6ll.gmk
0 0 code/zcoll.c
0 0 code/zmess.c
Loading