feat: add callgrind_toggle_collect helper#29
Conversation
Greptile SummaryThis PR exposes
Confidence Score: 5/5The change is a straightforward additive wrapper — three files each gain an identical, two-line function that either no-ops or forwards to a well-established Valgrind macro. No existing code paths are modified. The three changed files are in perfect sync: the source wrapper, its distribution amalgam, and the public header all receive the same, mechanical addition. The underlying CALLGRIND_TOGGLE_COLLECT macro has been part of the Valgrind client-request API for many years, and the no-op stubs on Windows/Apple follow the exact same pattern used by every other wrapper in this file. There are no logic branches, no new state, and no modified call-sites. No files require special attention. Important Files Changed
|
Expose CALLGRIND_TOGGLE_COLLECT as a wrapper next to the existing start/stop instrumentation helpers. Unlike toggling instrumentation, toggling collection does not flush the simulated cache, so integrations can exclude code regions (e.g. google benchmark's PauseTiming sections) from measurement without paying an artificial cold-cache warmup in the measured region. Refs COD-2033.
b6c4a75 to
1ec92c8
Compare
Expose CALLGRIND_TOGGLE_COLLECT as a wrapper next to the existing
start/stop instrumentation helpers. Unlike toggling instrumentation,
toggling collection does not flush the simulated cache, so integrations
can exclude code regions (e.g. google benchmark's PauseTiming sections)
from measurement without paying an artificial cold-cache warmup in the
measured region.
Refs COD-2033.