RFR: 8327246: Add a jcmd diagnostic command to list the jar files loaded by a process [v2]
Kevin Walls
kevinw at openjdk.org
Wed Jan 7 10:09:59 UTC 2026
On Tue, 6 Jan 2026 21:29:36 GMT, Larry Cable <duke at openjdk.org> wrote:
>> modified the pre-existing VM.classes jcmd to add a 'location' option, that when specified, will (natively) attempt to obtain the value (if non-null) of the location URL of the CodeSource of each classes ProtectionDomain.
>>
>> effectively:
>>
>> someObject.getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm()
>>
>> (where interim oops are null-checked)
>
> Larry Cable has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8327246: updated copyright year. fixed Capitialization nit and restructured use of InstanceKlass local as per comments
src/hotspot/share/oops/instanceKlass.cpp line 2360:
> 2358:
> 2359: InstanceKlass *ik = k->is_instance_klass() ? InstanceKlass::cast(k) : nullptr;
> 2360:
Looks good with the new local InstanceKlass ik.
Is it possible to not reassign into ik at lines 2386 and 2397, i.e. ik was the target class as an instanceKlass, but later represents pd or cs, so that can be hard to follow.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2667816732
More information about the hotspot-dev
mailing list