RFR: 8231269: CompileTask::is_unloaded is slow due to JNIHandles type checks [v6]

Aleksey Shipilev shade at openjdk.org
Mon Apr 28 16:20:34 UTC 2025


On Mon, 28 Apr 2025 16:05:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I agree is_permanent_class_loader_data() captures the intent better. Let me see if it fits well here.

Ah wait, it does not. We need to hold on to something that blocks the unloading. Just checking `is_permanent_class_loader_data()` does not get us there. We would need to ask for some holder for it. For the reasons above, `method->method_holder()->klass_holder()` works for non-strong hidden classes as well.

This is also why current mainline code works -- it captures the same thing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24018#discussion_r2064032610


More information about the hotspot-compiler-dev mailing list