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

Tom Rodriguez tom.rodriguez at oracle.com
Wed Mar 30 07:48:44 PDT 2011


On Mar 30, 2011, at 7:38 AM, Daniel D. Daugherty wrote:

> Added serviceability-dev at ... since this affects SA code...
> 
> 
> On 3/29/2011 11:58 AM, Tom Rodriguez wrote:
>> http://cr.openjdk.java.net/~never/7031614
>>  
> 
> Please update copyright years as needed.

I did.

> 
> I could be wrong here but some of what you've uncovered here
> appears to be applicable to older SA (pre-static field move).
> In particular the oop sizing stuff and static field visitation
> during mirror processing.

It's not applicable to older ones.  It used to get processed through the instance klass but when I moved them to Class they weren't being visited since I hadn't updated the SA.

> 
> Did you also get a chance to run the nsk.sajdi subsuite?

Yes.  It was clean as well.  None of these paths appear to be exercised by sajdi or I would have found it earlier.

> 
> Thumbs up.

Thanks!

tom

> 
> Dan
> 
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/Instance.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
>   line 478 - delete blank line?
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/InstanceMirrorKlass.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/jdi/ClassObjectReferenceImpl.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/tools/FinalizerInfo.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/utilities/HeapGXLWriter.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
>   No comments.
> 
> agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFactoryImpl.java
>   No comments.
> 
> src/share/vm/oops/instanceMirrorKlass.hpp
>   No comments.
> 
> src/share/vm/runtime/vmStructs.cpp
>   No comments.
> 
> 
>> 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 serviceability-dev mailing list