RFR: 8368095: [leyden] Fix klass dependency recording [v3]
Andrew Dinn
adinn at openjdk.org
Mon Sep 22 14:40:45 UTC 2025
On Fri, 19 Sep 2025 13:57:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See the bug for symptoms. https://github.com/openjdk/leyden/commit/7b7648a4c9f67be509c6fccbcbc0502648388fdc exposed that our dependency recording is not actually accurate. Now that we check that precompiled tasks have dependencies recorded, before we treat class IK as fully initialized, _missing dependencies_ lead to premature replacement of AP4 -> A4, and potential trap from A4.
>>
>> I see there are several missing things:
>> 1. We need to record dependencies on object klasses as well, not only on plain metadata.
>> 2. Since ciObjectFactory is shared, we need to notice objects/metadata even on cache hits.
>> 3. It looks like we need to observe dependencies even when `cik->is_initialized()` returns `false` at the moment.
>>
>> Additional testing:
>> - [x] Linux x86_64 server fastdebug, `runtime/cds`
>> - [x] Benchmarks
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "Retract some unneccesary paths"
>
> This reverts commit cb48aacac9d7915e6fd890398020442aedac7948.
> The performance improves as we go from top to bottom. Arguably, this might suggest we do not need to handle oop accesses, really, but there is a minor decrease to the number of total traps and what looks to be a minor performance improvement on top.
Oh, I'm all for handling oop accesses and, indeed, everything else. There is no point exiting AP4 code for AP code until the probability of a deopt registers only a minor increment. I just wanted to know to what degree the benefit we were seeing was down to tracking new oops vs the same old oops.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/97#issuecomment-3319462533
More information about the leyden-dev
mailing list