Skip to content

fix: perf instrumentation not available for cpp codspeed #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

not-matthias
Copy link
Member

Moved from #13, so that it's linked to the correct Linear issue.

Blocked by CodSpeedHQ/instrument-hooks#6

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
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.

We also have performance regression introduced on instrumented test, I'm guessing this is due to the instrument-hooks library introduction, could we hunt changes to make them either non existant or as minimal as possible ?

Callgraphs show that we pickup instrumentation in callgrind in a way that we did not before, if we don't change thsi it will be a breaking change: https://codspeed.io/CodSpeedHQ/codspeed-cpp/branches/cod-1040-perf-instrumentation-not-available-for-cpp-codspeed?runnerMode=Instrumentation

@art049
Copy link
Member

art049 commented Jul 1, 2025

The regression is quite problematic since it appears to introduce a significant amount of overhead here. For interpreted languages, it doesn't make a big difference, but here, it seems to be substantial for micro benchmarks (even if the ones with regressions are very small). And we'll probably encounter the same issue when we port this to codspeed-rust.

Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

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

Still a few changes left

@not-matthias not-matthias force-pushed the cod-1040-perf-instrumentation-not-available-for-cpp-codspeed branch 11 times, most recently from c638d0d to e73c140 Compare July 3, 2025 15:06
@not-matthias
Copy link
Member Author

The benchmarks show the correct timings now. We're not optimizing away the memcpy and some benchmarks even have improved performance, since we're placing the measurement_stop closer to the benchmark (so we're not measuring extra instructions)

@not-matthias not-matthias force-pushed the cod-1040-perf-instrumentation-not-available-for-cpp-codspeed branch from e73c140 to 5a8ca30 Compare July 4, 2025 09:46
@not-matthias not-matthias force-pushed the cod-1040-perf-instrumentation-not-available-for-cpp-codspeed branch 2 times, most recently from ce20900 to 87b977a Compare July 4, 2025 13:03
@not-matthias not-matthias force-pushed the cod-1040-perf-instrumentation-not-available-for-cpp-codspeed branch from 87b977a to 8a6b904 Compare July 4, 2025 13:07
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.

3 participants