Does "-cv" option to jasm tool override the class file version in jasm file?
Jaikiran Pai
jaikiran.pai at oracle.com
Tue Dec 16 00:47:26 UTC 2025
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 <asmtools-dev-retn at openjdk.org> on behalf of
> Leonid Kuskov <leonid.kuskov at oracle.com>
> *Date: *Friday, December 12, 2025 at 11:53 AM
> *To: *Jaikiran Pai <jaikiran.pai at oracle.com>, asmtools-dev at openjdk.org
> <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 <jaikiran.pai at oracle.com>
> *Date: *Thursday, December 11, 2025 at 5:54 PM
> *To: *Leonid Kuskov <leonid.kuskov at oracle.com>,
> asmtools-dev at openjdk.org <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: <https://mail.openjdk.org/pipermail/asmtools-dev/attachments/20251216/dc2b3d06/attachment.htm>
More information about the asmtools-dev
mailing list