From jaikiran.pai at oracle.com Thu Dec 11 05:05:57 2025 From: jaikiran.pai at oracle.com (Jaikiran Pai) Date: Thu, 11 Dec 2025 10:35:57 +0530 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? Message-ID: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> When running some jtreg tests that use ".jasm" files, I see this warning being emitted by asmtools: mexit02a.jasm (24:19) Warning: Class file version not specified in file or by -cv parameter. Defaulting to version "45:3" jtreg uses 8.1 version of asmtools and launches org.openjdk.asmtools.jasm.Main to compile these jasm files. Right now it doesn't pass any class file version parameter when launching that tool. To prevent the above warning, I was considering passing "-cv" option to specify a class file version that would be used if the ".jasm" file being compiled didn't explicitly have one. However, I then looked at the code in org.openjdk.asmtools.jasm.Main and that has this comment for this option parsing https://github.com/openjdk/asmtools/blob/8.1/src/org/openjdk/asmtools/jasm/Main.java#L216 : // overrides cf version even if it's defined in the source file. case "-fixcv", "-cv" -> { ... Is that comment accurate? Would passing "-cv" option to the tool override the class file version that's present in any .jasm file? I would like it to be used as a fallback default version if there isn't one set in the jasm files. -Jaikiran From leonid.kuskov at oracle.com Thu Dec 11 21:49:25 2025 From: leonid.kuskov at oracle.com (Leonid Kuskov) Date: Thu, 11 Dec 2025 21:49:25 +0000 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? In-Reply-To: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> References: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> Message-ID: In typical usage, a .jasm file explicitly specifies the class-file version in its header, for example: test.jasm public super class test version 55:0 {} If the version isn't specified in the file, jasm defaults to 45.3. When a version is present in the .jasm file, the -cv option doesn?t override it. For example, given a header such as: public super class test version 55:0 {} and the command: jasm -cv 66.0 -w . test.jasm the generated class file will still use version 55.0, because the version defined in the source takes precedence. If your intention is to force the class-file version - regardless of whether the .jasm file declares one, then you must use: jasm -fixcv 66.0 -w . test.jasm The -fixcv option overrides the version unconditionally, while -cv supplies only a fallback value that is used only if the source file does not specify a version. The options (-fixcv, -cv) were added to support batch updates of large sets of .jasm files. In general, it is preferable to specify the correct class-file version directly in the .jasm source. Leonid BTW: The latest asmtools release is 9.1, which is preferable to version 8.1 for new or updated workflows. Confidential- Oracle Internal From: asmtools-dev on behalf of Jaikiran Pai Date: Wednesday, December 10, 2025 at 9:06?PM To: asmtools-dev at openjdk.org Subject: Does "-cv" option to jasm tool override the class file version in jasm file? When running some jtreg tests that use ".jasm" files, I see this warning being emitted by asmtools: mexit02a.jasm (24:19) Warning: Class file version not specified in file or by -cv parameter. Defaulting to version "45:3" jtreg uses 8.1 version of asmtools and launches org.openjdk.asmtools.jasm.Main to compile these jasm files. Right now it doesn't pass any class file version parameter when launching that tool. To prevent the above warning, I was considering passing "-cv" option to specify a class file version that would be used if the ".jasm" file being compiled didn't explicitly have one. However, I then looked at the code in org.openjdk.asmtools.jasm.Main and that has this comment for this option parsing https://github.com/openjdk/asmtools/blob/8.1/src/org/openjdk/asmtools/jasm/Main.java#L216 : // overrides cf version even if it's defined in the source file. case "-fixcv", "-cv" -> { ... Is that comment accurate? Would passing "-cv" option to the tool override the class file version that's present in any .jasm file? I would like it to be used as a fallback default version if there isn't one set in the jasm files. -Jaikiran -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaikiran.pai at oracle.com Fri Dec 12 01:53:59 2025 From: jaikiran.pai at oracle.com (Jaikiran Pai) Date: Fri, 12 Dec 2025 07:23:59 +0530 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? In-Reply-To: References: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> Message-ID: On 12/12/25 3:19 am, Leonid Kuskov wrote: > > In typical usage, a |.jasm|?file explicitly specifies the class-file > version in its header, for example: > > |test.jasm public super class test version 55:0 {} | > > If the version isn't specified in the file, |jasm|?defaults to 45.3. > > When a version is present in the |.jasm|?file, the |-cv|?option > doesn?t override?it. For example, given a header such as: > > |public super class test version 55:0 {} | > > and the command: > > |jasm -cv 66.0 -w . test.jasm | > > the generated class file will still use version 55.0, because the > version defined in the source takes precedence. > Thank you Leonid, this is what I had hoped -cv would be, but got confused by the comment in that Main.java code. Thank you for confirming. > Leonid > BTW: The latest asmtools release is 9.1, which is preferable to > version 8.1 for new or updated workflows. I will take this up with the jtreg dev team and see if we should upgrade to it. One thing that's important for jtreg is the ability to use this library on older Java versions. asmtools 8.1 requires Java 17 runtime and when we upgraded jtreg to use 8.1 of asmtools, we had to enforce Java 17 as the minimum to build and launch the jtreg tool. -Jaikiran -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid.kuskov at oracle.com Fri Dec 12 19:53:27 2025 From: leonid.kuskov at oracle.com (Leonid Kuskov) Date: Fri, 12 Dec 2025 19:53:27 +0000 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? In-Reply-To: References: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> Message-ID: Currently, asmtools is built using JDK 21 (LTS). If you prefer to continue using JDK 17, I can downgrade the build version to align with jtreg. A few changes can be integrated over the next few days. Leonid Confidential- Oracle Internal From: Jaikiran Pai Date: Thursday, December 11, 2025 at 5:54?PM To: Leonid Kuskov , asmtools-dev at openjdk.org Subject: Re: Does "-cv" option to jasm tool override the class file version in jasm file? On 12/12/25 3:19 am, Leonid Kuskov wrote: In typical usage, a .jasm file explicitly specifies the class-file version in its header, for example: test.jasm public super class test version 55:0 {} If the version isn't specified in the file, jasm defaults to 45.3. When a version is present in the .jasm file, the -cv option doesn?t override it. For example, given a header such as: public super class test version 55:0 {} and the command: jasm -cv 66.0 -w . test.jasm the generated class file will still use version 55.0, because the version defined in the source takes precedence. Thank you Leonid, this is what I had hoped -cv would be, but got confused by the comment in that Main.java code. Thank you for confirming. Leonid BTW: The latest asmtools release is 9.1, which is preferable to version 8.1 for new or updated workflows. I will take this up with the jtreg dev team and see if we should upgrade to it. One thing that's important for jtreg is the ability to use this library on older Java versions. asmtools 8.1 requires Java 17 runtime and when we upgraded jtreg to use 8.1 of asmtools, we had to enforce Java 17 as the minimum to build and launch the jtreg tool. -Jaikiran -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkuskov at openjdk.org Mon Dec 15 20:47:48 2025 From: lkuskov at openjdk.org (Leonid Kuskov) Date: Mon, 15 Dec 2025 20:47:48 GMT Subject: RFR: 7904123: Switch the Asmtools build system to use JDK 17 (LTS) Message-ID: [CODETOOLS-7904123](https://bugs.openjdk.org/browse/CODETOOLS-7904123) Switch the Asmtools build system to use JDK 17 (LTS) in alignment with jtreg ------------- Commit messages: - CODETOOLS-7904123: Switch the Asmtools build system to use JDK 17 (LTS) Changes: https://git.openjdk.org/asmtools/pull/91/files Webrev: https://webrevs.openjdk.org/?repo=asmtools&pr=91&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904123 Stats: 12 lines in 6 files changed: 1 ins; 0 del; 11 mod Patch: https://git.openjdk.org/asmtools/pull/91.diff Fetch: git fetch https://git.openjdk.org/asmtools.git pull/91/head:pull/91 PR: https://git.openjdk.org/asmtools/pull/91 From lkuskov at openjdk.org Mon Dec 15 21:05:12 2025 From: lkuskov at openjdk.org (Leonid Kuskov) Date: Mon, 15 Dec 2025 21:05:12 GMT Subject: Integrated: 7904123: Switch the Asmtools build system to use JDK 17 (LTS) In-Reply-To: References: Message-ID: On Mon, 15 Dec 2025 20:41:34 GMT, Leonid Kuskov wrote: > [CODETOOLS-7904123](https://bugs.openjdk.org/browse/CODETOOLS-7904123) Switch the Asmtools build system to use JDK 17 (LTS) in alignment with jtreg This pull request has now been integrated. Changeset: fa529035 Author: Leonid Kuskov URL: https://git.openjdk.org/asmtools/commit/fa52903513a8182f237cbe87a876786f36aa828e Stats: 12 lines in 6 files changed: 1 ins; 0 del; 11 mod 7904123: Switch the Asmtools build system to use JDK 17 (LTS) ------------- PR: https://git.openjdk.org/asmtools/pull/91 From lkuskov at openjdk.org Mon Dec 15 21:32:54 2025 From: lkuskov at openjdk.org (Leonid Kuskov) Date: Mon, 15 Dec 2025 21:32:54 GMT Subject: RFR: 7904123: Switch the Asmtools build system to use JDK 17 (LTS) Message-ID: [CODETOOLS-7904123](https://bugs.openjdk.org/browse/CODETOOLS-7904123) Switch the Asmtools build system to use JDK 17 (LTS) in alignment with jtreg
Update maven.yaml to use JDK 17,25 for testing ------------- Commit messages: - CODETOOLS-7904123: Switch the Asmtools build system to use JDK 17 (LTS) Changes: https://git.openjdk.org/asmtools/pull/92/files Webrev: https://webrevs.openjdk.org/?repo=asmtools&pr=92&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904123 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/asmtools/pull/92.diff Fetch: git fetch https://git.openjdk.org/asmtools.git pull/92/head:pull/92 PR: https://git.openjdk.org/asmtools/pull/92 From lkuskov at openjdk.org Mon Dec 15 21:39:20 2025 From: lkuskov at openjdk.org (Leonid Kuskov) Date: Mon, 15 Dec 2025 21:39:20 GMT Subject: Integrated: 7904123: Switch the Asmtools build system to use JDK 17 (LTS) In-Reply-To: References: Message-ID: On Mon, 15 Dec 2025 21:27:51 GMT, Leonid Kuskov wrote: > [CODETOOLS-7904123](https://bugs.openjdk.org/browse/CODETOOLS-7904123) Switch the Asmtools build system to use JDK 17 (LTS) in alignment with jtreg
> Update maven.yaml to use JDK 17,25 for testing This pull request has now been integrated. Changeset: a9e0b349 Author: Leonid Kuskov URL: https://git.openjdk.org/asmtools/commit/a9e0b349061d141027f9f74ccb29dab3c6d2c86e Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 7904123: Switch the Asmtools build system to use JDK 17 (LTS) ------------- PR: https://git.openjdk.org/asmtools/pull/92 From leonid.kuskov at oracle.com Mon Dec 15 21:53:32 2025 From: leonid.kuskov at oracle.com (Leonid Kuskov) Date: Mon, 15 Dec 2025 21:53:32 +0000 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? In-Reply-To: References: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> Message-ID: Hello Jaikiran, Chrisitan, Asmtools 9.1 has been switched to JDK 17 (LTS): https://bugs.openjdk.org/browse/CODETOOLS-7904123 Therefore, it is now possible to upgrade the jtreg asmtools version from 8.1 to 9.1, which supports Valhalla and is used for writing VM tests in JCK 26. Thanks, Leonid Confidential- Oracle Internal From: asmtools-dev on behalf of Leonid Kuskov Date: Friday, December 12, 2025 at 11:53?AM To: Jaikiran Pai , asmtools-dev at openjdk.org Subject: Re: Does "-cv" option to jasm tool override the class file version in jasm file? Currently, asmtools is built using JDK 21 (LTS). If you prefer to continue using JDK 17, I can downgrade the build version to align with jtreg. A few changes can be integrated over the next few days. Leonid Confidential- Oracle Internal From: Jaikiran Pai Date: Thursday, December 11, 2025 at 5:54?PM To: Leonid Kuskov , asmtools-dev at openjdk.org Subject: Re: Does "-cv" option to jasm tool override the class file version in jasm file? On 12/12/25 3:19 am, Leonid Kuskov wrote: In typical usage, a .jasm file explicitly specifies the class-file version in its header, for example: test.jasm public super class test version 55:0 {} If the version isn't specified in the file, jasm defaults to 45.3. When a version is present in the .jasm file, the -cv option doesn?t override it. For example, given a header such as: public super class test version 55:0 {} and the command: jasm -cv 66.0 -w . test.jasm the generated class file will still use version 55.0, because the version defined in the source takes precedence. Thank you Leonid, this is what I had hoped -cv would be, but got confused by the comment in that Main.java code. Thank you for confirming. Leonid BTW: The latest asmtools release is 9.1, which is preferable to version 8.1 for new or updated workflows. I will take this up with the jtreg dev team and see if we should upgrade to it. One thing that's important for jtreg is the ability to use this library on older Java versions. asmtools 8.1 requires Java 17 runtime and when we upgraded jtreg to use 8.1 of asmtools, we had to enforce Java 17 as the minimum to build and launch the jtreg tool. -Jaikiran -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaikiran.pai at oracle.com Tue Dec 16 00:47:26 2025 From: jaikiran.pai at oracle.com (Jaikiran Pai) Date: Tue, 16 Dec 2025 06:17:26 +0530 Subject: Does "-cv" option to jasm tool override the class file version in jasm file? In-Reply-To: References: <80b896e3-f1fd-49ef-8b63-6db124505748@oracle.com> Message-ID: <6b55a3d3-6978-47c3-9357-423f20af93ca@oracle.com> Hello Leonid, Thank you for doing this. I was checking with hotspot and valhalla devs yesterday whether they would be interested in this asmtools upgrade and there is indeed interest in this newer version. I'll check with Christian this week and we'll do a few runs of jtreg with the upgraded asmtools 9.1 version and see how it goes, before integrating that upgrade. I'll keep you updated. Thank you for your help so far. -Jaikiran On 16/12/25 3:23 am, Leonid Kuskov wrote: > Hello Jaikiran, Chrisitan, > > Asmtools 9.1 has been switched to JDK 17 (LTS): > https://bugs.openjdk.org/browse/CODETOOLS-7904123 > Therefore, it is now possible to upgrade the jtreg asmtools version > from 8.1 to 9.1, which supports Valhalla and is used for writing VM > tests in JCK 26. > > Thanks, > Leonid > > * > > Confidential- Oracle Internal > > From: *asmtools-dev on behalf of > Leonid Kuskov > *Date: *Friday, December 12, 2025 at 11:53?AM > *To: *Jaikiran Pai , asmtools-dev at openjdk.org > > *Subject: *Re: Does "-cv" option to jasm tool override the class file > version in jasm file? > > Currently, asmtools is built using JDK 21 (LTS). If you prefer to > continue using JDK 17, I can downgrade the build version to align with > jtreg. A few changes can be integrated over the next few days. > Leonid > * > * > > Confidential- Oracle Internal > > *From: *Jaikiran Pai > *Date: *Thursday, December 11, 2025 at 5:54?PM > *To: *Leonid Kuskov , > asmtools-dev at openjdk.org > *Subject: *Re: Does "-cv" option to jasm tool override the class file > version in jasm file? > > On 12/12/25 3:19 am, Leonid Kuskov wrote: > > In typical usage, a |.jasm|?file explicitly specifies the > class-file version in its header, for example: > > |test.jasm public super class test version 55:0 {} | > > If the version isn't specified in the file, |jasm|?defaults to 45.3. > > When a version is present in the |.jasm|?file, the |-cv|?option > doesn?t override?it. For example, given a header such as: > > |public super class test version 55:0 {} | > > and the command: > > |jasm -cv 66.0 -w . test.jasm | > > the generated class file will still use version 55.0, because the > version defined in the source takes precedence. > > Thank you Leonid, this is what I had hoped -cv would be, but got > confused by the comment in that Main.java code. Thank you for confirming. > > Leonid > BTW: The latest asmtools release is 9.1, which is preferable to > version 8.1 for new or updated workflows. > > I will take this up with the jtreg dev team and see if we should > upgrade to it. One thing that's important for jtreg is the ability to > use this library on older Java versions. asmtools 8.1 requires Java 17 > runtime and when we upgraded jtreg to use 8.1 of asmtools, we had to > enforce Java 17 as the minimum to build and launch the jtreg tool. > > -Jaikiran > -------------- next part -------------- An HTML attachment was scrubbed... URL: