CodeSamples/formal: Fix typo in absperf litmus test names
PATCH 1/2 CodeSamples/formal: Fix typo in absperf litmus test names
From 6eda855e9baeb335b5ab4e36c4b0a072a706ee3b Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 28 May 2020 07:21:50 +0900
Subject: [PATCH 1/2] CodeSamples/formal: Fix typo in absperf litmus test names
--- CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus | 2 +- CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus +1 -1
@@ -1,4 +1,4 @@ -C C-SB+l-o-o-u+l-o-o-u-+l-o-o-u-C +C C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C { }
CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus +1 -1
@@ -1,4 +1,4 @@ -C C-SB+l-o-o-u+l-o-o-u-+l-o-o-u-CE +C C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE { }
Signature · 1 line
2.17.1
PATCH 2/2 CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
From 213bf072d15dfc3dce36b51a8bc1d35bd78e6609 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 28 May 2020 07:25:04 +0900
Subject: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
When there are differences in the number of digits in runtime, absperf-reduce.sh miscalculates min and max values and shows strange results such as:
C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 11.81 9.64
(avr) (min) (max)Fix this by adding 0 on both sides of comparison and enforce conversion to numbers. After this change:
C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 9.23 15.77
--- CodeSamples/formal/herd/absperf-reduce.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
CodeSamples/formal/herd/absperf-reduce.sh +2 -2
@@ -16,9 +16,9 @@ awk ' gsub(/user .*$/, "", curtesttime); testtime_n[curtest]++; testtime_sum[curtest] += curtesttime; - if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest]) + if (testtime_max[curtest] == "" || curtesttime + 0 > testtime_max[curtest] + 0) testtime_max[curtest] = curtesttime; - if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest]) + if (testtime_min[curtest] == "" || curtesttime + 0 < testtime_min[curtest] + 0) testtime_min[curtest] = curtesttime; } }
Signature · 1 line
2.17.1
Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
Quoted 12 lines · Akira Yokosawa
Quoted 1 line
From
213bf072d15dfc3dce36b51a8bc1d35bd78e6609Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 28 May 2020 07:25:04 +0900
Subject: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as numberWhen there are differences in the number of digits in runtime,
absperf-reduce.shmiscalculates min and max values and shows strange results such as:C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 11.81 9.64 (avr) (min) (max)
Quoted 6 lines
Fix this by adding 0 on both sides of comparison and enforce conversion to numbers. After this change:
C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 9.23 15.77Signed-off-by Akira Yokosawa <[email protected]>
Applied and pushed both, thank you!
Did any of these runtime errors make their way into the tables in the text?
Thanx, Paul
Quoted 24 lines
--- CodeSamples/formal/herd/absperf-reduce.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)CodeSamples/formal/herd/absperf-reduce.sh +2
-2@@ -16,9 +16,9 @@ awk ' gsub(/user .*$/, "", curtesttime); testtime_n[curtest]++; testtime_sum[curtest] += curtesttime; - if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest]) + if (testtime_max[curtest] == "" || curtesttime + 0 > testtime_max[curtest] + 0) testtime_max[curtest] = curtesttime; - if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest]) + if (testtime_min[curtest] == "" || curtesttime + 0 < testtime_min[curtest] + 0) testtime_min[curtest] = curtesttime; } }Signature · 1 line
2.17.1
Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
Quoted 16 lines · Paul E. McKenney
Quoted 15 lines · Akira Yokosawa
Quoted 1 line
From
213bf072d15dfc3dce36b51a8bc1d35bd78e6609Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 28 May 2020 07:25:04 +0900
Subject: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as numberWhen there are differences in the number of digits in runtime,
absperf-reduce.shmiscalculates min and max values and shows strange results such as:C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 11.81 9.64 (avr) (min) (max)Fix this by adding 0 on both sides of comparison and enforce conversion to numbers. After this change:
Quoted 8 lines
Quoted 3 lines
C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 9.23 15.77Signed-off-by Akira Yokosawa <[email protected]>Applied and pushed both, thank you!
Did any of these runtime errors make their way into the tables in the text?
I don't think so. Tables 17.4 and E.5 present averages only.
I spotted them while I did some absperf runs to compare herd7 7.52 and herd7 HEAD during discussions with Andrii.
Thanks, Akira
Quoted 27 lines
Thanx, Paul
Quoted 24 lines
--- CodeSamples/formal/herd/absperf-reduce.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)CodeSamples/formal/herd/absperf-reduce.sh +2
-2@@ -16,9 +16,9 @@ awk ' gsub(/user .*$/, "", curtesttime); testtime_n[curtest]++; testtime_sum[curtest] += curtesttime; - if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest]) + if (testtime_max[curtest] == "" || curtesttime + 0 > testtime_max[curtest] + 0) testtime_max[curtest] = curtesttime; - if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest]) + if (testtime_min[curtest] == "" || curtesttime + 0 < testtime_min[curtest] + 0) testtime_min[curtest] = curtesttime; } }Signature · 1 line
2.17.1
Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
Quoted 23 lines · Akira Yokosawa
Quoted 22 lines · Paul E. McKenney
Quoted 12 lines · Akira Yokosawa
Quoted 1 line
From
213bf072d15dfc3dce36b51a8bc1d35bd78e6609Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 28 May 2020 07:25:04 +0900
Subject: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as numberWhen there are differences in the number of digits in runtime,
absperf-reduce.shmiscalculates min and max values and shows strange results such as:C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 11.81 9.64 (avr) (min) (max)Quoted 6 lines
Fix this by adding 0 on both sides of comparison and enforce conversion to numbers. After this change:
C-SB+l-o-o-u+l-o-o-u+l-o-o-u-XE.litmus 13.255 9.23 15.77Signed-off-by Akira Yokosawa <[email protected]>Applied and pushed both, thank you!
Quoted 7 lines
Quoted 2 lines
Did any of these runtime errors make their way into the tables in the text?
I don't think so. Tables 17.4 and E.5 present averages only.
I spotted them while I did some absperf runs to compare herd7 7.52 and herd7 HEAD during discussions with Andrii.
Thank you for checking, and either way, good eyes!
Thanx, Paul
Quoted 29 lines
Thanks, Akira
Quoted 27 lines
Thanx, Paul
Quoted 24 lines
--- CodeSamples/formal/herd/absperf-reduce.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)CodeSamples/formal/herd/absperf-reduce.sh +2
-2@@ -16,9 +16,9 @@ awk ' gsub(/user .*$/, "", curtesttime); testtime_n[curtest]++; testtime_sum[curtest] += curtesttime; - if (testtime_max[curtest] == "" || curtesttime > testtime_max[curtest]) + if (testtime_max[curtest] == "" || curtesttime + 0 > testtime_max[curtest] + 0) testtime_max[curtest] = curtesttime; - if (testtime_min[curtest] == "" || curtesttime < testtime_min[curtest]) + if (testtime_min[curtest] == "" || curtesttime + 0 < testtime_min[curtest] + 0) testtime_min[curtest] = curtesttime; } }Signature · 1 line
2.17.1