Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-11-14 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 23:40:58 GMT, Chris Plummer wrote: >> Please review this change to fix the operands of the bytecodes that operate >> on fields when dumping a class using SA. >> >> Testing: hotspot_serviceability >> >> I have also verified that >>

Integrated: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-11-14 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 21:23:25 GMT, Ashutosh Mehra wrote: > Please review this change to fix the operands of the bytecodes that operate > on fields when dumping a class using SA. > > Testing: hotspot_serviceability > > I have also verified that > `test/hotspot/jt

Re: RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 22:32:29 GMT, Chris Plummer wrote: >> Please review this change to fix the operands of the bytecodes that operate >> on fields when dumping a class using SA. >> >> Testing: hotspot_serviceability >> >> I have also verified that >>

RFR: 8316342: CLHSDB "dumpclass" command produces invalid classes

2023-09-28 Thread Ashutosh Mehra
Please review this change to fix the operands of the bytecodes that operate on fields when dumping a class using SA. Testing: hotspot_serviceability I have also verified that `test/hotspot/jtreg/serviceability/sa/ClhsdbDumpclass.javaClhsdbDumpclass.java`, which is in the problem list because

Integrated: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 20:45:00 GMT, Ashutosh Mehra wrote: > Please review trivial fix to display class name in the output of "where" > command of SA. > > Testing: hotspot_serviceability This pull request has now been integrated. Changeset: 065203d4 Author:Ashutosh Me

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 01:57:59 GMT, David Holmes wrote: >> Please review trivial fix to display class name in the output of "where" >> command of SA. >> >> Testing: hotspot_serviceability > > Has the change been tested in the HSDB GUI as requested in the JBS issue? @dholmes-ora thanks for

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-28 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 20:45:00 GMT, Ashutosh Mehra wrote: > Please review trivial fix to display class name in the output of "where" > command of SA. > > Testing: hotspot_serviceability I believe my github user name has been linked to the OpenJDK user name. So I am

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-27 Thread Ashutosh Mehra
On Thu, 28 Sep 2023 01:57:59 GMT, David Holmes wrote: >> Please review trivial fix to display class name in the output of "where" >> command of SA. >> >> Testing: hotspot_serviceability > > Has the change been tested in the HSDB GUI as requested in the JBS issue? @dholmes-ora thanks for

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-27 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 21:07:18 GMT, Chris Plummer wrote: >> Please review trivial fix to display class name in the output of "where" >> command of SA. >> >> Testing: hotspot_serviceability > > Can you add to the CR a copy of the `where` output after this fix? Just a > short snippet equivalent

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-27 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 21:07:18 GMT, Chris Plummer wrote: >> Please review trivial fix to display class name in the output of "where" >> command of SA. >> >> Testing: hotspot_serviceability > > Can you add to the CR a copy of the `where` output after this fix? Just a > short snippet equivalent

Re: RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-27 Thread Ashutosh Mehra
On Wed, 27 Sep 2023 20:45:00 GMT, Ashutosh Mehra wrote: > Please review trivial fix to display class name in the output of "where" > command of SA. > > Testing: hotspot_serviceability Updated CR with the output of `where` command after the fix. --

RFR: 8313631: SA: stack trace printed using "where" command does not show class name

2023-09-27 Thread Ashutosh Mehra
Please review trivial fix to display class name in the output of "where" command of SA. Testing: hotspot_serviceability - Commit messages: - 8313631: SA: stack trace printed using "where" command does not show class name Changes: https://git.openjdk.org/jdk/pull/15952/files

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-04 Thread Ashutosh Mehra
On Mon, 24 Jul 2023 22:12:28 GMT, Ashutosh Mehra wrote: > This patch adds NestHost and NestMembers attributes to the class dumped by SA. > > Testing: `test/hotspot/jtreg/serviceability/sa` and `test/jdk/sun/tools/jhsdb` > Manual testing by dumping `j.l.String` and &

Integrated: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-04 Thread Ashutosh Mehra
On Mon, 24 Jul 2023 22:12:28 GMT, Ashutosh Mehra wrote: > This patch adds NestHost and NestMembers attributes to the class dumped by SA. > > Testing: `test/hotspot/jtreg/serviceability/sa` and `test/jdk/sun/tools/jhsdb` > Manual testing by dumping `j.l.String` and &

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-04 Thread Ashutosh Mehra
On Thu, 3 Aug 2023 15:59:14 GMT, Chris Plummer wrote: >> @ashu-mehra thanks for doing the additional testing. Pity there is no >> regression/functional test for this. > >> @dholmes-ora @plummercj I have improved [dumpclass >>

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-03 Thread Ashutosh Mehra
On Thu, 3 Aug 2023 15:59:14 GMT, Chris Plummer wrote: >> @ashu-mehra thanks for doing the additional testing. Pity there is no >> regression/functional test for this. > >> @dholmes-ora @plummercj I have improved [dumpclass >>

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-03 Thread Ashutosh Mehra
On Wed, 2 Aug 2023 05:07:31 GMT, David Holmes wrote: > 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

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-08-01 Thread Ashutosh Mehra
On Tue, 1 Aug 2023 08:33:24 GMT, David Holmes wrote: >> @dholmes-ora I confirmed there is no nest-host or nest-members attributes >> generated by this patch for a top level class which doesn't have any >> nest-members. Is that what you wanted to verify? > > @ashu-mehra That was one case. I

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-07-31 Thread Ashutosh Mehra
On Thu, 27 Jul 2023 22:39:03 GMT, David Holmes wrote: >> @dholmes-ora sorry for responding late. I got sidetracked by some other work. >> >>> We need to be sure this works as expected for top-level classes that have >>> no nest members, and deeply nested nest members, plus dynamically injected

Re: RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-07-27 Thread Ashutosh Mehra
On Tue, 25 Jul 2023 05:36:15 GMT, David Holmes wrote: >> This patch adds NestHost and NestMembers attributes to the class dumped by >> SA. >> >> Testing: `test/hotspot/jtreg/serviceability/sa` and >> `test/jdk/sun/tools/jhsdb` >> Manual testing by dumping `j.l.String` and >>

RFR: 8312623: SA add NestHost and NestMembers attributes when dumping class

2023-07-24 Thread Ashutosh Mehra
This patch adds NestHost and NestMembers attributes to the class dumped by SA. Testing: `test/hotspot/jtreg/serviceability/sa` and `test/jdk/sun/tools/jhsdb` Manual testing by dumping `j.l.String` and `j.l.String$CaseInsensitiveComparator` classes. `j.l.String` shows one entry in `NestMembers`

Integrated: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-19 Thread Ashutosh Mehra
On Wed, 12 Jul 2023 19:48:52 GMT, Ashutosh Mehra wrote: > Please review this fix to correctly read a long value in the runtime constant > pool. Details are mentioned in the issue [0]. > As an example, before this fix the long value generated by SA's

Re: RFR: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-18 Thread Ashutosh Mehra
On Mon, 17 Jul 2023 22:59:30 GMT, David Holmes wrote: > Approved, but please file that follow up issue. Follow up issue for removing the dead code - https://bugs.openjdk.org/browse/JDK-8312232 - PR Comment: https://git.openjdk.org/jdk/pull/14855#issuecomment-1640234531

Re: RFR: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-17 Thread Ashutosh Mehra
On Mon, 17 Jul 2023 02:37:38 GMT, David Holmes wrote: > I think we need a follow-up RFE to get rid of buildLongFromIntsPD and any > other dead code. okay. @dholmes-ora can you please approve it if there are no other concerns. - PR Comment:

Re: RFR: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-14 Thread Ashutosh Mehra
On Fri, 14 Jul 2023 03:08:50 GMT, David Holmes wrote: > First, what is it about constructing the long from two ints that is incorrect? The incorrect part is fetching the ints from index and index+1. This doesn't work for 64-bit platforms because the single entry in runtime constant pool is

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

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

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 > >

Re: RFR: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-13 Thread Ashutosh Mehra
On Wed, 12 Jul 2023 19:48:52 GMT, Ashutosh Mehra wrote: > Please review this fix to correctly read a long value in the runtime constant > pool. Details are mentioned in the issue [0]. > As an example, before this fix the long value generated by SA's

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.

RFR: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool

2023-07-12 Thread Ashutosh Mehra
Please review this fix to correctly read a long value in the runtime constant pool. Details are mentioned in the issue [0]. Before this fix the long value generated by SA's dumpclass for java.lang.String.serialVersionUID was: private static final long serialVersionUID; descriptor: J

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: Ashut

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

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

2023-07-12 Thread Ashutosh Mehra
viceability/sa` and `test/jdk/sun/tools/jhsdb` > Tested it manually by dumping j.l.String class and comparing the annotations > with the original class using javap. > The test case mentioned in > [JDK-8311101](https://bugs.openjdk.org/browse/JDK-8311101) would provide > better

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: Ashut

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

2023-07-11 Thread Ashutosh Mehra
viceability/sa` and `test/jdk/sun/tools/jhsdb` > Tested it manually by dumping j.l.String class and comparing the annotations > with the original class using javap. > The test case mentioned in > [JDK-8311101](https://bugs.openjdk.org/browse/JDK-8311101) would provide > better

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

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/ho

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

2023-07-11 Thread Ashutosh Mehra
viceability/sa` and `test/jdk/sun/tools/jhsdb` > Tested it manually by dumping j.l.String class and comparing the annotations > with the original class using javap. > The test case mentioned in > [JDK-8311101](https://bugs.openjdk.org/browse/JDK-8311101) would provide > better

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

Re: RFR: JDK-8293114: JVM should trim the native heap [v8]

2023-07-10 Thread Ashutosh Mehra
On Mon, 10 Jul 2023 13:53:36 GMT, Thomas Stuefe wrote: >> This is a continuation of https://github.com/openjdk/jdk/pull/10085. I >> closed https://github.com/openjdk/jdk/pull/10085 because it had accumulated >> too much comment history and got confusing. For a history of this issue, see >>

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

Re: RFR: JDK-8293114: JVM should trim the native heap [v4]

2023-07-07 Thread Ashutosh Mehra
On Fri, 7 Jul 2023 13:38:34 GMT, Thomas Stuefe wrote: > (just noticed the patch adds +666 lines, bad sign, I should add another line > somewhere). It also deletes 2 lines so that makes it 664  - PR Comment: https://git.openjdk.org/jdk/pull/14781#issuecomment-1625515410

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

Integrated: 8309979: BootstrapMethods attribute is missing in class files recreated by SA

2023-06-29 Thread Ashutosh Mehra
On Thu, 15 Jun 2023 15:06:54 GMT, Ashutosh Mehra 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

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

2023-06-29 Thread Ashutosh Mehra
On Thu, 29 Jun 2023 14:16:16 GMT, Kevin Walls wrote: >> Ashutosh Mehra has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add comment about the layout of operands array in constant pool >> >> Sign

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

2023-06-29 Thread Ashutosh Mehra
On Fri, 16 Jun 2023 18:10:58 GMT, Chris Plummer wrote: >> 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 M

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

2023-06-27 Thread Ashutosh Mehra
On Fri, 16 Jun 2023 18:10:58 GMT, Chris Plummer wrote: >> 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 M

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

2023-06-27 Thread Ashutosh Mehra
On Thu, 22 Jun 2023 16:10:13 GMT, Ashutosh Mehra wrote: > I am thinking of a comprehensive test that creates a classfile with specific > attribute, load it in the VM, dump that class file using SA, then disassemble > the generated class file to check for the presence of the attribute.

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

2023-06-22 Thread Ashutosh Mehra
On Thu, 22 Jun 2023 03:21:33 GMT, Serguei Spitsyn wrote: > Do we have any automatic test coverage for this? Nope, I don't think there is any test for BootstrapMethods. As mentioned [here](https://github.com/openjdk/jdk/pull/14556#issuecomment-1601946451) the existing tests -

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

2023-06-22 Thread Ashutosh Mehra
> 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.

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

2023-06-21 Thread Ashutosh Mehra
On Wed, 21 Jun 2023 12:47:10 GMT, Kevin Walls wrote: >> 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 Me

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files

2023-06-20 Thread Ashutosh Mehra
On Tue, 20 Jun 2023 11:31:40 GMT, Daohan Qu wrote: > This patch adds `StackMapTable` for the class files generated by `clhsdb`'s > `buildreplayjars` command. This bug manifests itself during my diagnosing > [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be > fixed

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

2023-06-19 Thread Ashutosh Mehra
On Fri, 16 Jun 2023 18:10:58 GMT, Chris Plummer wrote: >> 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 M

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

2023-06-16 Thread Ashutosh Mehra
On Thu, 15 Jun 2023 20:24:39 GMT, Ashutosh Mehra 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 >> BootstrapMe

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

2023-06-16 Thread Ashutosh Mehra
On Thu, 15 Jun 2023 23:20:56 GMT, Chris Plummer wrote: >> 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

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

2023-06-15 Thread Ashutosh Mehra
On Thu, 15 Jun 2023 20:55:12 GMT, Chris Plummer wrote: > Can you tell me what testing you've done? Would be best to call that out in > the PR description. Edited the description to add a comment about the testing. Hope this helps. - PR Comment:

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

2023-06-15 Thread Ashutosh Mehra
On Thu, 15 Jun 2023 18:15:41 GMT, Chris Plummer wrote: >> 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 Me

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

2023-06-15 Thread Ashutosh Mehra
> Please review this PR that extends SA to write BootstrapMethods attribute > when dumping the class files. 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

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

2023-06-15 Thread Ashutosh Mehra
Please review this PR that extends SA to write BootstrapMethods attribute when dumping the class files. - Commit messages: - 8309979: BootstrapMethods attribute is missing in class files recreated by SA Changes: https://git.openjdk.org/jdk/pull/14495/files Webrev:

Re: RFR: 8298048: Combine CDS archive heap into a single block

2023-04-11 Thread Ashutosh Mehra
On Mon, 3 Apr 2023 03:32:27 GMT, Ioi Lam wrote: > This PR combines the "open" and "closed" regions of the CDS archive heap into > a single region. This significantly simplifies the implementation, making it > more compatible with non-G1 collectors. There's a net removal of ~1000 lines > in