RFR: 8309979: BootstrapMethods attribute is missing in class files recreated by SA [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Thu Jun 22 03:24:06 UTC 2023


On Thu, 15 Jun 2023 20:24:39 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

>> Please review this PR that extends SA to write BootstrapMethods attribute when dumping the class files.
>> 
>> Tested it by dumping the class file for java/lang/String and comparing the BootstrapMethods attribute shown by javap for the original and the dumped class.
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comments by plummercj
>   
>   Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

Looks good in general.
Just a question: Do we have any automatic test coverage for this?
Thanks,
Serguei

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstantPool.java line 475:

> 473:     if (operands != null) {
> 474:       count = getOperandOffsetAt(operands, 0) / 2;
> 475:     }

Nit: Could you, please, add a small comment why the bootstrap methods count is calculated this way?

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

PR Review: https://git.openjdk.org/jdk/pull/14495#pullrequestreview-1492282704
PR Review Comment: https://git.openjdk.org/jdk/pull/14495#discussion_r1237945025


More information about the serviceability-dev mailing list