RFR: 8210986: Add OopStorage cleanup to ServiceThread

Kim Barrett kim.barrett at oracle.com
Wed Oct 31 21:23:42 UTC 2018


> On Oct 31, 2018, at 3:42 PM, coleen.phillimore at oracle.com wrote:
> 
> 
> 
> On 10/26/18 4:32 PM, Kim Barrett wrote:
>>> On Oct 26, 2018, at 4:29 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>> 
>>>> On Oct 25, 2018, at 7:00 PM, coleen.phillimore at oracle.com wrote:
>>>> On 10/25/18 6:26 PM, Kim Barrett wrote:
>>>>>> On Oct 25, 2018, at 6:01 PM, coleen.phillimore at oracle.com wrote:
>>>>>> 425 Block* block = block_for_allocation();
>>>>>> 426 if (block == NULL) return NULL; // Block allocation failed.
>>>>>> 
>>>>>> This could be "get_block_for_allocation" because it's not blocking (afaict).  Name is somewhat ambiguous.
>>>>> Hotspot style guide says getters are noun phrases, with no “get_" noise word.
>>>> The style guide says that we avoid of noise word get for cases like this:
>>>> 
>>>> Block* block() const { return _block; }
>>>> void set_block(Block* b) { _block = b; }
>>>> 
>>>> If the function is doing anything else, you can say get.  Also because 'block' is a verb, it makes it confusing.
>>> Sorry, but I don't agree.
>>> 
>>> That's a very narrow interpretation of "getter", and suggests the
>>> naming convention depends on the underlying implementation.  But a
>>> primary purpose of providing a function-based API is information
>>> hiding; the implementation can be changed without affecting clients.
>>> Tying the name to the implementation as suggested is contrary to that
>>> purpose.  So I think that interpretation is incorrect.
>> Or if that *is* the “original intent” of tat coding guideline, then I think the
>> guideline is wrong.
>> 
> Ok, that's fine.  Leave out the "get_".
> Reviewed.
> Coleen

Thanks.



More information about the hotspot-dev mailing list