Unused code in prims/methodComparator

David Holmes david.holmes at oracle.com
Fri Feb 5 08:05:55 UTC 2016


On 5/02/2016 1:30 PM, serguei.spitsyn at oracle.com wrote:
> Hi Thomas,
>
> The function MethodComparator::methods_switchable() was not used even in
> the jdk 7.

I couldn't find it used in 5 or 6 either! :)

David

> I do not know the history of this function and why its usage was dropped.
> Most likely, it was used initially as a part of the methods_EMCP()
> algorithm.
> The SCCS history of the old changes was dropped when the repo was moved
> under the Mercurial control.
>
> It seems safe to just remove it.
> We always can restore it from the hg history if necessary.
>
> Thanks,
> Serguei
>
>
> On 2/4/16 18:05, David Holmes wrote:
>> HI Thomas,
>>
>> Ultimately this is part of JVMTI so adding the serviceability folk.
>>
>> On 20/01/2016 6:31 PM, Thomas Stüfe wrote:
>>> Hi all,
>>>
>>> when investigating a warning about unchecked realloc() usage in
>>> methodComparator.hpp, I found that the offending function
>>> (BciMap::store_fragment_location) is not callable anymore.
>>>
>>> BciMap::store_fragment_location is called
>>> by MethodComparator::methods_switchable, which is not called anywhere.
>>>
>>> Is there any reason we should keep this?
>>
>> Certainly seems to be dead code. Unclear when/why redefinition dropped
>> the notion of "switchable".
>>
>> Thanks,
>> David
>>
>>> Regards, Thomas
>>>
>


More information about the hotspot-runtime-dev mailing list