chore: move object skip logic into instrument hooks#28
Merged
not-matthias merged 3 commits intoMay 22, 2026
Conversation
Member
not-matthias
commented
May 20, 2026
- chore: sync includes/callgrind.h with valgrind-codspeed
- ci: fail when includes/callgrind.h drifts from the valgrind fork
- feat: add instrument_hooks_callgrind_add_obj_skip
Replace the bundled callgrind.h with a verbatim copy of callgrind/callgrind.h from CodSpeedHQ/valgrind-codspeed@master, picking up VG_USERREQ__ADD_OBJ_SKIP and the CALLGRIND_ADD_OBJ_SKIP macro. License updated to GPLv3 to match the fork.
New check-callgrind-header job diffs the bundled header against CodSpeedHQ/valgrind-codspeed@master on every run, so a fork-side change can't silently get out of sync with the consumed userreqs.
Expose CALLGRIND_ADD_OBJ_SKIP through the C API so language integrations (pytest-codspeed, codspeed-rust, ...) can register --obj-skip paths at runtime without re-implementing the userreq trapdoor. The helper also resolves the realpath and registers it when it differs: callgrind matches obj-skip entries via exact strcmp against the loader-resolved name in obj_node, so a symlink-only registration would silently miss. Refs COD-2658.
65a7afb to
b9ddb5b
Compare
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.