Skip to contentSkip to conversation

CodeSamples/formal/herd: Import absperf scripts of Paul's litmus repo

PATCH Applied Akira Yokosawa 2 participants 3 messages Dec 9, 2017 – Dec 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 CodeSamples/formal/herd: Import absperf scripts of Paul's litmus repo

From d44f361687f33ef3c293154d94a18571591d97ba Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 8 Dec 2017 00:11:26 +0900
Subject: [PATCH 1/2] CodeSamples/formal/herd: Import absperf scripts of Paul's litmus repo

Import scripts as of commit 62d56aa9b4a2 ("Make absperf scripts more flexible") in Paul's repository at:

https://github.com/paulmckrcu/litmus.git

---
 CodeSamples/formal/herd/absperf-reduce.sh | 30 ++++++++++++++++++++++++++++++
 CodeSamples/formal/herd/absperf.sh        | 15 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 CodeSamples/formal/herd/absperf-reduce.sh
 create mode 100644 CodeSamples/formal/herd/absperf.sh
CodeSamples/formal/herd/absperf-reduce.sh new file +30 -0
new file mode 100644
index 0000000..0c338b8
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+awk '
+/absperf/ {
+	curtest=$1;
+	testran = 0;
+}
+
+/^Test/ {
+	testran = 1;
+}
+
+/maxresident)k/ {
+	if (testran) {
+		curtesttime = $0;
+		gsub(/user .*$/, "", curtesttime);
+		testtime_n[curtest]++;
+		testtime_sum[curtest] += curtesttime;
+		if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest])
+			testtime_max[curtest] = curtesttime;
+		if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest])
+			testtime_min[curtest] = curtesttime;
+	}
+}
+
+END {
+	for (i in testtime_n)
+		print i, testtime_sum[i] / testtime_n[i], testtime_min[i], testtime_max[i];
+}
+'
CodeSamples/formal/herd/absperf.sh new file +15 -0
new file mode 100644
index 0000000..4b54680
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+TIMECMD=/usr/bin/time
+TESTBASE=${1:-litmus-tests}
+TIMEOUT=${2:-15m}
+ITER=${3:-10}
+
+for n in $(seq $ITER)
+do
+	for i in $TESTBASE/absperf/*.litmus
+	do
+		echo $i
+		$TIMECMD timeout $TIMEOUT herd7 -conf linux-kernel.cfg $i
+	done
+done
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 CodeSamples/formal/herd: Make use of absperf scripts in make targets

From 858319eab17c2b51d17a39ff769b19303292b526 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 Dec 2017 00:15:57 +0900
Subject: [PATCH 2/2] CodeSamples/formal/herd: Make use of absperf scripts in make targets

Target "run-absperf" runs 16 of 20 absperf litmus tests whose results are covered in Table E.2.

Target "run-absperf-all" runs all 20 of the tests. Long tests should end up in timeout by default (15m).

Also add target "help".

---
 CodeSamples/formal/herd/.gitignore |  2 ++
 CodeSamples/formal/herd/Makefile   | 62 +++++++++++++++++++++++++++++---------
 2 files changed, 49 insertions(+), 15 deletions(-)
CodeSamples/formal/herd/.gitignore +2 -0
index e0ad195..d12c930 100644
@@ -1,5 +1,7 @@
 *.out
 *.herd
+*.raw
 klitmus
 klitmus.tar
 memory-model
+absperf
CodeSamples/formal/herd/Makefile +47 -15

98 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw
In reply to Akira Yokosawa
Quoted 11 lines · Akira Yokosawa
Quoted 1 line

From d44f361687f33ef3c293154d94a18571591d97ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Fri, 8 Dec 2017 00:11:26 +0900
Subject: [PATCH 1/2] CodeSamples/formal/herd: Import absperf scripts of Paul's litmus repo

Import scripts as of commit 62d56aa9b4a2 ("Make absperf scripts more flexible") in Paul's repository at:

https://github.com/paulmckrcu/litmus.git

Queued and pushed, thank you!

Thanx, Paul

Quoted 72 lines
---
 CodeSamples/formal/herd/absperf-reduce.sh | 30 ++++++++++++++++++++++++++++++
 CodeSamples/formal/herd/absperf.sh        | 15 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 CodeSamples/formal/herd/absperf-reduce.sh
 create mode 100644 CodeSamples/formal/herd/absperf.sh
CodeSamples/formal/herd/absperf-reduce.sh new file +30 -0
new file mode 100644
index 0000000..0c338b8
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+awk '
+/absperf/ {
+	curtest=$1;
+	testran = 0;
+}
+
+/^Test/ {
+	testran = 1;
+}
+
+/maxresident)k/ {
+	if (testran) {
+		curtesttime = $0;
+		gsub(/user .*$/, "", curtesttime);
+		testtime_n[curtest]++;
+		testtime_sum[curtest] += curtesttime;
+		if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest])
+			testtime_max[curtest] = curtesttime;
+		if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest])
+			testtime_min[curtest] = curtesttime;
+	}
+}
+
+END {
+	for (i in testtime_n)
+		print i, testtime_sum[i] / testtime_n[i], testtime_min[i], testtime_max[i];
+}
+'
CodeSamples/formal/herd/absperf.sh new file +15 -0
new file mode 100644
index 0000000..4b54680
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+TIMECMD=/usr/bin/time
+TESTBASE=${1:-litmus-tests}
+TIMEOUT=${2:-15m}
+ITER=${3:-10}
+
+for n in $(seq $ITER)
+do
+	for i in $TESTBASE/absperf/*.litmus
+	do
+		echo $i
+		$TIMECMD timeout $TIMEOUT herd7 -conf linux-kernel.cfg $i
+	done
+done
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html