* [PATCH 1/2] CodeSamples/formal: Fix typo in absperf litmus test names
@ 2020-05-27 22:40 Akira Yokosawa
2020-05-27 22:44 ` [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number Akira Yokosawa
0 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2020-05-27 22:40 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
From 6eda855e9baeb335b5ab4e36c4b0a072a706ee3b Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 28 May 2020 07:21:50 +0900
Subject: [PATCH 1/2] CodeSamples/formal: Fix typo in absperf litmus test names
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
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(-)
diff --git a/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus b/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus
index b4bbbf98..19b70691 100644
--- a/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus
+++ b/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-C.litmus
@@ -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
{
}
diff --git a/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus b/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus
index 9382480b..c22f6a45 100644
--- a/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus
+++ b/CodeSamples/formal/herd/C-SB+l-o-o-u+l-o-o-u+l-o-o-u-CE.litmus
@@ -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
{
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
2020-05-27 22:40 [PATCH 1/2] CodeSamples/formal: Fix typo in absperf litmus test names Akira Yokosawa
@ 2020-05-27 22:44 ` Akira Yokosawa
2020-05-28 0:50 ` Paul E. McKenney
0 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2020-05-27 22:44 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
From 213bf072d15dfc3dce36b51a8bc1d35bd78e6609 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
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
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
CodeSamples/formal/herd/absperf-reduce.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CodeSamples/formal/herd/absperf-reduce.sh b/CodeSamples/formal/herd/absperf-reduce.sh
index 0c338b8b..9cf52182 100644
--- a/CodeSamples/formal/herd/absperf-reduce.sh
+++ b/CodeSamples/formal/herd/absperf-reduce.sh
@@ -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;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
2020-05-27 22:44 ` [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number Akira Yokosawa
@ 2020-05-28 0:50 ` Paul E. McKenney
2020-05-28 1:05 ` Akira Yokosawa
0 siblings, 1 reply; 5+ messages in thread
From: Paul E. McKenney @ 2020-05-28 0:50 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook
On Thu, May 28, 2020 at 07:44:11AM +0900, Akira Yokosawa wrote:
> >From 213bf072d15dfc3dce36b51a8bc1d35bd78e6609 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> 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
>
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Applied and pushed both, thank you!
Did any of these runtime errors make their way into the tables in
the text?
Thanx, Paul
> ---
> CodeSamples/formal/herd/absperf-reduce.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/CodeSamples/formal/herd/absperf-reduce.sh b/CodeSamples/formal/herd/absperf-reduce.sh
> index 0c338b8b..9cf52182 100644
> --- a/CodeSamples/formal/herd/absperf-reduce.sh
> +++ b/CodeSamples/formal/herd/absperf-reduce.sh
> @@ -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;
> }
> }
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
2020-05-28 0:50 ` Paul E. McKenney
@ 2020-05-28 1:05 ` Akira Yokosawa
2020-05-28 3:00 ` Paul E. McKenney
0 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2020-05-28 1:05 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
On Wed, 27 May 2020 17:50:15 -0700, Paul E. McKenney wrote:
> On Thu, May 28, 2020 at 07:44:11AM +0900, Akira Yokosawa wrote:
>> >From 213bf072d15dfc3dce36b51a8bc1d35bd78e6609 Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> 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
>>
>> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
>
> 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
>
> Thanx, Paul
>
>> ---
>> CodeSamples/formal/herd/absperf-reduce.sh | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/CodeSamples/formal/herd/absperf-reduce.sh b/CodeSamples/formal/herd/absperf-reduce.sh
>> index 0c338b8b..9cf52182 100644
>> --- a/CodeSamples/formal/herd/absperf-reduce.sh
>> +++ b/CodeSamples/formal/herd/absperf-reduce.sh
>> @@ -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;
>> }
>> }
>> --
>> 2.17.1
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number
2020-05-28 1:05 ` Akira Yokosawa
@ 2020-05-28 3:00 ` Paul E. McKenney
0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2020-05-28 3:00 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook
On Thu, May 28, 2020 at 10:05:06AM +0900, Akira Yokosawa wrote:
> On Wed, 27 May 2020 17:50:15 -0700, Paul E. McKenney wrote:
> > On Thu, May 28, 2020 at 07:44:11AM +0900, Akira Yokosawa wrote:
> >> >From 213bf072d15dfc3dce36b51a8bc1d35bd78e6609 Mon Sep 17 00:00:00 2001
> >> From: Akira Yokosawa <akiyks@gmail.com>
> >> 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
> >>
> >> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> >
> > 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.
Thank you for checking, and either way, good eyes!
Thanx, Paul
> Thanks, Akira
>
> >
> > Thanx, Paul
> >
> >> ---
> >> CodeSamples/formal/herd/absperf-reduce.sh | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/CodeSamples/formal/herd/absperf-reduce.sh b/CodeSamples/formal/herd/absperf-reduce.sh
> >> index 0c338b8b..9cf52182 100644
> >> --- a/CodeSamples/formal/herd/absperf-reduce.sh
> >> +++ b/CodeSamples/formal/herd/absperf-reduce.sh
> >> @@ -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;
> >> }
> >> }
> >> --
> >> 2.17.1
> >>
> >>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-28 3:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 22:40 [PATCH 1/2] CodeSamples/formal: Fix typo in absperf litmus test names Akira Yokosawa
2020-05-27 22:44 ` [PATCH 2/2] CodeSamples/formal/herd/absperf-reduce: Enforce compare as number Akira Yokosawa
2020-05-28 0:50 ` Paul E. McKenney
2020-05-28 1:05 ` Akira Yokosawa
2020-05-28 3:00 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.