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

2023-07-13 Thread Ashutosh Mehra
On Wed, 12 Jul 2023 23:21:12 GMT, Chris Plummer wrote: >> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More review comments >> >> Signed-off-by: Ashutosh Mehra > > Marked as reviewed by cjplummer (Reviewer). @plu

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

2023-07-13 Thread Thomas Stuefe
On Wed, 12 Jul 2023 18:48:42 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 [v4]

2023-07-13 Thread Ashutosh Mehra
On Wed, 12 Jul 2023 15:17:10 GMT, Thomas Stuefe 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. L

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

2023-07-12 Thread Chris Plummer
On Wed, 12 Jul 2023 18:48:42 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-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 [v4]

2023-07-12 Thread Ashutosh Mehra
On Tue, 11 Jul 2023 20:28:29 GMT, Chris Plummer wrote: >> I think VMObjectFactory is a better place to implement the caching behavior >> so that all such patterns can benefit from it. I think it is better >> addressed in another task. > > I think maybe you misunderstood what I meant by "cache".

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

2023-07-12 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

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

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

2023-07-11 Thread Ashutosh Mehra
On Tue, 11 Jul 2023 06:39:09 GMT, Thomas Stuefe wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstMethod.java >> line 470: >> >>> 468: if (hasParameterAnnotations()) { >>> 469: offset += 1; >>> 470: } >> >> Code here and in other places could be tighte

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

2023-07-11 Thread Ashutosh Mehra
On Fri, 30 Jun 2023 17:59:15 GMT, Chris Plummer wrote: >> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments >> >> Signed-off-by: Ashutosh Mehra > > src/hotspot/share/runtime/vmStructs.cpp line 972: > >

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

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

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

2023-07-11 Thread Ashutosh Mehra
On Tue, 11 Jul 2023 07:41:01 GMT, Thomas Stuefe 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. Looking at t

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

2023-07-11 Thread Thomas Stuefe
On Fri, 30 Jun 2023 14:32:03 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 that

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

2023-07-11 Thread Thomas Stuefe
On Tue, 11 Jul 2023 06:31:24 GMT, Thomas Stuefe 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

2023-07-10 Thread Chris Plummer
On Fri, 30 Jun 2023 14:32:03 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 that

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

2023-07-10 Thread Ashutosh Mehra
On Fri, 30 Jun 2023 14:32:03 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 that

RFR: 8311102: Write annotations in the classfile dumped by SA

2023-06-30 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 correspond to the