Setup hotpath Valgrind
ActionsAbout
Tags
(2)A GitHub Action that installs hotpath-rs's patched Valgrind build on Linux runners, x86_64 and ARM64, for deterministic Callgrind instruction counts.
Released Valgrind versions (up to at least 3.28.0) misattribute inclusive instruction counts on ARM64: their arm64 decoder treats every plain B branch as a call, and Callgrind's return handling leaves call frames open after calls through the PLT, so Callgrind reports fake recursion and inflated totals. The builds this action installs fix both. On x86_64 they behave like the official release.
Unofficial build. The Valgrind builds come from hotpath-rs/valgrind, a fork not affiliated with or endorsed by the Valgrind project. Its README.hotpath lists every modification.
jobs:
benchmark:
runs-on: ubuntu-26.04-arm # or ubuntu-26.04, ubuntu-24.04, ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: hotpath-rs/setup-valgrind@v1.1.0
with:
version: 3.28.0.hotpath-rs-2
- run: valgrind --tool=callgrind ./target/release/my_benchmarkThe action installs the build to /opt/valgrind and puts /opt/valgrind/bin first on PATH, so later steps run valgrind directly. Running it again in a job replaces the install.
How to run a benchmark under Callgrind with hotpath and upload the merged report: CI integration docs.
| Input | Required | Description |
|---|---|---|
version |
yes | Valgrind build, for example 3.28.0.hotpath-rs-2. There is no default and no latest: a different build changes instruction counts, so an upgrade should be a deliberate edit that starts new baselines. |
| Output | Description |
|---|---|
version |
The installed version, for example 3.28.0.hotpath-rs-2. |
valgrind |
Absolute path of the valgrind launcher, /opt/valgrind/bin/valgrind. |
version |
Base | Runners |
|---|---|---|
3.28.0.hotpath-rs-2 |
Valgrind 3.28.0 + arm64 B jump-kind fix + arm64 return-unwinding fix |
Linux x86_64 and ARM64, built on Ubuntu 24.04, tested on 24.04 and 26.04 |
3.28.0.hotpath-rs |
Valgrind 3.28.0 + arm64 B jump-kind fix. Inclusive ARM64 counts are still inflated after calls through the PLT; use 3.28.0.hotpath-rs-2. |
Linux x86_64 and ARM64, built on Ubuntu 24.04, tested on 24.04 and 26.04 |
Builds are linked against glibc of Ubuntu 24.04 and run on that and newer distributions. macOS and Windows are not supported by Valgrind.
- Each action release records the SHA-256 of every build it can install (
checksums.txt). The download is checked against that, not against the release it comes from, so a replaced file cannot pass. - Action releases are immutable, and there is no moving
v1tag:@v1.1.0always runs the same code. Pinning the commit SHA (hotpath-rs/setup-valgrind@<sha> # v1.1.0) works as well.
This action is MIT licensed (LICENSE.txt). The Valgrind builds it installs are free software under the GNU General Public License, version 3 or later, with some files under other terms (see COPYING in each build and in the source). Each build's complete source is the release tag it was built from.
Setup hotpath Valgrind is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.