Repository navigation
Conversation
| /** Ending at a fully thawed continuation is a complete logical stack in the ordinary VM mode. */ | ||
| @TestTemplate | ||
| @ValueSource(strings = {"vm"}) | ||
| public void keepsFullyThawedContinuationComplete(@CStack String cstack) throws Exception { |
| /** The same parked workload on a platform thread keeps its application callers on the stack. */ | ||
| @TestTemplate | ||
| @ValueSource(strings = {"vm", "vmx"}) | ||
| public void keepsPlatformCallersComplete(@CStack String cstack) throws Exception { |
| /** Missing logical callers must be marked truncated in both VM walking modes. */ | ||
| @TestTemplate | ||
| @ValueSource(strings = {"vm", "vmx"}) | ||
| public void marksSkippedFrozenCallersTruncated(@CStack String cstack) throws Exception { |
CI Test ResultsRun: #39329770068 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled ❌ Failing tests
Retried 2 of 32 cells. Failed Jobs
Summary: Total: 32 | Passed: 29 | Failed: 3 Updated: 2026-10-19 22:09:22 UTC |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
Static review supports setting truncation before either continuation-root termination or carrier walking when frozen callers are skipped. Fully thawed continuations retain their existing completeness behavior.
🤖 Bits Code Review · Commit e3bf2d3
What does this PR do?:
Mark VM-walked stacks as truncated when a continuation return barrier leaves older Java callers frozen in heap chunks. Set the flag before stopping at the synthetic continuation root (
cstack=vm) or continuing onto carrier frames (cstack=vmx). Fully thawed continuations retain their existing completeness behavior.Add a regression test that compares sampled stacks with the JVM's logical stack, exercises both walking modes, and checks platform-thread and fully thawed virtual-thread controls.
Motivation:
After a virtual thread unmounts and remounts, HotSpot can thaw only part of its stack. The profiler skips the remaining frozen callers but previously could serialize the resulting stack as complete. Carrier frames can still be visible while application callers are missing.
Additional Notes:
This change corrects the completeness flag; it does not reconstruct frozen callers. It adds no allocations or locks to the walker.
The existing
VirtualThreadWallClockTest.samplesCarrierFramesFromCpuBoundVT(vmx)fails on both unmodified HEAD and this branch because of the separate continuation metadata issue addressed by #870. In a disposable Linux build with #870's two production fixes applied, both new frozen-caller cases fail before this change and pass afterward, and the existing carrier check passes. Those unrelated fixes are not included in this PR.How to test the change?:
RecordingFilechecks confirm the serialized truncation flag, including samples that retain carrier frames while omitting frozen application callers.spotlessApplyandgit diff --checkpass. Linux x86, musl, ASan/TSan, and the complete Java integration suite were not run.For Datadog employees: