RFR: 8327246: Add a jcmd diagnostic command to list the jar files loaded by a process [v2]

Laurence Cable larry.cable at oracle.com
Fri Jan 9 20:09:21 UTC 2026


ok will add such.

On 1/9/26 9:46 AM, Leonid Mesnik wrote:
> On Fri, 9 Jan 2026 17:26:30 GMT, Larry Cable <duke at openjdk.org> wrote:
>
>>> src/hotspot/share/oops/instanceKlass.cpp line 2397:
>>>
>>>> 2395:         oop cs = pd->obj_field(csfd.offset());
>>>> 2396:
>>>> 2397:         if (cs != nullptr && (ik = cs->klass()->is_instance_klass() ? InstanceKlass::cast(cs->klass()) : nullptr) != nullptr) {
>>> Is a non-instance-class possible here??
>> good question, but I think defensive coding is warranted, and this is not a performance sensitive code path IMO
> I would prefer to add assertion it such cases. So we can see during testing if assumption is incorrect.  It also helps to find changed invariants earlier.
> The defensive code path might be fine for product to don't bother users with crashes.
>
> -------------
>
> PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2677066611



More information about the serviceability-dev mailing list