Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In the following scenario:
The following exception was sometimes thrown:
If exception was not thrown, then then turn off the profiler and turn it on again (repeat if necessary).
Why the exception occurs
JFR shares event data across recordings in the same JVM. If a separate recording enables
jdk.ObjectAllocationSample, that event can appear in the profiler’s snapshot even when the profiler is configured to use TLAB events and its own rate limiter.The rate limiter initializes its delegate only when a chunk contains
jdk.ObjectAllocationInNewTLABorjdk.ObjectAllocationOutsideTLAB. Previously, the allocation processor also passedjdk.ObjectAllocationSampleto that sampler. If the sample arrived before any TLAB events had initialized the delegate, the sampler threw IllegalStateException: delegate not set. This aborted processing before later events, including thread dumps, could be handled.What changed
The allocation processor now accepts only the event types selected by the profiler’s sampling mode. Native sampling accepts
jdk.ObjectAllocationSample. TLAB mode accepts the two TLAB event types. The JFR settings and the allocation processor use the same configuration check to select the mode.