From 3e9e38a6f074617fd7b8cddea47a2da292f09132 Mon Sep 17 00:00:00 2001 From: Martin Ankerl Date: Thu, 10 Jun 2021 18:23:54 +0200 Subject: [PATCH] Undo incorrect "fix" for old linux headers. I have used #if defined(...) to check for enum values, which is... simply incorrect and not possible. Removing this check again. If compilation does not work, define the macro ANKERL_NANOBENCH_DISABLE_PERF_COUNTERS. --- docs/CODE_OF_CONDUCT.html | 2 +- docs/comparison.html | 2 +- docs/genindex.html | 2 +- docs/index.html | 2 +- docs/license.html | 2 +- docs/reference.html | 2 +- docs/search.html | 2 +- docs/tutorial.html | 2 +- src/docs/conf.py | 2 +- src/include/nanobench.h | 7 ++----- 10 files changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index e403723..27d30db 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -68,7 +68,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/comparison.html b/docs/comparison.html index eb41540..bcf030b 100644 --- a/docs/comparison.html +++ b/docs/comparison.html @@ -69,7 +69,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/genindex.html b/docs/genindex.html index 914f0ab..a023af8 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -67,7 +67,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/index.html b/docs/index.html index 24fcb9a..aeee47c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -68,7 +68,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/license.html b/docs/license.html index bd0531c..7c8b1ba 100644 --- a/docs/license.html +++ b/docs/license.html @@ -69,7 +69,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/reference.html b/docs/reference.html index 84166ae..d67cae7 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -69,7 +69,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/search.html b/docs/search.html index 0e254ce..4ea659c 100644 --- a/docs/search.html +++ b/docs/search.html @@ -70,7 +70,7 @@
- v4.3.4 + v4.3.5
diff --git a/docs/tutorial.html b/docs/tutorial.html index 767b8fd..148122e 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -69,7 +69,7 @@
- v4.3.4 + v4.3.5
diff --git a/src/docs/conf.py b/src/docs/conf.py index bd0a798..1fb87ce 100644 --- a/src/docs/conf.py +++ b/src/docs/conf.py @@ -22,7 +22,7 @@ project = 'nanobench' copyright = '2019-2021 Martin Ankerl ' author = 'Martin Ankerl' -version = 'v4.3.4' +version = 'v4.3.5' # -- General configuration --------------------------------------------------- diff --git a/src/include/nanobench.h b/src/include/nanobench.h index 030d6eb..6de3b39 100644 --- a/src/include/nanobench.h +++ b/src/include/nanobench.h @@ -33,7 +33,7 @@ // see https://semver.org/ #define ANKERL_NANOBENCH_VERSION_MAJOR 4 // incompatible API changes #define ANKERL_NANOBENCH_VERSION_MINOR 3 // backwards-compatible changes -#define ANKERL_NANOBENCH_VERSION_PATCH 4 // backwards-compatible bug fixes +#define ANKERL_NANOBENCH_VERSION_PATCH 5 // backwards-compatible bug fixes /////////////////////////////////////////////////////////////////////////////////////////////////// // public facing api - as minimal as possible @@ -88,10 +88,7 @@ } while (0) #endif -#if defined(__linux__) && defined(PERF_EVENT_IOC_ID) && defined(PERF_COUNT_HW_REF_CPU_CYCLES) && defined(PERF_FLAG_FD_CLOEXEC) && \ - !defined(ANKERL_NANOBENCH_DISABLE_PERF_COUNTERS) -// only enable perf counters on kernel 3.14 which seems to have all the necessary defines. The three PERF_... defines are not in -// kernel 2.6.32 (all others are). +#if defined(__linux__) && !defined(ANKERL_NANOBENCH_DISABLE_PERF_COUNTERS) # define ANKERL_NANOBENCH_PRIVATE_PERF_COUNTERS() 1 #else # define ANKERL_NANOBENCH_PRIVATE_PERF_COUNTERS() 0