On Mon, 14 Feb 2022 13:05:52 GMT, Alex Menkov <amen...@openjdk.org> wrote:
>> ClassLoaderDataGraph::classes_do description says: >> // Walking classes through the ClassLoaderDataGraph include array classes. >> So do_load_class callback should not dump arrays for the classes and dumper >> doesn't need to call Universe::basic_type_classes_do (array classes for >> primitive types are also reported by ClassLoaderDataGraph::classes_do) > > Alex Menkov has updated the pull request incrementally with one additional > commit since the last revision: > > reworked do_class_dump This looks like a nice cleanup! Thank you for the test and verification that the format is the same. A couple of minor comments. src/hotspot/share/services/heapDumper.cpp line 2003: > 2001: > 2002: // class ID > 2003: Klass* klass = k; I don't think it's necessary to introduce the variable 'klass' since it's not a loop anymore. src/hotspot/share/services/heapDumper.cpp line 2305: > 2303: ClassLoaderDataGraph::classes_do(&locked_dump_class); > 2304: } > 2305: Universe::basic_type_classes_do(&do_basic_type_array_class_dump); If this is the last use of this function, you could remove this variant of this function from Universe. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7384