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 { |
Contributor
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 |
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: