From daniel.smith at oracle.com Mon Aug 19 23:08:46 2024 From: daniel.smith at oracle.com (Dan Smith) Date: Mon, 19 Aug 2024 23:08:46 +0000 Subject: JASM format for Dynamic constants Message-ID: <7082FFCC-FFA5-411B-B238-0CD00D0B8EDE@oracle.com> The JASM syntax is specified on this page: https://wiki.openjdk.org/pages/viewpage.action?pageId=21430416 It is stale, and makes no mention of Dynamic constants. I'm not sure if there are other new features that should be covered as well. Based on some trial and error, I believe the text should be updated as follows: "The Constant Pool and Constant Elements" 1) Add "Dynamic" to the list of TAGs 2) Clean up the use of CONSTANT_FIELD, which is kind of a mess. - I'd suggest a CONSTANT_METHOD production which looks exactly the same but narratively is described as having a method descriptor. Otherwise, maybe name the thing CONSTANT_REFERENCE. - There's a missing InterfaceMethodref row from the TAGGED_CONSTANT_VALUE table - The second argument to a MethodHandle is *not* a CONSTANT_FIELD?it's a "CONSTANT_CELL(Field | Method | InterfaceMethod)" (specifically, it can be tagged or untagged, and it can be a #n reference to the constant pool) - Similarly for the second argument to a InvokeDynamic 3) Add a row to TAGGED_CONSTANT_VALUE, as follows: Dynamic INVOKESUBTAG : CONSTANT_CELL(Field | Method | InterfaceMethod) : NAME_AND_TYPE [ INVOKEDYNAMIC_STATIC_ARGS ] I'd suggest some narrative text here to clarify that: for InvokeDynamic and Dynamic, there will typically be two NAME_AND_TYPE pairs in succession. The first is to refer to the bootstrap method. The second provides the name and type arguments passed to the bootstrap method. For an InvokeDynamic, the 2nd NAME_AND_TYPE would use a method descriptor; for a Dynamic, the 2nd NAME_AND_TYPE would be a field descriptor. 4) Add Dynamic to places that mention InvokeDynamic: "When the JASM parser encounters an InvokeDynamic **or Dynamic** constant" "INVOKESUBTAGs for MethodHandle**,** ~~and (const)~~ InvokeDynamic**, and Dynamic** are defined as follows" "Static arguments for an InvokeDynamic **or Dynamic** constant are defined as follows:" 5) Update INVOKEDYNAMIC_STATIC_ARGUMENTS to include optional braces ("{ ... }"). 6) Add "Dynamic" to the list of INVOKEDYNAMIC_STATIC_ARG variants. INVOKEDYNAMIC_STATIC_ARG should be expressed in terms of CONSTANT_CELL, rather than trying to redefine it. I might write this as "CONSTANT_CELL(int | long | float | double | class | String | MethodHandle | MethodType | Dynamic)"; or it could be listed as "CONSTANT_CELL(int)", "CONSTANT_CELL(long)", ..., each variant on its own row. 7) Consider revising some of the discussion/examples from "InvokeDynamic Instructions" to illustrate both InvokeDynamic and Dynamic, and shift it from the "Instructions" section of the document to "The Constant Pool and Constant Elements". Update the grammar discussed there to align with the changes described above. From jonathan.gibbons at oracle.com Tue Aug 20 18:59:35 2024 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 20 Aug 2024 11:59:35 -0700 Subject: JASM format for Dynamic constants In-Reply-To: <7082FFCC-FFA5-411B-B238-0CD00D0B8EDE@oracle.com> References: <7082FFCC-FFA5-411B-B238-0CD00D0B8EDE@oracle.com> Message-ID: <63bbd91a-93e3-4d03-94a7-72fe38101be9@oracle.com> Paging Leonid... -- Jon On 8/19/24 4:08 PM, Dan Smith wrote: > The JASM syntax is specified on this page: > > https://wiki.openjdk.org/pages/viewpage.action?pageId=21430416 > > It is stale, and makes no mention of Dynamic constants. I'm not sure if there are other new features that should be covered as well. > > Based on some trial and error, I believe the text should be updated as follows: > > "The Constant Pool and Constant Elements" > > 1) Add "Dynamic" to the list of TAGs > > 2) Clean up the use of CONSTANT_FIELD, which is kind of a mess. > > - I'd suggest a CONSTANT_METHOD production which looks exactly the same but narratively is described as having a method descriptor. Otherwise, maybe name the thing CONSTANT_REFERENCE. > > - There's a missing InterfaceMethodref row from the TAGGED_CONSTANT_VALUE table > > - The second argument to a MethodHandle is *not* a CONSTANT_FIELD?it's a "CONSTANT_CELL(Field | Method | InterfaceMethod)" (specifically, it can be tagged or untagged, and it can be a #n reference to the constant pool) > > - Similarly for the second argument to a InvokeDynamic > > 3) Add a row to TAGGED_CONSTANT_VALUE, as follows: > > Dynamic INVOKESUBTAG : CONSTANT_CELL(Field | Method | InterfaceMethod) : NAME_AND_TYPE [ INVOKEDYNAMIC_STATIC_ARGS ] > > I'd suggest some narrative text here to clarify that: for InvokeDynamic and Dynamic, there will typically be two NAME_AND_TYPE pairs in succession. The first is to refer to the bootstrap method. The second provides the name and type arguments passed to the bootstrap method. For an InvokeDynamic, the 2nd NAME_AND_TYPE would use a method descriptor; for a Dynamic, the 2nd NAME_AND_TYPE would be a field descriptor. > > 4) Add Dynamic to places that mention InvokeDynamic: > > "When the JASM parser encounters an InvokeDynamic **or Dynamic** constant" > > "INVOKESUBTAGs for MethodHandle**,** ~~and (const)~~ InvokeDynamic**, and Dynamic** are defined as follows" > > "Static arguments for an InvokeDynamic **or Dynamic** constant are defined as follows:" > > 5) Update INVOKEDYNAMIC_STATIC_ARGUMENTS to include optional braces ("{ ... }"). > > 6) Add "Dynamic" to the list of INVOKEDYNAMIC_STATIC_ARG variants. > > INVOKEDYNAMIC_STATIC_ARG should be expressed in terms of CONSTANT_CELL, rather than trying to redefine it. I might write this as "CONSTANT_CELL(int | long | float | double | class | String | MethodHandle | MethodType | Dynamic)"; or it could be listed as "CONSTANT_CELL(int)", "CONSTANT_CELL(long)", ..., each variant on its own row. > > 7) Consider revising some of the discussion/examples from "InvokeDynamic Instructions" to illustrate both InvokeDynamic and Dynamic, and shift it from the "Instructions" section of the document to "The Constant Pool and Constant Elements". Update the grammar discussed there to align with the changes described above. > From leonid.kuskov at oracle.com Tue Aug 20 21:10:58 2024 From: leonid.kuskov at oracle.com (Leonid Kuskov) Date: Tue, 20 Aug 2024 21:10:58 +0000 Subject: JASM format for Dynamic constants In-Reply-To: <7082FFCC-FFA5-411B-B238-0CD00D0B8EDE@oracle.com> References: <7082FFCC-FFA5-411B-B238-0CD00D0B8EDE@oracle.com> Message-ID: Thanks, Dan, for pointing this out. The page appears to be quite outdated. I'll need some time to synchronize the syntax with the current implementation, which has undergone slight changes. For example, the current output (not yet integrated) is shown in the attachment. From: code-tools-dev on behalf of Dan Smith Date: Monday, August 19, 2024 at 4:08?PM To: code-tools-dev at openjdk.org Subject: JASM format for Dynamic constants The JASM syntax is specified on this page: https://wiki.openjdk.org/pages/viewpage.action?pageId=21430416 It is stale, and makes no mention of Dynamic constants. I'm not sure if there are other new features that should be covered as well. Based on some trial and error, I believe the text should be updated as follows: "The Constant Pool and Constant Elements" 1) Add "Dynamic" to the list of TAGs 2) Clean up the use of CONSTANT_FIELD, which is kind of a mess. - I'd suggest a CONSTANT_METHOD production which looks exactly the same but narratively is described as having a method descriptor. Otherwise, maybe name the thing CONSTANT_REFERENCE. - There's a missing InterfaceMethodref row from the TAGGED_CONSTANT_VALUE table - The second argument to a MethodHandle is *not* a CONSTANT_FIELD?it's a "CONSTANT_CELL(Field | Method | InterfaceMethod)" (specifically, it can be tagged or untagged, and it can be a #n reference to the constant pool) - Similarly for the second argument to a InvokeDynamic 3) Add a row to TAGGED_CONSTANT_VALUE, as follows: Dynamic INVOKESUBTAG : CONSTANT_CELL(Field | Method | InterfaceMethod) : NAME_AND_TYPE [ INVOKEDYNAMIC_STATIC_ARGS ] I'd suggest some narrative text here to clarify that: for InvokeDynamic and Dynamic, there will typically be two NAME_AND_TYPE pairs in succession. The first is to refer to the bootstrap method. The second provides the name and type arguments passed to the bootstrap method. For an InvokeDynamic, the 2nd NAME_AND_TYPE would use a method descriptor; for a Dynamic, the 2nd NAME_AND_TYPE would be a field descriptor. 4) Add Dynamic to places that mention InvokeDynamic: "When the JASM parser encounters an InvokeDynamic **or Dynamic** constant" "INVOKESUBTAGs for MethodHandle**,** ~~and (const)~~ InvokeDynamic**, and Dynamic** are defined as follows" "Static arguments for an InvokeDynamic **or Dynamic** constant are defined as follows:" 5) Update INVOKEDYNAMIC_STATIC_ARGUMENTS to include optional braces ("{ ... }"). 6) Add "Dynamic" to the list of INVOKEDYNAMIC_STATIC_ARG variants. INVOKEDYNAMIC_STATIC_ARG should be expressed in terms of CONSTANT_CELL, rather than trying to redefine it. I might write this as "CONSTANT_CELL(int | long | float | double | class | String | MethodHandle | MethodType | Dynamic)"; or it could be listed as "CONSTANT_CELL(int)", "CONSTANT_CELL(long)", ..., each variant on its own row. 7) Consider revising some of the discussion/examples from "InvokeDynamic Instructions" to illustrate both InvokeDynamic and Dynamic, and shift it from the "Instructions" section of the document to "The Constant Pool and Constant Elements". Update the grammar discussed there to align with the changes described above. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LambdaConversion.class.g.t.jasm Type: application/octet-stream Size: 13918 bytes Desc: LambdaConversion.class.g.t.jasm URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestInlined.class.jasm Type: application/octet-stream Size: 3477 bytes Desc: TestInlined.class.jasm URL: From jonathan.gibbons at oracle.com Fri Aug 23 17:44:53 2024 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 23 Aug 2024 10:44:53 -0700 Subject: CFV: New Code Tools Reviewer: Jaikiran Pai Message-ID: <73c7b133-7b0a-4590-abd3-df8b1bed0d28@oracle.com> I hereby nominate Jaikiran Pai to Code Tools Reviewer. Jaikiran is an active member of the core-libs networking team. He is a JDK Reviewer, and recently he has also been making significant contributions to the `jtreg` test harness. $ git shortlog --author "Jaikiran Pai" upstream/master Jaikiran Pai (15): ????? 7903441: System.out and System.err messages are missing in jtr file when a test times out in agentvm mode ????? 7903581: Typo in make file in pandoc binary detection ????? 7903580: Allow for re-attempting agent creation when an attempt fails ????? 7903686: jtreg Agent should use loopback address ????? 7903538: NullPointerException: Cannot read the array length because "" is null ????? 7903692: JTREG_HOME and JT_HOME can interfere with jtreg self tests ????? 7903621: jtreg ignores VM exit code when test process reports status with "STATUS: " line ????? 7903753: Report duration of testng test methods ????? 7902346: Need better message when test times out in agentvm mode ????? 7903188: Log time spent waiting to acquire exclusive access lock ????? 7903746: jtreg tests run extremely slow on some environments due to hostname lookups ????? 7903784: NullPointerException: Cannot read the array length because the return value of "java.io.File.listFiles()" is null ????? 7903765: wget failed in build.sh in jtreg ????? 7901757: Race in counting total number of failures from TestNG ????? 7903781: Report the process id of the agent or other VM that was used for a jtreg action Votes are due by COB September 6, 2024. Only current CodeTools Reviewers [1] are eligible to vote on this nomination.? Votes must be cast in the open by replying to this mailing list. For Three-Vote Consensus voting instructions, see [2]. -- Jon [1] https://openjdk.org/census [2] https://openjdk.org/projects/#reviewer-vote From jonathan.gibbons at oracle.com Mon Aug 26 18:01:36 2024 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 26 Aug 2024 11:01:36 -0700 Subject: CFV: New Code Tools Reviewer: Jaikiran Pai In-Reply-To: <73c7b133-7b0a-4590-abd3-df8b1bed0d28@oracle.com> References: <73c7b133-7b0a-4590-abd3-df8b1bed0d28@oracle.com> Message-ID: <387d95ff-6a94-41e4-9434-8f624c596ca1@oracle.com> Vote: yes On 8/23/24 10:44 AM, Jonathan Gibbons wrote: > I hereby nominate Jaikiran Pai to Code Tools Reviewer. > > Jaikiran is an active member of the core-libs networking team. He is a > JDK Reviewer, > and recently he has also been making significant contributions to the > `jtreg` test harness. > > $ git shortlog --author "Jaikiran Pai" upstream/master > Jaikiran Pai (15): > ????? 7903441: System.out and System.err messages are missing in jtr > file when a test times out in agentvm mode > ????? 7903581: Typo in make file in pandoc binary detection > ????? 7903580: Allow for re-attempting agent creation when an attempt > fails > ????? 7903686: jtreg Agent should use loopback address > ????? 7903538: NullPointerException: Cannot read the array length > because "" is null > ????? 7903692: JTREG_HOME and JT_HOME can interfere with jtreg self tests > ????? 7903621: jtreg ignores VM exit code when test process reports > status with "STATUS: " line > ????? 7903753: Report duration of testng test methods > ????? 7902346: Need better message when test times out in agentvm mode > ????? 7903188: Log time spent waiting to acquire exclusive access lock > ????? 7903746: jtreg tests run extremely slow on some environments due > to hostname lookups > ????? 7903784: NullPointerException: Cannot read the array length > because the return value of "java.io.File.listFiles()" is null > ????? 7903765: wget failed in build.sh in jtreg > ????? 7901757: Race in counting total number of failures from TestNG > ????? 7903781: Report the process id of the agent or other VM that was > used for a jtreg action > > Votes are due by COB September 6, 2024. > > Only current CodeTools Reviewers [1] are eligible to vote > on this nomination.? Votes must be cast in the open by replying > to this mailing list. > > For Three-Vote Consensus voting instructions, see [2]. > > -- Jon > > [1] https://openjdk.org/census > [2] https://openjdk.org/projects/#reviewer-vote > From dmitry.bessonov at oracle.com Fri Aug 30 12:03:51 2024 From: dmitry.bessonov at oracle.com (Dmitry Bessonov) Date: Fri, 30 Aug 2024 12:03:51 +0000 Subject: CFV: New Code Tools Reviewer: Jaikiran Pai In-Reply-To: <73c7b133-7b0a-4590-abd3-df8b1bed0d28@oracle.com> References: <73c7b133-7b0a-4590-abd3-df8b1bed0d28@oracle.com> Message-ID: <97C5D23E-EACB-4B50-AC6A-303C7ED5FAC7@oracle.com> Vote: yes > On Aug 23, 2024, at 18:44, Jonathan Gibbons wrote: > > I hereby nominate Jaikiran Pai to Code Tools Reviewer. > > Jaikiran is an active member of the core-libs networking team. He is a JDK Reviewer, > and recently he has also been making significant contributions to the `jtreg` test harness. > > $ git shortlog --author "Jaikiran Pai" upstream/master > Jaikiran Pai (15): > 7903441: System.out and System.err messages are missing in jtr file when a test times out in agentvm mode > 7903581: Typo in make file in pandoc binary detection > 7903580: Allow for re-attempting agent creation when an attempt fails > 7903686: jtreg Agent should use loopback address > 7903538: NullPointerException: Cannot read the array length because "" is null > 7903692: JTREG_HOME and JT_HOME can interfere with jtreg self tests > 7903621: jtreg ignores VM exit code when test process reports status with "STATUS: " line > 7903753: Report duration of testng test methods > 7902346: Need better message when test times out in agentvm mode > 7903188: Log time spent waiting to acquire exclusive access lock > 7903746: jtreg tests run extremely slow on some environments due to hostname lookups > 7903784: NullPointerException: Cannot read the array length because the return value of "java.io.File.listFiles()" is null > 7903765: wget failed in build.sh in jtreg > 7901757: Race in counting total number of failures from TestNG > 7903781: Report the process id of the agent or other VM that was used for a jtreg action > > Votes are due by COB September 6, 2024. > > Only current CodeTools Reviewers [1] are eligible to vote > on this nomination. Votes must be cast in the open by replying > to this mailing list. > > For Three-Vote Consensus voting instructions, see [2]. > > -- Jon > > [1] https://openjdk.org/census > [2] https://openjdk.org/projects/#reviewer-vote >