RFR: 8311102: Write annotations in the classfile dumped by SA [v4]

Ashutosh Mehra duke at openjdk.org
Thu Jul 13 13:18:58 UTC 2023


On Wed, 12 Jul 2023 15:17:10 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>>> What would be needed to make the Annotations appear in the "printall" command? I was somehow expecting to see at least something like "Annotation at xxxx".
>> 
>> I am not sure what all details `printall` is expected to emit out. Looking at the code, printall doesn't seem to use ClassWriter. It uses HTMLGenerator to format the method data. I can emit something like "Annotation at xxxx" but it would be more useful if it can display the contents of the annotations. Unfortunately HTMLGenerator doesn't understand Annotations at all. Probably it is better left for another task.
>
>> > What would be needed to make the Annotations appear in the "printall" command? I was somehow expecting to see at least something like "Annotation at xxxx".
>> 
>> I am not sure what all details `printall` is expected to emit out. Looking at the code, printall doesn't seem to use ClassWriter. It uses HTMLGenerator to format the method data. I can emit something like "Annotation at xxxx" but it would be more useful if it can display the contents of the annotations. Unfortunately HTMLGenerator doesn't understand Annotations at all. Probably it is better left for another task.
> 
> No problem at all. I only thought about this because it would have making a regression test very easy (there is a jtreg test that calls printall and then parses the output).

@tstuefe can I get your approval as well if there are no other concerns to address.

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

PR Comment: https://git.openjdk.org/jdk/pull/14735#issuecomment-1634227457


More information about the serviceability-dev mailing list