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

2023-07-12 Thread Ashutosh Mehra
On Tue, 11 Jul 2023 20:33:59 GMT, Chris Plummer wrote: >> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Some code motion and factoring out common code >> >> Signed-off-by: Ashutosh Mehra > > src/jdk.hotspot.agent/s

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

2023-07-12 Thread Thomas Stuefe
On Tue, 11 Jul 2023 19:13:01 GMT, Ashutosh Mehra 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@". > > I am not sure what all details `printall` is expected to emit out. Lo

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

2023-07-11 Thread Chris Plummer
On Tue, 11 Jul 2023 19:56:25 GMT, Ashutosh Mehra wrote: >> Please review this PR that enables ClassWriter to write annotations to the >> class file being dumped. >> >> The fields annotations are stored in `Annotations::_fields_annotations` >> which is of type `Array*>`. There is no class in SA

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

2023-07-11 Thread Chris Plummer
On Tue, 11 Jul 2023 19:34:29 GMT, Ashutosh Mehra wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Annotations.java >> line 74: >> >>> 72: public U1Array getFieldAnnotations(int fieldIndex) { >>> 73: Address addr = fieldsAnnotations.getValue(getAddress()); >>> 74: Arr

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

2023-07-11 Thread Ashutosh Mehra
On Tue, 11 Jul 2023 06:32:24 GMT, Thomas Stuefe wrote: >> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Some code motion and factoring out common code >> >> Signed-off-by: Ashutosh Mehra > > src/jdk.hotspot.agent/s

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

2023-07-11 Thread Ashutosh Mehra
> Please review this PR that enables ClassWriter to write annotations to the > class file being dumped. > > The fields annotations are stored in `Annotations::_fields_annotations` which > is of type `Array*>`. There is no class in SA that can represent > it. I have added ArrayOfU1Array to corre