When EnableInvokeDynamic was removed, code in arguments.cpp unconditionally sets ScavengeRootsInCode to at least 1. So the real range for ScavengeRootsInCode is 1..2.
Should update the documentation and range in globals.hpp, but more importantly simplify the users of ScavengeRootsInCode to no longer support the zero case.
For example:
ciObject::can_be_constant() // can now unconditionally return true
nmethod::nmethod(......)
RebuildStrongCodeRootClosure::do_code_blob()
etc.
Can also probably remove the code in arguments.cpp that forced it from 0->1, because the range checking should prevent 0 in the first place.
Should update the documentation and range in globals.hpp, but more importantly simplify the users of ScavengeRootsInCode to no longer support the zero case.
For example:
ciObject::can_be_constant() // can now unconditionally return true
nmethod::nmethod(......)
RebuildStrongCodeRootClosure::do_code_blob()
etc.
Can also probably remove the code in arguments.cpp that forced it from 0->1, because the range checking should prevent 0 in the first place.
- relates to
-
JDK-8220411 Remove ScavengeRootsInCode=0 code
- Resolved