RFR: 8281267: VM HeapDumper dumps array classes several times [v3]

Alex Menkov amenkov at openjdk.java.net
Mon Feb 14 13:11:10 UTC 2022


On Mon, 14 Feb 2022 09:18:34 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> Sorry about the delay. I didn't see your response when it came in.
>> 
>> It seems like this comment belongs with do_class_dump(). Putting it here is kind of confusing. Also, what is meant by "bottom class"? Do you mean the element type of the array?
>
> This comment explains why we call ClassLoaderDataGraph::classes_do(do_class_dump) and then Universe::basic_type_classes_do(&do_basic_type_array_class_dump).
> 
> Bottom klass is 1-dimensional type.
> For example for [[LObject; element type is [lObject;, and bottom klass is LObject;
> Looked at the code and see that ObjArrayKlass actually contains link to it - see ObjArrayKlass::bottom_klass(), so I can update do_class_dump to use it.

I updated the fix, fixed do_class_dump and removed this comment.
This also removes code duplication in dump_class_and_array_classes and dump_basic_type_array_class

-------------

PR: https://git.openjdk.java.net/jdk/pull/7384


More information about the hotspot-runtime-dev mailing list