RFR: 8217921: Runtime dead code removal

David Holmes david.holmes at oracle.com
Tue Jan 29 10:00:16 UTC 2019


On 29/01/2019 7:50 pm, Claes Redestad wrote:
> 
> 
> On 2019-01-29 10:30, David Holmes wrote:
>>>
>>> Webrev: http://cr.openjdk.java.net/~redestad/8217921/open.00/
>>
>> This mostly seems okay but I have some reservations about trimming 
>> APIs just because we don't currently use them. For example the changes in
>>
>> src/hotspot/share/memory/binaryTreeDictionary.inline.hpp
>>
>> I expect to see a complete data structures defined with all the 
>> reasonable operations. The fact we don't actually use some of them 
>> doesn't mean to me that we should cull them out of the API.
> 
> I disagree: It's easy to add functionality back if/when we need it, and
> unused/untested code should be considered broken until proven otherwise.

I disagree about the ease of adding back. Someone trying to add 
functionality to an existing data structure is more likely to get it 
wrong than the person who wrote the thing initially - especially years 
later. These are basically library classes that have been written. And 
the person adding back will have no idea that we removed it earlier.

Is there a risk that the unused function has bit-rotted? Unfortunately 
yes, if we have been very lax in how we update these data structures. 
But if this hasn't been modified then it's as good now as it was when 
written.

But as I said these are just reservations, not hard obstacles.

David


> /Claes


More information about the hotspot-runtime-dev mailing list