From 2d0409ba61f03cde66a5c614eb3037d267af9a8e Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 16 May 2015 10:19:22 +0200 Subject: [PATCH] Make the run more flexible Moves some programs to be configurable via env vars, for easier customisation. --- Makefile | 4 +++- run.sh | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 75fdbfe..2c261bb 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ EXTRA_RUN = /bin/true REPS = 100 +PERF ?= perf + all: $(PROGS) java/Null.class $(PROGS): Makefile @@ -94,7 +96,7 @@ log: $(PROGS) $(SCRIPTS) java/Null.class Makefile for prog in $(PROGS:%=./%) $(SCRIPTS:%=./%) $(EXTRA_RUN) $(JAVA_INVOCS); do \ echo $$prog; \ for metric in $(METRICS); do \ - LC_ALL=C perf stat -e "$$metric" -r $(REPS) -o log --append $$prog; \ + LC_ALL=C $(PERF) stat -e "$$metric" -r $(REPS) -o log --append $$prog; \ done; \ done diff --git a/run.sh b/run.sh index 9872d17..b2733dd 100755 --- a/run.sh +++ b/run.sh @@ -1,10 +1,13 @@ #!/bin/sh +CHRT=${CHRT:-chrt -r 5} +TASKSET=${TASKSET:-taskset -c 0} + # rebuild everything make clean make # preseed filesystem cache make log REPS=2 # now do the real run -chrt -r 5 taskset -c 0 make log REPS=500 +$CHRT $TASKSET make log REPS=500 LC_ALL=en_US.UTF-8 awk -f dump.awk log -- 2.39.5