Commit Graph

1631 Commits

Author SHA1 Message Date
Richard Cole
45ded53f70
update version of gtest to v1.15.2 (latest) and also the cmake config (#1864)
* update version of gtest to v1.15.2 (latest) and also the cmake configuration to avoid deprecation warnings

* `cmake/GoogleTest.cmake.in`: do a shallow clone of google test

---------

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
Co-authored-by: Roman Lebedev <lebedev.ri@gmail.com>
2025-03-12 17:40:24 +03:00
Roman Lebedev
dafc6347e2 CI: switch to ninja on all jobs 2025-03-12 17:18:37 +03:00
Roman Lebedev
1de7d6aeae CI: use Ninja in sanitizer jobs 2025-03-12 17:18:37 +03:00
Roman Lebedev
02c258079e CI: only clone/fetch the parts of LLVM monorepo that we need
This ends up being *much* faster, noticeably speeding up these jobs.
2025-03-12 17:18:37 +03:00
Roman Lebedev
6cd107ffad CI: build libcxxabi against system unwind library
... because that is what the MSan is built against,
and mixing them clearly causes issues.
2025-03-12 17:18:37 +03:00
Max Van den Eynde
2bf3534075
Compilation example was wrong. Fixed standard (#1945) 2025-03-12 14:22:18 +03:00
EfesX
5a4c459548
fix memory manager result bug (#1941)
* fix memory manager result bug

* change is_valid to memory_iterations

* fix test

* some fixes

* fix test

...for msvc

* fix test

* fix test

add the correct explicitly casts

* fix msvc failure

* some fixes

* remove unnecessary include
2025-03-12 10:15:28 +00:00
Alfred Wingate
571c235e1e
Install FindPFM.cmake for bencmarkConfig.cmake (#1942)
There is no upstream PFM cmake package config file to use, so this has
to be installed for the benchmark cmake package config file to work.

Bug: https://bugs.gentoo.org/950573
See-Also: c2146397ac

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2025-03-05 08:43:48 +00:00
EfesX
ff5c94d860
change setup and teardown callback type (#1934)
Change type of callbacks to take `std::function`
2025-02-20 16:16:32 +03:00
Dillon
8d4fdd6e6e
Fix build errors on QuRT (Hexagon) (#1938) 2025-02-19 01:57:34 +03:00
dominic
951429282a
[clang-tidy] resolve some global clang-tidy issues (#1933)
* [clang-tidy] resolve some global clang-tidy issues

* more nolint and some global fixes
2025-02-18 10:07:57 +00:00
dominic
57efbfb3a0
use smart pointers (#1935)
* use smart pointers
* use vectors
* size_t
2025-02-18 09:59:27 +00:00
Nicholas Junge
afa46a38d9
deps: Update nanobind_bazel to v2.5.0 (#1936)
No new functionality, just an update to the newest nanobind.

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-02-17 13:44:39 +00:00
Nicholas Junge
657a55a0d4
dx: Update pre-commit repos, change imports of Python / CC rules (#1937)
The changes are an autofix added in Buildifier 8.0.1, designed to future-proof
Bazel projects against the eventual removal of these rules from the native
Bazel namespace.
2025-02-17 13:28:32 +00:00
dominic
adbda82db3
[clang-tidy] autofix readability issues (#1931)
* [clang-tidy] autofix readability issues

* more modern clang format
2025-02-12 19:40:49 +00:00
dominic
2d4c8dd21a
[clang-tidy] autofix cppcoreguidelines (#1932)
* [clang-tidy] autofix cppcoreguidelines

* better than automation maybe
2025-02-12 19:32:45 +00:00
dominic
f8db7f6c07
[clang-tidy] fix missing braces (#1928)
* [clang-tidy] fix missing braces
2025-02-11 23:56:06 +00:00
dominic
c68e308b4f
[clang-tidy] fix warning about decaying array to pointer (#1926)
* [clang-tidy] fix warning about decaying array to pointer

* fix a different warning (old style cast)

* use string_view instead of old-style const char* strings

* ensure bazel windows is using c++17

* learn to use bazel

* and tests

* precommit fix

* more string_view creation and casting

* format

* format

* [clang-tidy] use unique_ptr for benchmark registration (#1927)

* use unique_ptr for benchmark registration
2025-02-11 23:15:20 +00:00
dominic
05c5930d96
[clang-tidy] use unique_ptr for benchmark registration (#1927)
* use unique_ptr for benchmark registration
2025-02-11 21:10:34 +00:00
dominic
6a508bf11e
benchmark declarations can and should be const (clang-tidy) (#1924)
* benchmark declarations can and should be const (clang-tidy)

* clang-format

* add clang-tidy ignore file to remove googletest (and other third party) source for consideration
2025-02-10 17:16:03 -08:00
dominic
a125fb6736
run clang-tidy using a common config and reduced set of tests (#1923)
* move clang-tidy config somewhere central and reduce it
2025-02-11 00:32:38 +00:00
dominic
835365f99a
remove cxx03 test, fully unblocking c++1X development (#1903)
* remove cxx03 test, fully unblocking c++1X development

* remove unnecessary macros

* pre-commit

* remove opt-in analyzer warnings from clang-tidy

* revert some changes, flush streams

* replace abort with exit(1) to call atexit and dtors

* remove more endl and put in explicit flush
2025-02-10 22:17:49 +00:00
UebelAndre
933e6d3c1f
Build libpfm with rules_cc (#1922)
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-02-10 22:00:14 +00:00
Brad Smith
da9d68953b
Remove /proc/cpuinfo fallback path (#1921)
AIX, WASM (fork of musl for libc) and a few others should now use the sysconf
path. /proc is not portable and cpuinfo is Linux specific. It does not work
anywhere else.
2025-02-10 17:34:29 +00:00
dominic
9d8201efd4
fix sanitizer cmake builds (#1906)
* bump llvm version to 19

* use same standard for feature checks as for the build
2025-02-06 13:03:14 +00:00
Brad Smith
edb1e76d8c
Try to use the _SC_NPROCESSORS_ONLN sysconf elsewhere (#1920)
Try to use the sysconf method on other OS's other than just
Linux and Solaris if it exists. Also slight shuffling of the
order of sysctl and sysconf methods.
2025-02-06 12:54:17 +00:00
Brad Smith
faaa266d33
Replace usage of deprecated sysctl on macOS (#1919)
The use of the sysctl hw.ncpu has long been deprecated and
should be replaced by hw.logicalcpu.
2025-02-06 10:53:21 +00:00
Brad Smith
41e81b1ca4
Retrieve the number of online CPUs on OpenBSD and NetBSD (#1916)
* Retrieve the number of online CPUs on OpenBSD and NetBSD

* Spacing adjustment

---------

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-02-06 10:10:55 +00:00
dominic
47bc26c8b5
change pacboy compiler target for windows builds (#1915)
* change pacboy compiler target for windows builds

* use an action for cmake instead of doing things manually

* set compiler for cmake

* remove cmake action from msys2 build

* readd cmake package for msys2

* fix cmake test path to match build

* fix msvc build type setting

* fix msvc build type setting

* consistent output directory for msvc

* remove legacy environments (https://www.msys2.org/docs/environments/\#__tabbed_1_2)

* remove shell overrides and depend on default for msys2
2025-02-05 17:45:30 +00:00
dominic
2e16afc3fd
add back /proc/cpuinfo as a fallback for some platforms (#1918) 2025-02-05 12:21:47 +00:00
Brad Smith
c35af58b61
Update error message now that /proc/cpuinfo is no longer in use (#1917)
c24774dc4f removed using /proc/cpuinfo
so no longer mention it in the error message.
2025-02-04 10:32:41 +00:00
Dominic Hamon
4a805f9f0f clang-tidy warning 2025-01-30 10:00:04 +00:00
Dominic Hamon
4642758438 fix some clang-tidy issues 2025-01-30 09:52:07 +00:00
xdje42
049f6e79cc
[BUG] Run external profiler (ProfilerManager) same number of iterations #1913 (#1914)
Run the external profiler the same number of iterations as the
benchmark was run normally.
This makes, for example, a trace collected via ProfilerManager
consistent with collected PMU data.
2025-01-29 09:53:56 +00:00
Christian Clauss
3d027d7e38
ruff rule E501: Fix long lines in Python code (#1910)
* ruff rule E501: Fix long lines in Python code

* Add missing space

---------

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-01-22 16:43:07 +00:00
Christian Clauss
6f21075d9c
GitHub Actions: build-and-test on an ARM processor (#1911)
[Standard GitHub-hosted runners for public repositories](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories) --> `ubuntu-22.04-arm`, `ubuntu-24.04-arm`
2025-01-22 14:24:22 +00:00
Christian Clauss
ecb5df6473
Lint Python: Add more ruff rules (#1909)
* Lint Python: Add more ruff rules

* range(len()) --> enumerate()

* zip(strict=True)
2025-01-22 11:50:00 +00:00
Nicholas Junge
d6536acfe8
ci: Update pre-commit hooks (#1905)
As a fix, also turn the comment in libpfm's build file into a proper Starlark
docstring.

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-01-13 13:38:59 +00:00
Nicholas Junge
4834ae9e57
Update nanobind-bazel to v2.4.0 (#1904)
Contains nanobind v2.4.0, which brings some more functionality, free-threading fixes,
and performance improvements.
2025-01-13 13:33:04 +00:00
Helge Deller
c24774dc4f
Get number of CPUs with sysconf() on Linux (#1901)
* Get number of CPUs with sysconf() on Linux

Avoid parsing the /proc/cpuinfo just to get number of CPUs.
Instead use the portable function provided by glibc.

* Update sysinfo.cc
2025-01-09 16:07:43 +00:00
Helge Deller
39be87d300
Fix runtime crash when parsing /proc/cpuinfo fails (#1900)
The testcase fails on sparc64, because the parsing of /proc/cpuinfo
fails and thus currently returns "0" CPUs which finally leads
to division-by-zero faults in the tests.

Fix the issue by returning at least "1" CPU which allows the
tests to run. A error message will be printed in any case.

Long-term the code should be fixed to parse the cpuinfo output
on sparch which looks like this:
...
type            : sun4v
ncpus probed    : 48
ncpus active    : 48
2025-01-09 10:47:29 +00:00
Helge Deller
077db43001
cycleclock: Use cock_gettime() as fallback for any Linux architecture (#1899)
The Linux kernel provides the clock_gettime() functions since a long
time already, so it's possible to use it as a generic fallback option
for any architecture if no other (better) possibility has been provided
instead.

I noticed the benchmark package failed to build on debian on the SH-4
architecture, so with this change SH-4 is now the first user of this
fallback option.
2025-01-08 16:54:08 +00:00
0dminnimda
f981f58da3
README.md: fix build instructions (#1880)
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-01-08 12:49:09 +00:00
Hamza
7ddc400d62
fix: remove clang-cl compilation warning (#1895)
- MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc).

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-01-08 12:41:17 +00:00
Helge Deller
f65741b2bd
cycleclock: Support for PA-RISC (hppa) architecture (#1894)
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2025-01-08 12:03:53 +00:00
Keith Smiley
5af40e824d
[bazel] Remove selects on CPU (#1892)
In a future version of bazel this produces a warning. In this case using
only the platform being windows is enough. Fixes:

```
WARNING: /.../benchmark/BUILD.bazel:29:15: in config_setting rule //:windows: select() on cpu is deprecated. Use platform constraints instead: https://bazel.build/docs/configurable-attributes#platforms.
```
2025-01-08 11:26:44 +00:00
Devon Loehr
f4f93b5553
Change SDK version check (#1887)
Now that github seems to have updated its builders, perhaps we can check the SDK version the more standard way.
2024-12-10 15:29:03 +00:00
Nicholas Junge
ae52c9e66e
Remove wheel merge job, merge artifacts on download (#1886)
This is supported by `actions/download-artifact@v4`, and endorsed by cibuildwheel
in their documentation (see https://cibuildwheel.pypa.io/en/stable/deliver-to-pypi/#github-actions).

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2024-12-10 12:27:12 +00:00
Dominic Hamon
c8c66e0b4a remove unnecessary bazel action parameter 2024-12-10 12:07:53 +00:00
Dominic Hamon
b32ae9c9af remove noenable_bzlmod as workspace support is going away 2024-12-10 12:04:53 +00:00