RFR: 8218738: Remove dead code in Symbol and friends

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Feb 12 14:26:24 UTC 2019



On 2/12/19 4:11 AM, Claes Redestad wrote:
>
>
> On 2019-02-11 23:43, David Holmes wrote:
>> On 12/02/2019 12:58 am, Claes Redestad wrote:
>>> Hi,
>>>
>>> JDK-8218675 is removing the last use of 
>>> Symbol::as_utf8_flexible_buffer.
>>> This patch removes it, along with a few other methods, declarations etc
>>> in the area which are also no longer in use.
>>
>> I'm again having reservations about removing utility functions like 
>> from_quoted_ascii. I would have expected from_quoted_ascii to be used 
>> in-part to test as_quoted_ascii.
>
> Noted - if written today, then I think this from_quoted_ascii method
> should have been made part of a test library and used in a gtest to
> verify the output of to_quoted_ascii.
>
> While I think keeping unused utility functions around is misguided in
> several ways, I would have been more sympathetic if removing it was size
> neutral w.r.t. the static binary size. However, these unused utility
> methods take up a few Kbs a piece, so in accumulation the cleanups I've
> insisted on recently is adding up to measurable footprint gains. The
> alternative to removing in my mind then becomes wrapping unused code in
> #ifndef PRODUCT.

This is a good idea, with a short comment that it might be useful for 
testing.  I'd hate to have to rewrite or resurrect from_quoted_ascii.  
Maybe we can move it to a gtest in the future.

thanks,
Coleen

>
> /Claes



More information about the hotspot-runtime-dev mailing list