RFR(XS): 8050228: Rename 'rem_size' in compactibleFreeListSpace.cpp because of name clashes on AIX" -f 8050228_rename_rem_size.patch

Jon Masamitsu jon.masamitsu at oracle.com
Wed Jul 16 20:45:02 UTC 2014


On 7/15/2014 8:02 PM, Vitaly Davidovich wrote:
> How about rem_sz? :)

Yes, rem_sz, please.  There are example of such abbreviations
in the file.  I'll sponsor and push.

Sending an hg patch with summary and reviewed-by
info that I can import would be the easiest I think.

Jon


>
> Sent from my phone
> On Jul 15, 2014 10:14 PM, "David Holmes" <david.holmes at oracle.com> wrote:
>
>> On 16/07/2014 2:54 AM, Volker Simonis wrote:
>>
>>> Hi,
>>>
>>> could somebody please review and sponsor this little change:
>>>
>> GC code should be taken by GC folk. (aka buck passing :) )
>>
>> FWIW change looks fine to me. The name remain_size grates a little but
>> spelling out remaining_size grates even more. I don't have a better
>> suggestion but perhaps GC folk will.
>>
>> Cheers,
>> David
>>
>>   http://cr.openjdk.java.net/~simonis/webrevs/8050228/
>>> https://bugs.openjdk.java.net/browse/JDK-8050228
>>>
>>> Background:
>>>
>>> I know this sounds crazy but it's true: there's an AIX header which
>>> unconditionally defines rem_size:
>>>
>>> /usr/include/sys/xmem.h
>>> struct xmem {
>>> ...
>>> #define rem_size u2._subspace_id2
>>> };
>>>
>>> This breaks the compilation of
>>> CompactibleFreeListSpace::splitChunkAndReturnRemainder() which uses a
>>> local variable of the same name.
>>>
>>> Until now, we've worked around this problem by simply undefining
>>> 'rem_size' in the platform specific file os_aix.inline.hpp but after
>>> "8042195: Introduce umbrella header orderAccess.inline.hpp" this
>>> doesn't seems to be enough any more.
>>>
>>> So before introducing yet another ugly platform dependent hack in
>>> shared code or depending on a certain include order of otherwise
>>> unrelated platform headers in shared code I suggest so simply give up
>>> and rename the local variable.
>>>
>>> In this change I've renamed 'rem_size' to 'remain_size' because "rem"
>>> is used as abbreviation of "remainder" in the code. But actually I'd
>>> be happy with any other name which differs from "rem_size".
>>>
>>> Thank you and best regards,
>>> Volker
>>>
>>>



More information about the hotspot-dev mailing list