RFR: 8000818: SA constant pool need to reference to reference map after permgen removal
Coleen Phillmore
coleen.phillimore at oracle.com
Thu Oct 18 04:56:51 PDT 2012
On 10/17/2012 9:26 PM, Coleen Phillimore wrote:
> On 10/17/2012 5:15 PM, Yumin Qi wrote:
>> Coleen,
>>
>> This is rewrite the byte code to its original form. SA read
>> core(or process) get the snap shot, which method code already rewrite
>> in hospot. This is the reverse process to dump java classes from SA.
>>
>> _ldc and _ldc_w are got from hotspot byte code, ie, _fast_aldc and
>> _fast_aldc_w. Now we need to fix the constantpool index for them. The
>> index now is in reference map, they before are in constant pool cache.
I didn't see the test hotspotcode != bytecode, which will account for
the case that not all Bytecodes::_ldc are rewritten.
This looks good to me now.
Coleen
>
> Yes, but your code is wrong. At lines 145 and 152 you are changing
> the index for Bytecodes::_ldc which are _not_ rewritten to point to
> reference array. If you see Bytecodes::_fast_aldc these bytecode
> indexes have been rewritten to point to the resolved references array.
>
>>
>> for _invoke_dynamic, the code is there, I don't know how to
>> verify if it works the way it should be.
>
> There were changes in the VM which this code doesn't have. See
> src/share/vm/interpreter/rewriter.cpp for the VM version, look for
> Bytecodes::_invokehandle.
>
> Coleen
>
>>
>> Thanks
>> Yumin
>>
>> On 10/17/2012 10:16 AM, Coleen Phillimore wrote:
>>>
>>> Yumin,
>>>
>>> I'm confused what this file is supposed to do. Why is this
>>> rewriting bytecodes? Or is it reversing bytecode rewriting?
>>>
>>> Before rewriting _ldc points to a constant pool index. After, only
>>> ldc bytecodes that point to string or jsr 292 oops will be rewritten
>>> to point to the resolved_references array and the bytecode is
>>> changed to _fast_aldc, otherwise the ldc index is left alone. So
>>> if it's reversing rewriting, then changing lines 145 and 152 to
>>> _fast_aldc would make whatever this does work.
>>>
>>> It looks like jsr 292 code is not reflected in this file. More
>>> copying for another day unless this whole SA is rearchitected.
>>>
>>> thanks,
>>> Coleen
>>>
>>> On 10/17/2012 12:51 AM, Yumin Qi wrote:
>>>> Hi, all
>>>>
>>>> May I have your codereview on
>>>>
>>>> http://cr.openjdk.java.net/~minqi/8000818/
>>>> <http://cr.openjdk.java.net/%7Eminqi/8000818/>
>>>>
>>>> 8000818: SA constant pool need to reference to reference map after
>>>> permgen removal
>>>> Summary: After permgen removal, constant pool changed to put _ldc
>>>> and _ldc_w (fast_ldc and fast_ldcw) index to reference map, no
>>>> longer calculated via constant pool cache.
>>>> Also, there is a mistake in 6879063: SA should use hsdis.
>>>> Bytes.swap should only check if the underlying platform is big
>>>> endian since java code follows big endian. Revert it back to its
>>>> orginal form, else it will fail ClassDump.
>>>>
>>>> Reviewed-by:
>>>> Contributed-by: yumin.qi at oracle.com
>>>>
>>>>
>>>> Thanks
>>>> Yumin
>
More information about the hotspot-runtime-dev
mailing list