Skip to content

chore: bump samply-codspeed to mark truncated and failed stacks - #629

Open
not-matthias wants to merge 1 commit into
mainfrom
cod-4293-bump-samply-codspeed-in-the-runner
Open

not-matthias wants to merge 1 commit into
mainfrom
cod-4293-bump-samply-codspeed-in-the-runner

Conversation

@not-matthias

Copy link
Copy Markdown
Member

Closes COD-4293.

Bumps the pinned crates/samply-codspeed submodule from 030f8275 to 13e8116b so the truncated/failed stack markers land in the runner.

Included upstream commits:

  • feat(linux): mark truncated and failed sample stacks
  • chore: fix clippy lints reported by Rust 1.98
  • fix(linux): drop a thread's stack snapshots when it exits
  • fix(linux): only continue past the stack copy through a matching snapshot
  • fix(linux): take library names from the resolved path's file name
  • feat(linux): support frame-pointer and configurable DWARF unwinding

cargo check --workspace passes locally.

@codspeed

codspeed Bot commented Nov 17, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 23.54%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 9 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
✅ 52 untouched benchmarks
⏩ 6 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime memtrack track tar 9.3 s 7.5 s +23.54%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing cod-4293-bump-samply-codspeed-in-the-runner (976548c) with main (ffdafa6)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@not-matthias
not-matthias marked this pull request as ready for review November 17, 2026 10:39
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The update affects Linux wall-time profiling through the runner's bundled sampler.

The PR appears safe to merge, with a non-blocking concern about memory use while profiling deep recursion.

Fix All in Claude CodeFindings

  1. P2 Overlapping stack copies pile up ▶
Fix with agent prompt
### Issue 1
crates/samply-codspeed:1
The new cache keeps every 32,000-byte stack window during a slow recursive descent. Each window ends below the previous one, so `ThreadStackSnapshots::push` retains the older copies. `retire_returned` also keeps them while `sp` moves downward.

For example, 10,000 sampled depths retain about 320 MB per thread, and each new sample scans the growing list twice. The old cache stored only words read during unwinding, keyed by address. Consider capping retained bytes or compacting overlapping windows to keep profiling costs predictable.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates crates/samply-codspeed from 030f8275 to 13e8116b.

  • Linux wall-time profiles now mark sample stacks that are truncated or fail.

Reviews (1) · Last reviewed commit: "chore: bump samply-codspeed to mark trun..." · Reviewed by Greptile

Comment thread crates/samply-codspeed
@@ -1 +1 @@
Subproject commit 030f8275372ac74dfe47f4e619e8703e9354c600
Subproject commit 13e8116b47dda27f3326bf8fb28afabd26e4b46e

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Overlapping stack copies pile up

The new cache keeps every 32,000-byte stack window during a slow recursive descent. Each window ends below the previous one, so ThreadStackSnapshots::push retains the older copies. retire_returned also keeps them while sp moves downward.

For example, 10,000 sampled depths retain about 320 MB per thread, and each new sample scans the growing list twice. The old cache stored only words read during unwinding, keyed by address. Consider capping retained bytes or compacting overlapping windows to keep profiling costs predictable.

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/samply-codspeed
Line: 1

Comment:
**Overlapping stack copies pile up**

The new cache keeps every 32,000-byte stack window during a slow recursive descent. Each window ends below the previous one, so `ThreadStackSnapshots::push` retains the older copies. `retire_returned` also keeps them while `sp` moves downward.

For example, 10,000 sampled depths retain about 320 MB per thread, and each new sample scans the growing list twice. The old cache stored only words read during unwinding, keyed by address. Consider capping retained bytes or compacting overlapping windows to keep profiling costs predictable.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

@GuillaumeLagrange GuillaumeLagrange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

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