Repository navigation
Liveness epoch/urgency fixes, deferred chain invalidation, and debug JNI test seams - #798
Conversation
Scan-Build Report
Bug Summary
Reports
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CI Test ResultsRun: #37957706969 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-10-09 16:40:54 UTC |
e8f5ee5 to
93f2dbf
Compare
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. |
93f2dbf to
217a7ab
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93f2dbf486
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Stopping a recording can omit all reference-chain events since the last dump. The lifecycle also keeps strong thread references and stale chain data across recording sessions.
🤖 Datadog Autotest · Commit 93f2dbf · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
217a7ab to
b5588b7
Compare
b5588b7 to
b09e78d
Compare
e99dbc2 to
61cfd3d
Compare
61cfd3d to
ac29386
Compare
This comment has been minimized.
This comment has been minimized.
5f7ef97 to
2fbc79b
Compare
- ReferenceChainEvent carries one vector of ReferenceChainHop (klass id + retention-edge label) instead of two parallel vectors - Compress the sub-option floor/ceiling rationale and the provisional default constant comments to one concise statement each - Drop design-doc and Jira references from code comments; revert the unrelated LineNumberTable comment rewrite
- cleanup_table: account_epoch flag; track() overflow sweep skips epoch claim - admitForTracking: LIVENESS_URGENT_BOOST_ADMITS/BACKED_OFF counters - secondsToOOM: zero-denominator guard; ringThirdsStats -> ringWindowStats - JNI poll seam calls finishLoopIterationSerialized - gtests: DipThenRecover, OddLengthRisingWindow
…rences pause - heapReferenceCallback ran invalidateResolvedChain() inside the FollowReferences STW pause, taking _resolved_chains_lock, which drainPendingChainEvents() holds across its cache copy on the JFR dump thread. Evictions are now queued and applied on the BFS thread outside any walk. - PriorityExpandSet::insert() had no occupancy bound and could spin forever on a full table; it now returns false.
… seam - referenceChainsPesTests.inc: PriorityExpandSet round-trip, rebuildFrom, full-table self-termination; ClassTagAllocator negative-tag minting - referenceChainsTestAccessors.h: cacheChain() passes source_tag and source_tag_val through unchanged - referenceChainsOomTests.inc: setCanaryBackoffForTest() takes ns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33686e9 to
6c84483
Compare
|
@rkennke I think I addressed all. I am planning to merge shortly if I don't hear any objections |
kaahos
left a comment
There was a problem hiding this comment.
this looks good to me; thanks for the changes!
What does this PR do?:
Fixes and debug tooling for the reference-chain engine and the liveness tracker. The lifecycle/JFR/vmEntry wiring this PR first described landed in main via #797 and is not in this diff.
javaApi.cppadds the...ForTestnatives declared inJavaProfiler.java: pending-expand inspection, pass/gate predicates, tracker internals. Debug builds only. Release builds export no-op stubs, so the calls do not throwUnsatisfiedLinkError._resolved_chains_lockinside the FollowReferences pause. All callback paths defer: walk admission and auto-mark. The pending queue and its overflow flag reset at every recording and search boundary.cleanup_table()takes anaccount_epochflag. The overflow sweep intrack()no longer claims the GC epoch the background sweep needs. Entries store their admission epoch and age only for GCs they survived.ObjectSampler::start()finishesLivenessTracker::start()before it enablesSAMPLED_OBJECT_ALLOCor publishes_active. New countersLIVENESS_URGENT_BOOST_ADMITS/LIVENESS_URGENT_BOOST_BACKED_OFF.secondsToOOM()no longer divides by zero.Motivation:
Review feedback on the reference-chain work. An overflow sweep could empty the chain cache before a dump. Urgency admissions raced table cleanup. Epoch aging undercounted entries. The JNI seams test engine state deterministically.
Additional Notes:
PriorityExpandSet::insert()returns false on a full table instead of probing forever.contains()keeps its unbounded probe; the set stays under half capacity. See the inline thread onreferenceChains.h.ProfiledThreadTLS on entry, like the other JNI entry points.How to test the change?:
:ddprof-lib:gtestDebug/:ddprof-lib:gtestRelease— referenceChains and liveness suites, incl. new tests for defer/drain, thePriorityExpandSetfull-table case, andaccount_epochaging.testDebug/testRelease.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.