RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class
Chris Plummer
cjplummer at openjdk.org
Thu Aug 3 16:02:32 UTC 2023
On Wed, 2 Aug 2023 05:07:31 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> @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.
> @dholmes-ora @plummercj I have improved [dumpclass tests](https://github.com/openjdk/jdk/commit/97618cc9bbadce4b51fc0fbee93557f4dcc8d26a) to cover up some cases for this PR and [JDK-8311971](https://bugs.openjdk.org/browse/JDK-8311971). If the tests makes sense I would like to include it in this PR. Is that okay?
I think given the scope of the changes it would be better to do this with a "Improve SA dumpclass testing" CR/PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15005#issuecomment-1664244491
More information about the hotspot-dev
mailing list