RFR 8026985: Rewrite SystemDictionary::classes_do and Dictionary::classes_do to use KlassClosure
david.holmes at oracle.com
Fri Mar 10 05:18:37 UTC 2017
On 9/03/2017 2:24 AM, coleen.phillimore at oracle.com wrote:
> Summary: Clean up and examine uses of classes_do for the SystemDictionary
> See bug comments for more details. I wanted to clean this up while
> examining the idea of having system dictionary information added per
> ClassLoaderData, rather than a global table.
> open webrev at http://cr.openjdk.java.net/~coleenp/8026985.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8026985
The bulk of the deletion looks good! :)
I guess my main query is how ClassLoaderDataGraph::classes_do /
loaded_classes_do relate to SystemDictionary::classes_do? I would
presume SD::classes_do can only act on loaded classes - by definition.
So then it is unclear how you can replace it with either of the CLDG
It also seems a little odd to switch from SD to CLDG for classes_do, but
go the other way, from CLDG to SD for methods_do ? I would expect/hope
to have a single "entry point" for this kind of iteration.
> Tested with java.lang.instrument, sun.com.jdi, tonga colocated (closed)
> tests, and JPRT, because of difference in which classes_do is called for
> heap dumping.
> Note, will update copyrights on commit.
More information about the hotspot-runtime-dev