RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class
David Holmes
dholmes at openjdk.org
Wed Aug 2 05:11:02 UTC 2023
On Tue, 1 Aug 2023 20:53:45 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:
>> @ashu-mehra That was one case. I also want to know that you have tested deeply nested classes; and hidden classes (if applicable). Thanks.
>
> @dholmes-ora I verified the case for hidden dynamically injected classes. The dumped class data for a hidden dynamically injected class does not have any Nest-Host attribute. When generating these classes dynamically the VM does not expose nest-host information in the class data, but sets the nest-host directly in the InstanceKlass.
>
> Also verified the case for deeply nested classes by creating chain of nested classes as:
>
> class DeepNest {
> class NestLvl1 {
> class NestLvl2 {
> class NestLvl3 {
> }
> }
> }
> }
>
>
> Only `DeepNest` has the `NestMembers` attribute which lists all the NestLvl[1-3] classes. Rest all have `DeepNest` as the `NestHost` attribute.
>
> Does this cover all the cases you flagged?
@ashu-mehra thanks for doing the additional testing. Pity there is no regression/functional test for this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15005#issuecomment-1661502815
More information about the hotspot-dev
mailing list