Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-criterion-measurement for 
openSUSE:Factory checked in at 2021-08-25 20:56:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-criterion-measurement (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-criterion-measurement.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-criterion-measurement"

Wed Aug 25 20:56:45 2021 rev:2 rq:912591 version:0.1.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-criterion-measurement/ghc-criterion-measurement.changes
      2021-05-05 20:40:28.306793932 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-criterion-measurement.new.1899/ghc-criterion-measurement.changes
    2021-08-25 20:57:30.949215731 +0200
@@ -1,0 +2,29 @@
+Sat Jul 10 13:40:48 UTC 2021 - [email protected]
+
+- Update criterion-measurement to version 0.1.3.0.
+  0.1.3.0
+
+  * Change `criterion_rdtsc` to return `mach_absolute_time` on macOS. This is a
+    portable way of returning the number of CPU cycles that works on both 
Intel-
+    and ARM-based Macs.
+
+  * Change `criterion_gettime` to use `clock_gettime_nsec_np` instead of
+    `mach_absolute_time` on macOS. While `mach_absolute_time` has nanosecond
+    resolution on Intel-based Macs, this is not the case on ARM-based Macs, so
+    the previous `mach_absolute_time`-based implementation would return 
incorrect
+    timing results on Apple silicon.
+
+    There are two minor consequences of this change:
+
+    * `criterion-measurement` now only supports macOS 10.02 or later, as that 
is
+      the first version to have `clock_gettime_nsec_np`. As macOS 10.02 was
+      released in 2002, this is unlikely to affect users, but please speak up 
if
+      this is a problem for you.
+
+    * As `clock_gettime_nsec_np` does not require any special initialization
+      code, `criterion_inittime` is now a no-op on macOS. If you manually 
invoke
+      the `getTime` function in your code, however, it is still important that
+      you `initializeTime` beforehand, as this is still required for the 
Windows
+      implementation to work correctly.
+
+-------------------------------------------------------------------

Old:
----
  criterion-measurement-0.1.2.0.tar.gz

New:
----
  criterion-measurement-0.1.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-criterion-measurement.spec ++++++
--- /var/tmp/diff_new_pack.z0DwVK/_old  2021-08-25 20:57:31.505215002 +0200
+++ /var/tmp/diff_new_pack.z0DwVK/_new  2021-08-25 20:57:31.509214997 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name criterion-measurement
 Name:           ghc-%{pkg_name}
-Version:        0.1.2.0
+Version:        0.1.3.0
 Release:        0
 Summary:        Criterion measurement functionality and associated types
 License:        BSD-3-Clause

++++++ criterion-measurement-0.1.2.0.tar.gz -> 
criterion-measurement-0.1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/criterion-measurement-0.1.2.0/README.md 
new/criterion-measurement-0.1.3.0/README.md
--- old/criterion-measurement-0.1.2.0/README.md 2001-09-09 03:46:40.000000000 
+0200
+++ new/criterion-measurement-0.1.3.0/README.md 2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,5 @@
 # criterion-measurement
 
-[![Build 
Status](https://travis-ci.org/bos/criterion.png)](https://travis-ci.org/bos/criterion)
+[![Build 
Status](https://github.com/haskell/criterion/workflows/Haskell-CI/badge.svg)](https://github.com/haskell/criterion/actions?query=workflow%3AHaskell-CI)
 
 Measurement-related functionality extracted from Criterion, with minimal 
dependencies. The rationale for this is to enable alternative analysis 
front-ends.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/criterion-measurement-0.1.2.0/cbits/cycles.c 
new/criterion-measurement-0.1.3.0/cbits/cycles.c
--- old/criterion-measurement-0.1.2.0/cbits/cycles.c    2001-09-09 
03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/cbits/cycles.c    2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,15 @@
 #include "Rts.h"
 
-#if x86_64_HOST_ARCH || i386_HOST_ARCH
+#if darwin_HOST_OS
+
+#include <mach/mach_time.h>
+
+StgWord64 criterion_rdtsc(void)
+{
+  return mach_absolute_time();
+}
+
+#elif x86_64_HOST_ARCH || i386_HOST_ARCH
 
 StgWord64 criterion_rdtsc(void)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/criterion-measurement-0.1.2.0/cbits/time-osx.c 
new/criterion-measurement-0.1.3.0/cbits/time-osx.c
--- old/criterion-measurement-0.1.2.0/cbits/time-osx.c  2001-09-09 
03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/cbits/time-osx.c  2001-09-09 
03:46:40.000000000 +0200
@@ -1,20 +1,11 @@
 #include <mach/mach.h>
-#include <mach/mach_time.h>
+#include <time.h>
 
-static mach_timebase_info_data_t timebase_info;
-static double timebase_recip;
-
-void criterion_inittime(void)
-{
-    if (timebase_recip == 0) {
-       mach_timebase_info(&timebase_info);
-       timebase_recip = (timebase_info.denom / timebase_info.numer) / 1e9;
-    }
-}
+void criterion_inittime(void) {}
 
 double criterion_gettime(void)
 {
-    return mach_absolute_time() * timebase_recip;
+    return clock_gettime_nsec_np(CLOCK_UPTIME_RAW) / 1e9;
 }
 
 static double to_double(time_value_t time)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/criterion-measurement-0.1.2.0/changelog.md 
new/criterion-measurement-0.1.3.0/changelog.md
--- old/criterion-measurement-0.1.2.0/changelog.md      2001-09-09 
03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/changelog.md      2001-09-09 
03:46:40.000000000 +0200
@@ -1,3 +1,28 @@
+0.1.3.0
+
+* Change `criterion_rdtsc` to return `mach_absolute_time` on macOS. This is a
+  portable way of returning the number of CPU cycles that works on both Intel-
+  and ARM-based Macs.
+
+* Change `criterion_gettime` to use `clock_gettime_nsec_np` instead of
+  `mach_absolute_time` on macOS. While `mach_absolute_time` has nanosecond
+  resolution on Intel-based Macs, this is not the case on ARM-based Macs, so
+  the previous `mach_absolute_time`-based implementation would return incorrect
+  timing results on Apple silicon.
+
+  There are two minor consequences of this change:
+
+  * `criterion-measurement` now only supports macOS 10.02 or later, as that is
+    the first version to have `clock_gettime_nsec_np`. As macOS 10.02 was
+    released in 2002, this is unlikely to affect users, but please speak up if
+    this is a problem for you.
+
+  * As `clock_gettime_nsec_np` does not require any special initialization
+    code, `criterion_inittime` is now a no-op on macOS. If you manually invoke
+    the `getTime` function in your code, however, it is still important that
+    you `initializeTime` beforehand, as this is still required for the Windows
+    implementation to work correctly.
+
 0.1.2.0
 
 * Ensure that `Criterion.Measurement.Types.Internal` is always compiled with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/criterion-measurement-0.1.2.0/criterion-measurement.cabal 
new/criterion-measurement-0.1.3.0/criterion-measurement.cabal
--- old/criterion-measurement-0.1.2.0/criterion-measurement.cabal       
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/criterion-measurement.cabal       
2001-09-09 03:46:40.000000000 +0200
@@ -1,8 +1,8 @@
 name:                criterion-measurement
-version:             0.1.2.0
+version:             0.1.3.0
 synopsis:            Criterion measurement functionality and associated types
 description:         Measurement-related functionality extracted from 
Criterion, with minimal dependencies. The rationale for this is to enable 
alternative analysis front-ends.
-homepage:            https://github.com/bos/criterion
+homepage:            https://github.com/haskell/criterion
 license:             BSD3
 license-file:        LICENSE
 author:              Bryan O'Sullivan <[email protected]>
@@ -21,7 +21,9 @@
   GHC==8.2.2,
   GHC==8.4.4,
   GHC==8.6.5,
-  GHC==8.8.1
+  GHC==8.8.4,
+  GHC==8.10.4,
+  GHC==9.0.1
 
 flag fast
   description: compile without optimizations
@@ -67,5 +69,5 @@
 
 source-repository head
   type:     git
-  location: https://github.com/bos/criterion
+  location: https://github.com/haskell/criterion
   subdir:   criterion-measurement
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/criterion-measurement-0.1.2.0/src/Criterion/Measurement/Types.hs 
new/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types.hs
--- old/criterion-measurement-0.1.2.0/src/Criterion/Measurement/Types.hs        
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -332,7 +332,7 @@
 
 -- | Generate a function that will run an action a given number of times,
 -- reducing it to normal form each time.
-nfIO' :: (a -> b) -> IO a -> (Int64 -> IO ())
+nfIO' :: (a -> ()) -> IO a -> (Int64 -> IO ())
 nfIO' reduce a = go
   where go n
           | n <= 0    = return ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/criterion-measurement-0.1.2.0/src/Criterion/Measurement.hs 
new/criterion-measurement-0.1.3.0/src/Criterion/Measurement.hs
--- old/criterion-measurement-0.1.2.0/src/Criterion/Measurement.hs      
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.1.3.0/src/Criterion/Measurement.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -399,7 +399,7 @@
 -- accomplishes).
 --
 -- It is imperative that you call 'initializeTime' before calling 'getTime'.
--- (See [this bug report](https://github.com/bos/criterion/issues/195) for an
+-- (See [this bug report](https://github.com/haskell/criterion/issues/195) for 
an
 -- example of what can happen if you do not do so.) All of the 'IO'-returning
 -- functions in "Criterion.Main" make sure that this is done, but other
 -- functions (such as those in "Criterion.Measurement") do not guarantee this

Reply via email to