Repository navigation
Conversation
Replace the valgrind/callgrind backend with Intel Pin 4.4: provision the kit (sha256-pinned, cached) and build the new vendored inscount tool (scripts/ci/instrumentation), then sweep with --pin. The harness keeps its Callgrind code paths for local use but CI no longer installs valgrind, so the deterministic signal is now the pin_instructions BMF measure; cpu_time continues, callgrind 'instructions' history ends by design.
--repeat 0 skips the native timed phase (needs --pin), so each case is measured once under Pin; correctness still gates on the first instrumented run's stdout. The same Pin run now also preloads the LD_PRELOAD alloc shim (scripts/ci/instrumentation/allocshim.c, built on demand with cc, total parsed from the child's stderr), recording allocated_bytes alongside pin_instructions. Renderers print '-' / omit BMF rows instead of zeros when timed signals are absent; maxrss is never read from instrumented runs. TOOL_VERSION 3->4. Callgrind code paths untouched.
Measure step runs --repeat 0 (no native timed phase, no --timeout); each case measured once under Pin with the alloc shim in the same run. setup-instrumentation.sh fails fast when allocshim.c is missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of hhh-pa/clojure-code-snippet#52 to the Python harness, then switched from valgrind/callgrind to Intel Pin 4.4, then to a pin-only single-phase sweep with an allocation signal.
Harness (tools/measure.py):
Memory-signal semantics (boundary):
CI (.github/workflows/test.yml):
Bencher continuity tradeoff (by design):
instructions(Ir) history ENDS: CI no longer installs valgrind, so that measure stops being reported.cpu_timehistory also ENDS in CI: pin-only sweeps have no timed phase, so no cpu_time row is emitted (never a zero one).pin_instructionsmeasure (fresh history; Pin counts are a different signal than Ir and must not share the axis) plus the newallocated_bytesmeasure (fresh history; includes Pin overhead, within-version comparisons only). Default-branch runs gate on --threshold-measure pin_instructions.Validation on workstation.hhh.pa:
pin -versionreports pin-4.4-99977-54fbb8814; rerun is a no-op re-export.