Please review fix for 7195867: NPG: SAJDI tests fail with sun.jvm.hotspot.types.WrongTypeException: No,suitable match for type

Coleen Phillimore coleen.phillimore at oracle.com
Wed Sep 5 18:42:37 PDT 2012


Thank you for your code review, and for checking out the new version.
Coleen

On 9/5/2012 9:23 PM, Karen Kinnear wrote:
> Coleen,
>
> Much nicer. Wish I'd thought of those improvements.
>
> thanks,
> Karen
>
> On Sep 5, 2012, at 7:27 PM, Coleen Phillimore wrote:
>
>> How about this version - hit reload.   I think it makes it more obvious.
>> thanks,
>> Coleen
>>
>> On 9/5/2012 5:37 PM, John Coomes wrote:
>>> Coleen Phillimore (coleen.phillimore at oracle.com) wrote:
>>>> Summary: Need to restore the vtable in metadata when we restore the type
>>>> from the shared archive.
>>>>
>>>> When dumping the shared archive all the C++ vtables are patched to be a
>>>> piece of code that inserts the actual vtable in the type, and calls
>>>> through the actual vtable to where the function was restored.   SA uses
>>>> the address of the vtable to determine which metadata type it is looking
>>>> at.  By calling one virtual function during restore, we can restore the
>>>> c++ vtable to the actual one so SA can match it.
>>>>
>>>> http://cr.openjdk.java.net/~coleenp/7195867/
>>> This code is executed solely to trigger a non-obvious side effect; i'd
>>> like to see that made much more explicit (preferably in the code, but
>>> at least in a comment).  Otherwise, I'm sure someone will be tempted
>>> to remove the "useless" guarantee someday.
>>>
>>> In the code you can add a simple method (e.g., restore_vtable() or
>>> similar) that wraps the virtual call.
>>>
>>> Aside from that, looks good.
>>>
>>> -John
>>>
>>>> (systemDictionary is a whitespace change).
>>>>
>>>> Tested sajdi tests.
>>>> Thanks,
>>>> Coleen


More information about the hotspot-dev mailing list