LINE=64
L1=4096
L1A=4
LL=16384
LLA=8
mxmult: mxmult.o main.o
cc -g -static -o $@ $^
mxmult.o: mxmult.c
cc -g -c -O2 -o $@ $^
main.o: main.c
cc -g -c -O2 -o $@ $^
.PHONY: run
run: mxmult
valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} ./mxmult
.PHONY: detailed
detailed: mxmult
valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} --cachegrind-out-file=stats.cgout ./mxmult
cg_annotate --auto=yes --show-percs=no stats.cgout | tee stats.rep
.PHONY: clean
clean:
rm -f *.o cachegrind.out.* *.cgout *.rep mxmult