RFR: 8218738: Remove dead code in Symbol and friends

Claes Redestad claes.redestad at oracle.com
Tue Feb 12 09:11:25 UTC 2019



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.

/Claes


More information about the hotspot-runtime-dev mailing list