Unused code in prims/methodComparator
Daniel D. Daugherty
daniel.daugherty at oracle.com
Fri Feb 5 14:26:48 UTC 2016
MethodComparator::methods_switchable() appears to be a day zero
function added by Misha Dmitriev back on 2000.10.23.
$ sgv src/share/vm/prims/methodComparator.cpp | grep
1.1 bool MethodComparator::methods_switchable(methodOop old_method,
No id keywords (cm7)
$ sp -r1.1 src/share/vm/prims/methodComparator.cpp
D 1.1 00/10/23 18:11:25 dmitriev 1 0 00366/00000/00000
Class redefinition support - comparing methods of
On 2/4/16 8:30 PM, serguei.spitsyn at oracle.com wrote:
> Hi Thomas,
> The function MethodComparator::methods_switchable() was not used even
> in the jdk 7.
> 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()
> 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.
> 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".
>>> Regards, Thomas
More information about the hotspot-runtime-dev