review (S) for 7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue

Tom Rodriguez tom.rodriguez at
Tue Mar 29 13:58:19 PDT 2011

On Mar 29, 2011, at 11:41 AM, Vladimir Kozlov wrote:

> Looks good but I would not call it small (S) ;)
> 369  // lookup but since it's no used for these currently
>                              ^ not?
> why you need such spacing?
> 47     Type type            = db.lookupType("instanceMirrorKlass");
>  55     // klass and oop_size are a HotSpot magic field and hence we
>                                   ^               ^ fields

I've fixed all those.  Thanks.


> Vladimir
> Tom Rodriguez wrote:
>> 7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue
>> Reviewed-by:
>> There were some places that were finding static fields by iterating
>> over the InstanceKlass object which I missed in my original changes.
>> I added an iterateStaticFields that hides the owner the static fields
>> and uses the OopVisitor.getObj to return the proper object.  I
>> inspected all the iterateFields call sites to make sure I didn't miss
>> any.  Additionally iteration of the mirror wasn't visiting the static
>> fields so some roots might be missed by the reverse pointers analysis.
>> There is heap iteration code in the SA and the InstanceMirrorKlass
>> wasn't plugged into the the oop sizing logic in the SA which caused
>> some searches to fail.  I needed to add access to oop_size so I moved
>> the java_lang_Class style utilities into their own class and made them
>> like normal SA style classes.  Tested with the full tmtools suite that
>> showed these issues plus some other which don't appear to have been
>> reported.

More information about the hotspot-dev mailing list