RFR (S) 8009575 (2nd) - Reduce Symbol::_refcount from 4 bytes to 2 bytes
yumin.qi at oracle.com
Fri Jun 21 12:14:14 PDT 2013
As Dan indicates, Symbol now is derivative from SymbolBase, so it
should be reflected in SA code --- more changes needed.
The name split is for calculation of size? The only difference is
now it is in Symbol, not in SymbolBase.
size = sizeof(Symbol) include sizeof(jbyte) which should be
excluded if the symbol length > sizeof(jbyte).
So the should calculation if no change to Symbol inheritance be:
size_t sz = heap_word_size(sizeof(Symbol) + (length > sizeof(jbyte) ? length - sizeof(jbyte) : 0));
On 6/21/2013 10:15 AM, Ioi Lam wrote:
> Could anyone review this? Coleen has already reviewed it off-list, so
> I just need one more reviewer.
> - Ioi
> On 06/20/2013 11:20 AM, Ioi Lam wrote:
>> Please review my 2nd trial for this bug fix. It's much simplified thanks
>> to Coleen's suggestion.
>> Bug: Reduce Symbol::_refcount from 4 bytes to 2 bytes
>> Summary of fix:
>> As noted in the bug report, the main problem is _refcount needs
>> to be
>> atomically incremented, but the smallest unit that Atomic::incr()
>> supported until now was 32-bit int.
>> With Coleen's help, I have created a platform-independent version
>> of Atomic::incr(short*) that's based on Atomic::add(int*, n).
>> Essentially, Atomic::incr(short*) can be implemented as
>> Atomic::add(int*, 0x10000), as long as the short occupies the most
>> significant 16 bits of the int. I added the macro ATOMIC_
>> to ensure the proper alignment.
>> Also Symbol::size(int) is fixed to calculate the correct space
>> for a Symbol. (Same as in the previos webrev --
>> - vm.tmtools.testlist nsk.sajdi.testlist vm.runtime.testlist
>> vm.quick.testlist vm.parallel_class_loading.testlist
>> - Serviceability Agent tested are included in these lists.
>> - Ioi
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-runtime-dev