Skip to content

chore: move object skip logic into instrument hooks#28

Merged
not-matthias merged 3 commits into
mainfrom
cod-2658-move-object-skip-logic-into-instrument-hooks
May 22, 2026
Merged

chore: move object skip logic into instrument hooks#28
not-matthias merged 3 commits into
mainfrom
cod-2658-move-object-skip-logic-into-instrument-hooks

Conversation

@not-matthias
Copy link
Copy Markdown
Member

  • 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

@not-matthias not-matthias marked this pull request as ready for review May 20, 2026 13:24
Copy link
Copy Markdown
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

olgtm

Comment thread src/c.zig Outdated
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.
@not-matthias not-matthias force-pushed the cod-2658-move-object-skip-logic-into-instrument-hooks branch from 65a7afb to b9ddb5b Compare May 22, 2026 13:33
Copy link
Copy Markdown
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@not-matthias not-matthias merged commit b9ddb5b into main May 22, 2026
52 checks passed
@not-matthias not-matthias deleted the cod-2658-move-object-skip-logic-into-instrument-hooks branch May 22, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants