Integrated: 8368095: [leyden] Fix klass dependency recording

Aleksey Shipilev shade at openjdk.org
Tue Sep 23 05:06:12 UTC 2025


On Fri, 19 Sep 2025 13:16:32 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

This pull request has now been integrated.

Changeset: b8cfee49
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/leyden/commit/b8cfee49c6cb60225b13cbe3dc57a37975125385
Stats:     35 lines in 3 files changed: 8 ins; 9 del; 18 mod

8368095: [leyden] Fix klass dependency recording

Reviewed-by: vlivanov

-------------

PR: https://git.openjdk.org/leyden/pull/97


More information about the leyden-dev mailing list