RFR: 8317269: Store old classes in linked state in AOT cache [v5]

Ioi Lam iklam at openjdk.org
Fri Sep 5 04:38:10 UTC 2025


On Thu, 4 Sep 2025 18:39:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> `ExclusionCheckCandidates::add_candidate()` is a recursive function so it eventually adds all java_supers up to Object.
>
> Okay, I see add_candidate is recursive so should add everything in the hierarchy for the first 'k'.  That makes a lot of sense.   Now why does this check_dependency_exclusion have to check super and interfaces, if you already have all the super and interfaces in the list of candidates to check?

Imaging we have only 3 candidates, Child, Parent and GrandParent. Initially only GrandParent is excluded when we enter the the `while` loop inside `check_exclusion_for_self_and_dependencies`.

In the loop iteration, Parent is marked excluded (it's super has been excluded). We found a new exclusion. So we run the loop again.

In the second iteration, we mark Child as excluded. We run the loop again.

In the third iteration, we found no new exclusion, so we exit the loop.

>  if you already have all the super and interfaces in the list of candidates

The list of candidate form a directed graph. Exclusion is propagated through the edges of this graph. `k->super()` is one of such edges.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26754#discussion_r2324069415


More information about the hotspot-dev mailing list