RFR (S) 8075030: JvmtiEnv::GetObjectSize reports incorrect java.lang.Class instance size
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Wed Jun 1 06:41:00 UTC 2016
Hi Aleksey,
I guess, at least, this needs a CCC request.
I'm uncomfortable to support the change without knowing the history
behind the original implementation.
Does anyone know the reasons why current implementation was chosen in
the first place?
Are there any tools that depend on the current behavior?
Thanks,
Serguei
On 5/31/16 00:40, Aleksey Shipilev wrote:
> Hi,
>
> Please review a tiny fix in GetObjectSize:
> https://bugs.openjdk.java.net/browse/JDK-8075030
> http://cr.openjdk.java.net/~shade/8075030/webrev.01/
>
> I think this is a leftover from Metaspace work.
>
> For some reason, JvmtiEnv::GetObjectSize has a special case for
> java.lang.Class: it returns the Klass* size, not the java.lang.Class
> instance size. This is incorrect: Klass* is indeed referenced from
> java.lang.Class.metadata field, but the instance size itself does not
> depend on metadata size. This confuses Instrumentation.getObjectSize users.
>
> Testing: new test; RBT, :hotspot_compiler, :hotspot_gc,
> :hotspot_runtime, :hotspot_serviceability, :hotspot_misc,
> :jdk_management, :jdk_instrument, :jdk_jmx, :jdk_jdi, :svc_tools.
>
> Thanks,
> -Aleksey
>
More information about the serviceability-dev
mailing list