From duke at openjdk.org Sun Jun 1 01:03:07 2025 From: duke at openjdk.org (f) Date: Sun, 1 Jun 2025 01:03:07 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai wrote: > Hi, > > This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. > > Please take a look and leave your reviews, thanks a lot. @merykitty Hi, valhalla is almost ready for experimental use now, right? ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2926197857 From qamai at openjdk.org Sun Jun 1 06:21:04 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Sun, 1 Jun 2025 06:21:04 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sun, 1 Jun 2025 00:59:53 GMT, f wrote: >> Hi, >> >> This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. >> >> Please take a look and leave your reviews, thanks a lot. > > @merykitty Hi, valhalla is almost ready for experimental use now, right? @SidneyLann Valhalla is ready for experimental use, you can either build the project from source (build instructions can be found [here](https://openjdk.org/groups/build/doc/building.html)) or you can grab a prebuilt package [here](https://builds.shipilev.net/). Please give it a try and report to us any issue you find, it would be a great help in the stabilization of Valhalla. If you want to know whether Valhalla can be released to mainline soon then the answer is we don't know and we are trying our best. I believe an act of trying, reporting issues, and even contributing will help Valhalla to land sooner. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2926632410 From duke at openjdk.org Sun Jun 1 07:00:03 2025 From: duke at openjdk.org (f) Date: Sun, 1 Jun 2025 07:00:03 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai wrote: > Hi, > > This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. > > Please take a look and leave your reviews, thanks a lot. Ok. I'll try, but this repo does not allow submit issues. Thank you. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2926690432 From qamai at openjdk.org Sun Jun 1 08:27:03 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Sun, 1 Jun 2025 08:27:03 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sun, 1 Jun 2025 06:57:27 GMT, f wrote: >> Hi, >> >> This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. >> >> Please take a look and leave your reviews, thanks a lot. > > Ok. I'll try, but this repo does not allow submit issues. Thank you. @SidneyLann That's great, you can report an issue by sending an email to [valhalla-dev](https://mail.openjdk.org/mailman/listinfo/valhalla-dev). ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2926804110 From david.simms at oracle.com Mon Jun 2 09:40:54 2025 From: david.simms at oracle.com (David Simms) Date: Mon, 2 Jun 2025 11:40:54 +0200 Subject: Result: New Valhalla Committer: Chen Liang Message-ID: |Voting for Chen Liang [1] is now closed. Yes: 8 Veto: 0 Abstain: 0 According to the Bylaws definition of Lazy Consensus, this is sufficient to approve the nomination. David Simms [1] https://mail.openjdk.org/pipermail/valhalla-dev/2025-May/014192.html| -------------- next part -------------- An HTML attachment was scrubbed... URL: From matsaave at openjdk.org Mon Jun 2 14:14:07 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Mon, 2 Jun 2025 14:14:07 GMT Subject: [lworld] RFR: 8352068: [lworld] test StrictFinalInstanceFieldsTest.java needs to be updated after fix for JDK-8351951 [v2] In-Reply-To: <848GaUIY64h1n3AqcMCdTa9Vc8zfXwV1RjwLceUguow=.ac8b68b5-6aad-42e7-9102-5697a6b6d57f@github.com> References: <848GaUIY64h1n3AqcMCdTa9Vc8zfXwV1RjwLceUguow=.ac8b68b5-6aad-42e7-9102-5697a6b6d57f@github.com> Message-ID: On Thu, 8 May 2025 17:52:37 GMT, Coleen Phillimore wrote: >> test/hotspot/jtreg/ProblemList.txt line 142: >> >>> 140: runtime/valhalla/inlinetypes/PreloadCircularityTest.java 8349631 linux-aarch64-debug >>> 141: runtime/valhalla/inlinetypes/ValuePreloadTest.java 8349630 linux-aarch64-debug >>> 142: runtime/valhalla/inlinetypes/verifier/StrictInstanceFieldsTest.java generic-all >> >> Does this require a bug number? > > Maybe CODETOOLS-7903081 will work. CODETOOLS-7903081 was integrated but I'm still blocked from enabling the test. I found JDK-8357141 which is the actual bug we're waiting for so I changed the bug number to that. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1449#discussion_r2121274052 From thartmann at openjdk.org Tue Jun 3 05:48:05 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 3 Jun 2025 05:48:05 GMT Subject: [lworld] RFR: 8357474: [lworld] Consolidate load/store flat inline types [v10] In-Reply-To: References: Message-ID: On Fri, 30 May 2025 19:56:22 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch consolidates loading and storing of flat inline types. This makes it so that `make_from_flat` and `store_flat` will take a pointer to the target location. `make_from_flat_array` and `store_flat_array` are split out into their own methods which receive an `idx` parameter. This also fixes some issues I theorycrafted: >> >> - Improper loading/storing of atomic elements in a non-atomic container. This is not supported at the moment but it would be great to prepare for it. >> - `is_naturally_atomic` checks `nof_declared_nonstatic_fields`, which is incorrect if the sole field has multiple fields. I refactored it into `ciInlineKlass`, the decision to do atomic loads/stores is also delegated to the callee, the caller only needs to know whether the operations act as if they are atomic, not whether they are actually executed atomically. >> - `null_free` of an oop can only be trusted if the container itself is null-free. For example this case: >> >> value class StringHolder { >> @NullRestricted >> String s; >> } >> >> value class StringHolderHolder { >> // flatten >> StringHolder v; >> } >> >> Then `v.s` cannot be trusted to be non-null because `v` can be null. >> >> This also allows straightforward implementation of https://bugs.openjdk.org/browse/JDK-8349110. >> >> Please let me know what you think. Thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove ptr_type parameters Very nice! Thanks for making these changes. I'll re-review this asap. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1470#issuecomment-2933560295 From thartmann at openjdk.org Tue Jun 3 11:29:15 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 3 Jun 2025 11:29:15 GMT Subject: [lworld] RFR: 8357474: [lworld] Consolidate load/store flat inline types [v10] In-Reply-To: References: Message-ID: On Fri, 30 May 2025 19:56:22 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch consolidates loading and storing of flat inline types. This makes it so that `make_from_flat` and `store_flat` will take a pointer to the target location. `make_from_flat_array` and `store_flat_array` are split out into their own methods which receive an `idx` parameter. This also fixes some issues I theorycrafted: >> >> - Improper loading/storing of atomic elements in a non-atomic container. This is not supported at the moment but it would be great to prepare for it. >> - `is_naturally_atomic` checks `nof_declared_nonstatic_fields`, which is incorrect if the sole field has multiple fields. I refactored it into `ciInlineKlass`, the decision to do atomic loads/stores is also delegated to the callee, the caller only needs to know whether the operations act as if they are atomic, not whether they are actually executed atomically. >> - `null_free` of an oop can only be trusted if the container itself is null-free. For example this case: >> >> value class StringHolder { >> @NullRestricted >> String s; >> } >> >> value class StringHolderHolder { >> // flatten >> StringHolder v; >> } >> >> Then `v.s` cannot be trusted to be non-null because `v` can be null. >> >> This also allows straightforward implementation of https://bugs.openjdk.org/browse/JDK-8349110. >> >> Please let me know what you think. Thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove ptr_type parameters The fix looks good to me and all tests passed. Thanks again! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1470#pullrequestreview-2891907733 From qamai at openjdk.org Tue Jun 3 11:45:22 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 3 Jun 2025 11:45:22 GMT Subject: [lworld] RFR: 8357474: [lworld] Consolidate load/store flat inline types [v10] In-Reply-To: References: Message-ID: On Fri, 30 May 2025 19:56:22 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch consolidates loading and storing of flat inline types. This makes it so that `make_from_flat` and `store_flat` will take a pointer to the target location. `make_from_flat_array` and `store_flat_array` are split out into their own methods which receive an `idx` parameter. This also fixes some issues I theorycrafted: >> >> - Improper loading/storing of atomic elements in a non-atomic container. This is not supported at the moment but it would be great to prepare for it. >> - `is_naturally_atomic` checks `nof_declared_nonstatic_fields`, which is incorrect if the sole field has multiple fields. I refactored it into `ciInlineKlass`, the decision to do atomic loads/stores is also delegated to the callee, the caller only needs to know whether the operations act as if they are atomic, not whether they are actually executed atomically. >> - `null_free` of an oop can only be trusted if the container itself is null-free. For example this case: >> >> value class StringHolder { >> @NullRestricted >> String s; >> } >> >> value class StringHolderHolder { >> // flatten >> StringHolder v; >> } >> >> Then `v.s` cannot be trusted to be non-null because `v` can be null. >> >> This also allows straightforward implementation of https://bugs.openjdk.org/browse/JDK-8349110. >> >> Please let me know what you think. Thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove ptr_type parameters Thanks a lot for your reviews! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1470#issuecomment-2934837562 From duke at openjdk.org Tue Jun 3 11:45:22 2025 From: duke at openjdk.org (duke) Date: Tue, 3 Jun 2025 11:45:22 GMT Subject: [lworld] RFR: 8357474: [lworld] Consolidate load/store flat inline types [v10] In-Reply-To: References: Message-ID: On Fri, 30 May 2025 19:56:22 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch consolidates loading and storing of flat inline types. This makes it so that `make_from_flat` and `store_flat` will take a pointer to the target location. `make_from_flat_array` and `store_flat_array` are split out into their own methods which receive an `idx` parameter. This also fixes some issues I theorycrafted: >> >> - Improper loading/storing of atomic elements in a non-atomic container. This is not supported at the moment but it would be great to prepare for it. >> - `is_naturally_atomic` checks `nof_declared_nonstatic_fields`, which is incorrect if the sole field has multiple fields. I refactored it into `ciInlineKlass`, the decision to do atomic loads/stores is also delegated to the callee, the caller only needs to know whether the operations act as if they are atomic, not whether they are actually executed atomically. >> - `null_free` of an oop can only be trusted if the container itself is null-free. For example this case: >> >> value class StringHolder { >> @NullRestricted >> String s; >> } >> >> value class StringHolderHolder { >> // flatten >> StringHolder v; >> } >> >> Then `v.s` cannot be trusted to be non-null because `v` can be null. >> >> This also allows straightforward implementation of https://bugs.openjdk.org/browse/JDK-8349110. >> >> Please let me know what you think. Thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove ptr_type parameters @merykitty Your change (at version 0a945fe6218bedf6403500447143431b1f6dee8f) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1470#issuecomment-2934843599 From qamai at openjdk.org Tue Jun 3 11:50:11 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 3 Jun 2025 11:50:11 GMT Subject: [lworld] Integrated: 8357474: [lworld] Consolidate load/store flat inline types In-Reply-To: References: Message-ID: <0HHsD77hLoomYpAzkBbHKvgDv0z1Kzw3Hhl5b_T731I=.0154c4c3-82cb-4b1e-ae22-37cdcf1fb73d@github.com> On Wed, 21 May 2025 16:07:15 GMT, Quan Anh Mai wrote: > Hi, > > This patch consolidates loading and storing of flat inline types. This makes it so that `make_from_flat` and `store_flat` will take a pointer to the target location. `make_from_flat_array` and `store_flat_array` are split out into their own methods which receive an `idx` parameter. This also fixes some issues I theorycrafted: > > - Improper loading/storing of atomic elements in a non-atomic container. This is not supported at the moment but it would be great to prepare for it. > - `is_naturally_atomic` checks `nof_declared_nonstatic_fields`, which is incorrect if the sole field has multiple fields. I refactored it into `ciInlineKlass`, the decision to do atomic loads/stores is also delegated to the callee, the caller only needs to know whether the operations act as if they are atomic, not whether they are actually executed atomically. > - `null_free` of an oop can only be trusted if the container itself is null-free. For example this case: > > value class StringHolder { > @NullRestricted > String s; > } > > value class StringHolderHolder { > // flatten > StringHolder v; > } > > Then `v.s` cannot be trusted to be non-null because `v` can be null. > > This also allows straightforward implementation of https://bugs.openjdk.org/browse/JDK-8349110. > > Please let me know what you think. Thanks very much. This pull request has now been integrated. Changeset: 64ee2e2b Author: Quan Anh Mai Committer: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/64ee2e2bf038681ac12769eb6f5edad60896a221 Stats: 819 lines in 14 files changed: 360 ins; 288 del; 171 mod 8357474: [lworld] Consolidate load/store flat inline types Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1470 From thartmann at openjdk.org Tue Jun 3 11:50:14 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 3 Jun 2025 11:50:14 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai wrote: > I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. Yes, that's much cleaner. Thanks for the refactoring. The fix looks good to me, I just added two comments. src/hotspot/share/opto/macro.cpp line 602: > 600: int nm_offset_in_element = offset_in_element + vk->null_marker_offset_in_payload(); > 601: const TypeAryPtr* nm_adr_type = elem_adr_type->with_field_offset(nm_offset_in_element); > 602: Node* value = value_from_mem(mem, ctl, T_BOOLEAN, TypeInt::BOOL, nm_adr_type, alloc); What if `value_from_mem` fails and returns `nullptr`? src/hotspot/share/opto/type.cpp line 3870: > 3868: field_bt = T_BOOLEAN; > 3869: } > 3870: _is_ptr_to_narrowoop = UseCompressedOops && ::is_reference_type(field_bt);\ Suggestion: _is_ptr_to_narrowoop = UseCompressedOops && ::is_reference_type(field_bt); ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1478#pullrequestreview-2891921248 PR Review Comment: https://git.openjdk.org/valhalla/pull/1478#discussion_r2123532080 PR Review Comment: https://git.openjdk.org/valhalla/pull/1478#discussion_r2123547928 From tobias.hartmann at oracle.com Tue Jun 3 12:54:34 2025 From: tobias.hartmann at oracle.com (Tobias Hartmann) Date: Tue, 3 Jun 2025 14:54:34 +0200 Subject: =?UTF-8?Q?CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= Message-ID: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK Committer. He contributed 48 changes to the JDK project [2] and 13 changes to the Valhalla project [3]. Votes are due by June 17, 2025, 13:00 UTC. Only current Valhalla Committers [4] are eligible to vote on this nomination. Votes must be cast in the open by replying to this mailing list. For Lazy Consensus voting instructions, see [5]. Best regards, Tobias [1] https://openjdk.org/census#qamai [2] https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits [3] https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla [4] https://openjdk.java.net/census [5] https://openjdk.org/projects/#committer-vote From tobias.hartmann at oracle.com Tue Jun 3 12:55:42 2025 From: tobias.hartmann at oracle.com (Tobias Hartmann) Date: Tue, 3 Jun 2025 14:55:42 +0200 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: <92f7e5f6-4c2a-4435-b620-be39fe349134@oracle.com> Vote: yes Best regards, Tobias On 6/3/25 14:54, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK Committer. He contributed 48 changes to the JDK project [2] and 13 changes to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this nomination. Votes must be cast in the open by replying to this mailing list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote From thartmann at openjdk.org Tue Jun 3 13:09:05 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 3 Jun 2025 13:09:05 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai wrote: > Hi, > > This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. > > Please take a look and leave your reviews, thanks a lot. Looks like there's a merge conflict now that you pushed https://git.openjdk.org/valhalla/pull/1470. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2935147877 From roger.riggs at oracle.com Tue Jun 3 14:07:23 2025 From: roger.riggs at oracle.com (Roger Riggs) Date: Tue, 3 Jun 2025 10:07:23 -0400 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: Vote:Yes On 6/3/25 8:54 AM, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. From maurizio.cimadamore at oracle.com Tue Jun 3 15:12:46 2025 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Tue, 3 Jun 2025 16:12:46 +0100 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: <2ee79fce-fcd2-4a28-8f1c-aadf89d863c8@oracle.com> Vote: yes Maurizio On 03/06/2025 13:54, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK > Committer. He contributed 48 changes to the JDK project [2] and 13 > changes to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this > nomination. Votes must be cast in the open by replying to this mailing > list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] > https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] > https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote ​ -------------- next part -------------- An HTML attachment was scrubbed... URL: From frederic.parain at oracle.com Tue Jun 3 15:28:46 2025 From: frederic.parain at oracle.com (Frederic Parain) Date: Tue, 3 Jun 2025 11:28:46 -0400 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: <05106eff-982d-44f2-bd35-d6e3f22f9a2a@oracle.com> Vote: yes Fred On 6/3/25 08:54, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK > Committer. He contributed 48 changes to the JDK project [2] and 13 > changes to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this > nomination. Votes must be cast in the open by replying to this mailing > list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] > https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] > https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote From lois.foltan at oracle.com Tue Jun 3 15:52:19 2025 From: lois.foltan at oracle.com (Lois Foltan) Date: Tue, 3 Jun 2025 15:52:19 +0000 Subject: =?utf-8?B?UmU6IENGVjogTmV3IFZhbGhhbGxhIENvbW1pdHRlcjogUXXDom4tQW5oIE1h?= =?utf-8?Q?i?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: Vote: yes Lois From: valhalla-dev on behalf of Tobias Hartmann Date: Tuesday, June 3, 2025 at 8:55?AM To: valhalla-dev at openjdk.java.net Cc: anhmdq99 at gmail.com Subject: CFV: New Valhalla Committer: Qu?n-Anh Mai I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK Committer. He contributed 48 changes to the JDK project [2] and 13 changes to the Valhalla project [3]. Votes are due by June 17, 2025, 13:00 UTC. Only current Valhalla Committers [4] are eligible to vote on this nomination. Votes must be cast in the open by replying to this mailing list. For Lazy Consensus voting instructions, see [5]. Best regards, Tobias [1] https://openjdk.org/census#qamai [2] https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits [3] https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla [4] https://openjdk.java.net/census [5] https://openjdk.org/projects/#committer-vote -------------- next part -------------- An HTML attachment was scrubbed... URL: From jatin.bhateja at intel.com Tue Jun 3 16:55:48 2025 From: jatin.bhateja at intel.com (Bhateja, Jatin) Date: Tue, 3 Jun 2025 16:55:48 +0000 Subject: =?utf-8?B?UkU6IENGVjogTmV3IFZhbGhhbGxhIENvbW1pdHRlcjogUXXDom4tQW5oIE1h?= =?utf-8?Q?i?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: Vote: Yes Best Regards, Jatin > -----Original Message----- > From: valhalla-dev On Behalf Of Tobias > Hartmann > Sent: Tuesday, June 3, 2025 6:25 PM > To: valhalla-dev at openjdk.java.net > Cc: anhmdq99 at gmail.com > Subject: CFV: New Valhalla Committer: Qu?n-Anh Mai > > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK > Committer. He contributed 48 changes to the JDK project [2] and 13 changes > to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this nomination. > Votes must be cast in the open by replying to this mailing list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] https://github.com/search?q=author- > name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] > https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20 > resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote From qamai at openjdk.org Tue Jun 3 16:57:40 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 3 Jun 2025 16:57:40 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders [v2] In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: > Hi, > > This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. > > Please take a look and leave your reviews, thanks a lot. Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - whitespace - better debug - Merge branch 'lworld' into safepoint - handle nullable flat fields in safepoint ------------- Changes: https://git.openjdk.org/valhalla/pull/1478/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1478&range=01 Stats: 381 lines in 7 files changed: 188 ins; 138 del; 55 mod Patch: https://git.openjdk.org/valhalla/pull/1478.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1478/head:pull/1478 PR: https://git.openjdk.org/valhalla/pull/1478 From qamai at openjdk.org Tue Jun 3 16:57:40 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 3 Jun 2025 16:57:40 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders [v2] In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: <1AqGXxqGDC5YXTdknC4yWlCh3ooO2FT2_oVqEcyB6qg=.a17d6e33-8b69-4024-a572-16645561026d@github.com> On Tue, 3 Jun 2025 11:30:13 GMT, Tobias Hartmann wrote: >> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: >> >> - whitespace >> - better debug >> - Merge branch 'lworld' into safepoint >> - handle nullable flat fields in safepoint > > src/hotspot/share/opto/macro.cpp line 602: > >> 600: int nm_offset_in_element = offset_in_element + vk->null_marker_offset_in_payload(); >> 601: const TypeAryPtr* nm_adr_type = elem_adr_type->with_field_offset(nm_offset_in_element); >> 602: Node* value = value_from_mem(mem, ctl, T_BOOLEAN, TypeInt::BOOL, nm_adr_type, alloc); > > What if `value_from_mem` fails and returns `nullptr`? Yes, you are right, I should check for `null` here. I have also tried to make the debug message for `PrintEliminateAllocations` more detailed. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1478#discussion_r2124424145 From vromero at openjdk.org Tue Jun 3 19:17:41 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 3 Jun 2025 19:17:41 GMT Subject: Integrated: Merge lworld Message-ID: Merge branch 'lworld' into lw5_merge_lworld # Conflicts: # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java # src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java # src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties # src/jdk.jdeps/share/classes/com/sun/tools/classfile/AccessFlags.java # src/jdk.jdeps/share/classes/com/sun/tools/classfile/Attribute.java # src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java # src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ImplicitCreation_attribute.java # src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/NullRestricted_attribute.java # test/langtools/tools/javac/valhalla/value-objects/ValueObjectCompilationTests.java ------------- Commit messages: - Merge branch 'lworld' into lw5_merge_lworld - 8347754: [lw5] fix the order of nullness markers in signatures - Merge lworld - Merge lworld - Merge lworld - Merge lworld - Merge lworld - 8340125: [lw5] null checks are not being generated for method invocations and array writes - Merge lworld - 8340027: [lw5] the ACC_STRICT flag is not being set for non-nullable static fields - ... and 56 more: https://git.openjdk.org/valhalla/compare/be146831...15a5f0ee The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.org/valhalla/pull/1479/files Stats: 6799 lines in 101 files changed: 6673 ins; 5 del; 121 mod Patch: https://git.openjdk.org/valhalla/pull/1479.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1479/head:pull/1479 PR: https://git.openjdk.org/valhalla/pull/1479 From vromero at openjdk.org Tue Jun 3 19:17:48 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 3 Jun 2025 19:17:48 GMT Subject: Integrated: Merge lworld In-Reply-To: References: Message-ID: <5gLEadPK7wiOuUVrkYsQNHBe5u5o-N-GEzN_F87XQCU=.f71f2d78-c01a-4d84-8f01-6fa557820f71@github.com> On Tue, 3 Jun 2025 19:12:48 GMT, Vicente Romero wrote: > Merge branch 'lworld' into lw5_merge_lworld > # Conflicts: > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties > # src/jdk.jdeps/share/classes/com/sun/tools/classfile/AccessFlags.java > # src/jdk.jdeps/share/classes/com/sun/tools/classfile/Attribute.java > # src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java > # src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ImplicitCreation_attribute.java > # src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/NullRestricted_attribute.java > # test/langtools/tools/javac/valhalla/value-objects/ValueObjectCompilationTests.java This pull request has now been integrated. Changeset: d2d114ca Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/d2d114ca9b76605ced193302ef3329c986776153 Stats: 1021662 lines in 15816 files changed: 437092 ins; 506134 del; 78436 mod Merge lworld ------------- PR: https://git.openjdk.org/valhalla/pull/1479 From forax at univ-mlv.fr Wed Jun 4 05:34:10 2025 From: forax at univ-mlv.fr (Remi Forax) Date: Wed, 4 Jun 2025 07:34:10 +0200 (CEST) Subject: Playing with the current prototype Message-ID: <484126494.11721533.1749015250694.JavaMail.zimbra@univ-eiffel.fr> Hello everyone, Yesterday, i gave a talk about the state of the current valhalla prototype at Intellij IDEA conf, so if you don't mind me being stressed at the beginning and a french accent, here is the link https://youtu.be/Bd8EA8XKyLQ?t=11592 Thanks to JetBrain, the latest early access of IntelliJ has now a partial support of value types (yes !) Here is the github repo with the instructions to reproduce what i've shown https://github.com/forax/intellij-conf-2025 regards, R?mi From thartmann at openjdk.org Wed Jun 4 09:30:36 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 4 Jun 2025 09:30:36 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders [v2] In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Tue, 3 Jun 2025 16:57:40 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. >> >> Please take a look and leave your reviews, thanks a lot. > > Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: > > - whitespace > - better debug > - Merge branch 'lworld' into safepoint > - handle nullable flat fields in safepoint Thanks for making these adjustments. All tests passed and the fix looks good to me! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1478#pullrequestreview-2895990543 From qamai at openjdk.org Wed Jun 4 09:55:41 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Wed, 4 Jun 2025 09:55:41 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders [v2] In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Tue, 3 Jun 2025 16:57:40 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. >> >> Please take a look and leave your reviews, thanks a lot. > > Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: > > - whitespace > - better debug > - Merge branch 'lworld' into safepoint > - handle nullable flat fields in safepoint Thanks a lot for your speedy reviews! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2939376177 From duke at openjdk.org Wed Jun 4 09:55:41 2025 From: duke at openjdk.org (duke) Date: Wed, 4 Jun 2025 09:55:41 GMT Subject: [lworld] RFR: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders [v2] In-Reply-To: References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Tue, 3 Jun 2025 16:57:40 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. >> >> Please take a look and leave your reviews, thanks a lot. > > Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: > > - whitespace > - better debug > - Merge branch 'lworld' into safepoint > - handle nullable flat fields in safepoint @merykitty Your change (at version 12780f0205a531f2e7b5581a02e11e635f7d10a8) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1478#issuecomment-2939377183 From qamai at openjdk.org Wed Jun 4 10:56:30 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Wed, 4 Jun 2025 10:56:30 GMT Subject: [lworld] Integrated: 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders In-Reply-To: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> References: <5QYVEiXErBbaSDQp45zYrczU1wUayIWebquNEN0hfX8=.4998cbc9-779b-441e-aa61-6c3caa6f48da@github.com> Message-ID: On Sat, 31 May 2025 10:49:57 GMT, Quan Anh Mai wrote: > Hi, > > This patch adds handling of nullable flat fields in non-value class holder. Currently, we add all the fields to the safepoint, then add all the null markers. I decide to change this to adding the null marker of a flat field right after all the subfields of it. It makes the shape similar to how we pass nullable flat fields in the ABI, as well as simplifies the implementation since we do not have to keep track of all null markers when traversing the object payload. > > Please take a look and leave your reviews, thanks a lot. This pull request has now been integrated. Changeset: fdac9ab4 Author: Quan Anh Mai Committer: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/fdac9ab4e6eaa84c0ae31623afc566bbc97abca6 Stats: 381 lines in 7 files changed: 188 ins; 138 del; 55 mod 8353432: [lworld] Deoptimization needs to handle nullable, flat fields in non-value class holders Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1478 From christian.hagedorn at oracle.com Wed Jun 4 11:28:25 2025 From: christian.hagedorn at oracle.com (Christian Hagedorn) Date: Wed, 4 Jun 2025 13:28:25 +0200 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: <6952ad33-f930-4972-a40e-5c60a23360aa@oracle.com> Vote: yes Best regards, Christian On 03.06.25 14:54, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK Committer. He contributed 48 changes to the JDK project [2] and 13 changes to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this nomination. Votes must be cast in the open by replying to this mailing list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote From thartmann at openjdk.org Wed Jun 4 14:43:13 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 4 Jun 2025 14:43:13 GMT Subject: [lworld] RFR: [lworld] Enable all flattening by default Message-ID: Now that the implementation is sufficiently stable, let's enable all flattening by default. At this point, I think the flags are still useful but we might want to remove/merge them later. Thanks, Tobias ------------- Commit messages: - [lworld] Enable all flattening by default Changes: https://git.openjdk.org/valhalla/pull/1480/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1480&range=00 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1480.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1480/head:pull/1480 PR: https://git.openjdk.org/valhalla/pull/1480 From liach at openjdk.org Wed Jun 4 17:51:15 2025 From: liach at openjdk.org (Chen Liang) Date: Wed, 4 Jun 2025 17:51:15 GMT Subject: [lworld] RFR: [lworld] Enable all flattening by default In-Reply-To: References: Message-ID: On Wed, 4 Jun 2025 14:37:36 GMT, Tobias Hartmann wrote: > Now that the implementation is sufficiently stable, let's enable all flattening by default. At this point, I think the flags are still useful but we might want to remove/merge them later. > > Thanks, > Tobias Do we need to adjust the flags in valhalla tests, at least the compiler ones, such as ones that turn these on, or are there no such test triggers yet? ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1480#issuecomment-2940881147 From heidinga at openjdk.org Wed Jun 4 18:19:20 2025 From: heidinga at openjdk.org (Dan Heidinga) Date: Wed, 4 Jun 2025 18:19:20 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v4] In-Reply-To: <_mKwhIRfQ19M9aJI-AmENBn37zdkEJsDvZ2FlEZAtX4=.72f48ede-743b-4c05-b174-4dae79574525@github.com> References: <_mKwhIRfQ19M9aJI-AmENBn37zdkEJsDvZ2FlEZAtX4=.72f48ede-743b-4c05-b174-4dae79574525@github.com> Message-ID: On Thu, 29 May 2025 17:02:48 GMT, Matias Saavedra Silva wrote: >> This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. > > Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits: > > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Dan comments and new test case > - Chen and Dan comments and cleanup > - Copyrights > - Added reflective tests and problem listed test > - Added tests > - 8349945: Implement strict static fields (proposed JVM feature) Looks good. Thanks Matias ------------- Marked as reviewed by heidinga (no project role). PR Review: https://git.openjdk.org/valhalla/pull/1465#pullrequestreview-2897681146 From matsaave at openjdk.org Wed Jun 4 20:41:16 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 4 Jun 2025 20:41:16 GMT Subject: [lworld] RFR: 8352068: [lworld] test StrictFinalInstanceFieldsTest.java needs to be updated after fix for JDK-8351951 [v6] In-Reply-To: References: Message-ID: <4EIlXbun0CERk4zVpQ4mdIQ150Q1ZHNslebJObrnIIY=.e51d144b-affb-4daf-bd28-7e04b0faaefc@github.com> On Thu, 29 May 2025 20:20:16 GMT, Dan Heidinga wrote: >> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: >> >> Improved logging and TryCatchChildBad > > lgtm Thanks for the reviews @DanHeidinga and @liach! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1449#issuecomment-2941390505 From matsaave at openjdk.org Wed Jun 4 20:41:19 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 4 Jun 2025 20:41:19 GMT Subject: [lworld] Integrated: 8352068: [lworld] test StrictFinalInstanceFieldsTest.java needs to be updated after fix for JDK-8351951 In-Reply-To: References: Message-ID: <-pBvp0WoYGQlsJwVV_gVNNkPuzE7HWE9FSClNhfLqHo=.f70d7a2b-2e84-498b-9c3e-d64c7a613157@github.com> On Thu, 1 May 2025 17:40:30 GMT, Matias Saavedra Silva wrote: > Updates to javac prevent it from creating classes with improper uses of strict fields. Additionally, non-final strict fields are now allowed so `StrictFinalInstanceFieldsTest.java` needs to updated with new test cases. This patch adds new cases for final and non-final stricts as well as negative test cases using asmtools that check improper use of strict fields and early larval stack map frames. > > During testing, it was revealed that the new verify errors added in [JDK-8354694](https://bugs.openjdk.org/browse/JDK-8354694) do not work properly so a fix is included in this patch. > > Note: This cannot be integrated until jtreg is updated with a recent build of asmtools which can handle strict fields and can generate early_larval frames. This pull request has now been integrated. Changeset: d01aec33 Author: Matias Saavedra Silva URL: https://git.openjdk.org/valhalla/commit/d01aec33368a9e43220df1436d8b14e5b236e84c Stats: 1800 lines in 11 files changed: 1537 ins; 262 del; 1 mod 8352068: [lworld] test StrictFinalInstanceFieldsTest.java needs to be updated after fix for JDK-8351951 Reviewed-by: liach, heidinga ------------- PR: https://git.openjdk.org/valhalla/pull/1449 From liach at openjdk.org Thu Jun 5 00:17:05 2025 From: liach at openjdk.org (Chen Liang) Date: Thu, 5 Jun 2025 00:17:05 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v4] In-Reply-To: <_mKwhIRfQ19M9aJI-AmENBn37zdkEJsDvZ2FlEZAtX4=.72f48ede-743b-4c05-b174-4dae79574525@github.com> References: <_mKwhIRfQ19M9aJI-AmENBn37zdkEJsDvZ2FlEZAtX4=.72f48ede-743b-4c05-b174-4dae79574525@github.com> Message-ID: On Thu, 29 May 2025 17:02:48 GMT, Matias Saavedra Silva wrote: >> This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. > > Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits: > > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Dan comments and new test case > - Chen and Dan comments and cleanup > - Copyrights > - Added reflective tests and problem listed test > - Added tests > - 8349945: Implement strict static fields (proposed JVM feature) I can keep an eye on the verification part of classfile and investigate that from the language and tooling side. Please simplify the debug output of a ClassModel as I suggested above. Otherwise, changes to java.lang.invoke looks good. ------------- Marked as reviewed by liach (no project role). PR Review: https://git.openjdk.org/valhalla/pull/1465#pullrequestreview-2898501180 From thartmann at openjdk.org Thu Jun 5 05:22:05 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 5 Jun 2025 05:22:05 GMT Subject: [lworld] RFR: [lworld] Enable all flattening by default In-Reply-To: References: Message-ID: On Wed, 4 Jun 2025 17:48:07 GMT, Chen Liang wrote: > Do we need to adjust the flags in valhalla tests, at least the compiler ones, such as ones that turn these on, or are there no such test triggers yet? We have a few tests that explicitly turn these flags on because they perform some (IR) verification that relies on flattening. I think that should stay since the flags can still be turned off via the command line. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1480#issuecomment-2942789016 From thartmann at openjdk.org Thu Jun 5 05:22:05 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 5 Jun 2025 05:22:05 GMT Subject: [lworld] Integrated: [lworld] Enable all flattening by default In-Reply-To: References: Message-ID: On Wed, 4 Jun 2025 14:37:36 GMT, Tobias Hartmann wrote: > Now that the implementation is sufficiently stable, let's enable all flattening by default. At this point, I think the flags are still useful but we might want to remove/merge them later. > > Thanks, > Tobias This pull request has now been integrated. Changeset: c9a58a84 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/c9a58a84345d27c1bb4b09ade8a1669ec8c3c3c0 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod [lworld] Enable all flattening by default ------------- PR: https://git.openjdk.org/valhalla/pull/1480 From david.simms at oracle.com Thu Jun 5 10:56:06 2025 From: david.simms at oracle.com (David Simms) Date: Thu, 5 Jun 2025 12:56:06 +0200 Subject: =?UTF-8?Q?Re=3A_CFV=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= In-Reply-To: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> References: <9edb59ff-c923-4678-aa49-96eda424ff3f@oracle.com> Message-ID: <43571c93-8dd7-4183-80fd-ec215ac38849@oracle.com> Vote: yes /David Simms On 2025-06-03 14:54, Tobias Hartmann wrote: > I hereby nominate Qu?n-Anh Mai [1] to Valhalla Committer. > > Qu?n-Anh is a member of the GraalVM Team at Oracle Labs and a JDK > Committer. He contributed 48 changes to the JDK project [2] and 13 > changes to the Valhalla project [3]. > > Votes are due by June 17, 2025, 13:00 UTC. > > Only current Valhalla Committers [4] are eligible to vote on this > nomination. Votes must be cast in the open by replying to this mailing > list. > > For Lazy Consensus voting instructions, see [5]. > > Best regards, > Tobias > > [1] https://openjdk.org/census#qamai > [2] > https://github.com/search?q=author-name%3A%22Quan+Anh+Mai%22+repo%3Aopenjdk%2Fjdk&type=commits > [3] > https://bugs.openjdk.org/issues/?jql=assignee%20%3D%20qamai%20AND%20resolution%20%3D%20Fixed%20and%20fixVersion%20%3D%20repo-valhalla > [4] https://openjdk.java.net/census > [5] https://openjdk.org/projects/#committer-vote From chagedorn at openjdk.org Thu Jun 5 15:38:02 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 5 Jun 2025 15:38:02 GMT Subject: [lworld] RFR: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact Message-ID: We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact: https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71 This causes an assertion failure during CCP to not be monotonic. This is now fixed. There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. Thanks, Christian ------------- Commit messages: - 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact Changes: https://git.openjdk.org/valhalla/pull/1481/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1481&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353180 Stats: 103 lines in 4 files changed: 91 ins; 8 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/1481.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1481/head:pull/1481 PR: https://git.openjdk.org/valhalla/pull/1481 From chagedorn at openjdk.org Thu Jun 5 15:38:03 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 5 Jun 2025 15:38:03 GMT Subject: [lworld] RFR: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact In-Reply-To: References: Message-ID: <7nQ8uoI5cAguNaeDD6P6fDJ2-24hjb2tXdXJqi1-xCQ=.b1144757-1fea-452f-a82d-302c260ee9de@github.com> On Thu, 5 Jun 2025 12:47:50 GMT, Christian Hagedorn wrote: > We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact: > https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71 > > This causes an assertion failure during CCP to not be monotonic. This is now fixed. > > There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. > > Thanks, > Christian src/hotspot/share/opto/type.cpp line 4118: > 4116: const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS, /* stable= */ false, /* flat= */ true); > 4117: const bool exact = is_null_free; // Only exact if null-free because "null-free [LMyValue <: null-able [LMyValue". > 4118: const TypeAryPtr* arr = TypeAryPtr::make(TypePtr::BotPTR, arr0, klass, exact, Offset(0)); This was required before https://github.com/openjdk/valhalla/pull/1470 but I think the way the refactoring was done, we always set the correct exactness in `cast_to_flat_array()` which calls `make_from_klass_common()`: https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/src/hotspot/share/opto/graphKit.cpp#L1890-L1893 I think we should still set the exactness here correctly even though it seems we will eventually set it correctly in the caller. So, I left this fix in from my original fix before my last rebase. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1481#discussion_r2128859418 From qamai at openjdk.org Fri Jun 6 11:51:23 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Fri, 6 Jun 2025 11:51:23 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue Message-ID: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Hi, This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. Please kindly review, thanks very much. ------------- Commit messages: - Implement Unsafe::flatValue accesses Changes: https://git.openjdk.org/valhalla/pull/1482/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8349110 Stats: 178 lines in 7 files changed: 172 ins; 3 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/1482.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1482/head:pull/1482 PR: https://git.openjdk.org/valhalla/pull/1482 From thartmann at openjdk.org Fri Jun 6 14:19:10 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 6 Jun 2025 14:19:10 GMT Subject: [lworld] RFR: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact In-Reply-To: References: Message-ID: <7p6IkVfUa4mcNjLLdxlxLPAc2aQ1YEowpmIvqOEf8sM=.2367bd5d-8ff2-42b5-b26a-e014a0c82ec0@github.com> On Thu, 5 Jun 2025 12:47:50 GMT, Christian Hagedorn wrote: > We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact: > https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71 > > This causes an assertion failure during CCP to not be monotonic. This is now fixed. > > There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. > > Thanks, > Christian Thanks for working on this Christian, looks good to me! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1481#pullrequestreview-2905072176 From chagedorn at openjdk.org Fri Jun 6 14:41:03 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Fri, 6 Jun 2025 14:41:03 GMT Subject: [lworld] RFR: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact In-Reply-To: References: Message-ID: On Thu, 5 Jun 2025 12:47:50 GMT, Christian Hagedorn wrote: > We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact: > https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71 > > This causes an assertion failure during CCP to not be monotonic. This is now fixed. > > There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. > > Thanks, > Christian Thanks Tobias for your review and the offline discussions! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1481#issuecomment-2949468215 From matsaave at openjdk.org Fri Jun 6 16:50:27 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Fri, 6 Jun 2025 16:50:27 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v5] In-Reply-To: References: Message-ID: > This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - Problem listed test again - Fixed path in problem list and adjusted jasm test - Merge branch 'lworld' into implement_strict_statics_8349945 - Moved exception to guarantee and Chen comment - Merge branch 'lworld' into implement_strict_statics_8349945 - Dan comments and new test case - Chen and Dan comments and cleanup - Copyrights - Added reflective tests and problem listed test - Added tests - ... and 1 more: https://git.openjdk.org/valhalla/compare/c9a58a84...8631c3c0 ------------- Changes: https://git.openjdk.org/valhalla/pull/1465/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1465&range=04 Stats: 1122 lines in 34 files changed: 1096 ins; 0 del; 26 mod Patch: https://git.openjdk.org/valhalla/pull/1465.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1465/head:pull/1465 PR: https://git.openjdk.org/valhalla/pull/1465 From fparain at openjdk.org Fri Jun 6 16:52:59 2025 From: fparain at openjdk.org (Frederic Parain) Date: Fri, 6 Jun 2025 16:52:59 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v5] In-Reply-To: References: Message-ID: On Fri, 6 Jun 2025 16:50:27 GMT, Matias Saavedra Silva wrote: >> This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. > > Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: > > - Problem listed test again > - Fixed path in problem list and adjusted jasm test > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Moved exception to guarantee and Chen comment > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Dan comments and new test case > - Chen and Dan comments and cleanup > - Copyrights > - Added reflective tests and problem listed test > - Added tests > - ... and 1 more: https://git.openjdk.org/valhalla/compare/c9a58a84...8631c3c0 Looks good to me. Thank you for this thorough work on strict fields. ------------- Marked as reviewed by fparain (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1465#pullrequestreview-2905490638 From chagedorn at openjdk.org Fri Jun 6 17:53:10 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Fri, 6 Jun 2025 17:53:10 GMT Subject: [lworld] Integrated: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact In-Reply-To: References: Message-ID: On Thu, 5 Jun 2025 12:47:50 GMT, Christian Hagedorn wrote: > We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact: > https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71 > > This causes an assertion failure during CCP to not be monotonic. This is now fixed. > > There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. > > Thanks, > Christian This pull request has now been integrated. Changeset: 6a081482 Author: Christian Hagedorn URL: https://git.openjdk.org/valhalla/commit/6a0814822c067ca346a6e5d161342fcc52e01707 Stats: 103 lines in 4 files changed: 91 ins; 8 del; 4 mod 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1481 From liach at openjdk.org Sat Jun 7 01:26:06 2025 From: liach at openjdk.org (Chen Liang) Date: Sat, 7 Jun 2025 01:26:06 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v5] In-Reply-To: References: Message-ID: On Fri, 6 Jun 2025 16:50:27 GMT, Matias Saavedra Silva wrote: >> This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. > > Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: > > - Problem listed test again > - Fixed path in problem list and adjusted jasm test > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Moved exception to guarantee and Chen comment > - Merge branch 'lworld' into implement_strict_statics_8349945 > - Dan comments and new test case > - Chen and Dan comments and cleanup > - Copyrights > - Added reflective tests and problem listed test > - Added tests > - ... and 1 more: https://git.openjdk.org/valhalla/compare/c9a58a84...8631c3c0 test/hotspot/jtreg/ProblemList.txt line 134: > 132: runtime/valhalla/inlinetypes/CircularityTest.java 8349037 generic-all > 133: runtime/valhalla/inlinetypes/verifier/StrictInstanceFieldsTest.java 8357141 generic-all > 134: runtime/valhalla/inlinetypes/verifier/StrictStaticFieldsTest.java 8357141 generic-all 8357141 is now closed. We might need a dedicated new issue to re-enable these tests. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1465#discussion_r2133168418 From matsaave at openjdk.org Tue Jun 10 14:01:14 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Tue, 10 Jun 2025 14:01:14 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v6] In-Reply-To: References: Message-ID: > This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: Updated problemlist bug numbers ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1465/files - new: https://git.openjdk.org/valhalla/pull/1465/files/8631c3c0..22598c31 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1465&range=05 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1465&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1465.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1465/head:pull/1465 PR: https://git.openjdk.org/valhalla/pull/1465 From matsaave at openjdk.org Tue Jun 10 14:01:15 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Tue, 10 Jun 2025 14:01:15 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v5] In-Reply-To: References: Message-ID: On Sat, 7 Jun 2025 01:23:27 GMT, Chen Liang wrote: >> Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: >> >> - Problem listed test again >> - Fixed path in problem list and adjusted jasm test >> - Merge branch 'lworld' into implement_strict_statics_8349945 >> - Moved exception to guarantee and Chen comment >> - Merge branch 'lworld' into implement_strict_statics_8349945 >> - Dan comments and new test case >> - Chen and Dan comments and cleanup >> - Copyrights >> - Added reflective tests and problem listed test >> - Added tests >> - ... and 1 more: https://git.openjdk.org/valhalla/compare/c9a58a84...8631c3c0 > > test/hotspot/jtreg/ProblemList.txt line 134: > >> 132: runtime/valhalla/inlinetypes/CircularityTest.java 8349037 generic-all >> 133: runtime/valhalla/inlinetypes/verifier/StrictInstanceFieldsTest.java 8357141 generic-all >> 134: runtime/valhalla/inlinetypes/verifier/StrictStaticFieldsTest.java 8357141 generic-all > > 8357141 is now closed. We might need a dedicated new issue to re-enable these tests. Thanks for letting me know! I've updated the bug number to [CODETOOLS-7904031](https://bugs.openjdk.org/browse/CODETOOLS-7904031) for both StrictStaticFieldsTest and StrictInstanceFieldsTest. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1465#discussion_r2137977668 From liach at openjdk.org Tue Jun 10 15:47:57 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 10 Jun 2025 15:47:57 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v6] In-Reply-To: References: Message-ID: On Tue, 10 Jun 2025 14:01:14 GMT, Matias Saavedra Silva wrote: >> This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. > > Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: > > Updated problemlist bug numbers I think this is ready for integration; we can fine tune the test and other things later. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1465#issuecomment-2959772656 From vromero at openjdk.org Tue Jun 10 17:06:40 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 10 Jun 2025 17:06:40 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors Message-ID: This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes [1] https://bugs.openjdk.org/browse/JDK-8317277 ------------- Commit messages: - 8358777: [lworld] Allow explicit super invocation in canonical constructors Changes: https://git.openjdk.org/valhalla/pull/1483/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8358777 Stats: 135 lines in 32 files changed: 16 ins; 30 del; 89 mod Patch: https://git.openjdk.org/valhalla/pull/1483.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1483/head:pull/1483 PR: https://git.openjdk.org/valhalla/pull/1483 From matsaave at openjdk.org Tue Jun 10 19:18:54 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Tue, 10 Jun 2025 19:18:54 GMT Subject: [lworld] RFR: 8349945: Implement strict static fields (proposed JVM feature) [v3] In-Reply-To: <3CfGHotENFqsd4J0WzdYhDT0xEWPBq_kUfxvygK45b0=.dfd12639-a857-40ea-9766-eadbea2e5ded@github.com> References: <3CfGHotENFqsd4J0WzdYhDT0xEWPBq_kUfxvygK45b0=.dfd12639-a857-40ea-9766-eadbea2e5ded@github.com> Message-ID: On Thu, 29 May 2025 16:56:45 GMT, Dan Heidinga wrote: >> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: >> >> Chen and Dan comments and cleanup > > That's great! It removes a bunch cases we'll never have to worry about Thank you for the reviews @DanHeidinga @fparain and @liach and thank you @rose00 for the prototype! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1465#issuecomment-2960340380 From matsaave at openjdk.org Tue Jun 10 19:18:57 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Tue, 10 Jun 2025 19:18:57 GMT Subject: [lworld] Integrated: 8349945: Implement strict static fields (proposed JVM feature) In-Reply-To: References: Message-ID: On Tue, 20 May 2025 22:15:29 GMT, Matias Saavedra Silva wrote: > This patch enables and implements verification for fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before. This pull request has now been integrated. Changeset: f4bd868c Author: Matias Saavedra Silva URL: https://git.openjdk.org/valhalla/commit/f4bd868c54bcfadf621dd59d441a1a8870e30fed Stats: 1123 lines in 34 files changed: 1096 ins; 0 del; 27 mod 8349945: Implement strict static fields (proposed JVM feature) Co-authored-by: John R Rose Reviewed-by: heidinga, liach, fparain ------------- PR: https://git.openjdk.org/valhalla/pull/1465 From liach at openjdk.org Tue Jun 10 19:28:48 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 10 Jun 2025 19:28:48 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors In-Reply-To: References: Message-ID: On Tue, 10 Jun 2025 17:02:31 GMT, Vicente Romero wrote: > This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes > > [1] https://bugs.openjdk.org/browse/JDK-8317277 > > Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix This is mixed with a few flexible constructor bodies finalization changes. We should update lworld with these changes from master to make this patch cleaner. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1129: > 1127: } > 1128: > 1129: if (!allowValueClasses && TreeInfo.hasAnyConstructorCall(tree)) { When we allow value classes/early construction, we still wish to block this-delegating constructor calls. This works as a temporary measure. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 1243: > 1241: if (isInstanceFieldOfValueClass || isRecordField) { > 1242: implicit |= FINAL | STRICT; > 1243: } Suggestion: if (isInstanceFieldOfValueClass || isRecordField) { implicit |= FINAL | STRICT; mask = ValueFieldFlags; } else { mask = VarFlags; } test/langtools/tools/javac/records/RecordReading.java line 102: > 100: \n\ > 101: public record R(int i, @A long j, java.util.List l) { > 102: private final strictfp int i; Should we update `PrintingProcessor::printModifiers` instead? Either rename this modifier or to mask remove strict bit for fields? ------------- PR Review: https://git.openjdk.org/valhalla/pull/1483#pullrequestreview-2914790373 PR Review Comment: https://git.openjdk.org/valhalla/pull/1483#discussion_r2138616176 PR Review Comment: https://git.openjdk.org/valhalla/pull/1483#discussion_r2138619225 PR Review Comment: https://git.openjdk.org/valhalla/pull/1483#discussion_r2138609263 From vromero at openjdk.org Tue Jun 10 20:02:36 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 10 Jun 2025 20:02:36 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors In-Reply-To: References: Message-ID: On Tue, 10 Jun 2025 19:25:58 GMT, Chen Liang wrote: > This is mixed with a few flexible constructor bodies finalization changes. We should update lworld with these changes from master to make this patch cleaner. sure, this is why I mentioned that I will wait until flexible constructor bodies changes are merged into lworld ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1483#issuecomment-2960438916 From vromero at openjdk.org Tue Jun 10 21:04:09 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 10 Jun 2025 21:04:09 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors [v2] In-Reply-To: References: Message-ID: <4uTwbaqKPGjRpJ-6UKowMDAPAplffDPaDbMWOIK9wmA=.45caa0c7-13f0-4421-8865-02c6cba58c3e@github.com> > This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes > > [1] https://bugs.openjdk.org/browse/JDK-8317277 > > Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: Update src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Co-authored-by: Chen Liang ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1483/files - new: https://git.openjdk.org/valhalla/pull/1483/files/1d023018..d470cc29 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=00-01 Stats: 4 lines in 1 file changed: 3 ins; 1 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1483.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1483/head:pull/1483 PR: https://git.openjdk.org/valhalla/pull/1483 From vromero at openjdk.org Tue Jun 10 21:13:33 2025 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 10 Jun 2025 21:13:33 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors [v3] In-Reply-To: References: Message-ID: <9NSMvlghrRhV-J8o55FbGjYHbU89-Uoa2g3V7lqgjWg=.8ad4954e-44ec-4469-b063-24b80b7388cb@github.com> > This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes > > [1] https://bugs.openjdk.org/browse/JDK-8317277 > > Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: addressing review comments ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1483/files - new: https://git.openjdk.org/valhalla/pull/1483/files/d470cc29..674dbeb2 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=01-02 Stats: 12 lines in 2 files changed: 3 ins; 0 del; 9 mod Patch: https://git.openjdk.org/valhalla/pull/1483.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1483/head:pull/1483 PR: https://git.openjdk.org/valhalla/pull/1483 From liach at openjdk.org Tue Jun 10 22:08:40 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 10 Jun 2025 22:08:40 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors [v3] In-Reply-To: <9NSMvlghrRhV-J8o55FbGjYHbU89-Uoa2g3V7lqgjWg=.8ad4954e-44ec-4469-b063-24b80b7388cb@github.com> References: <9NSMvlghrRhV-J8o55FbGjYHbU89-Uoa2g3V7lqgjWg=.8ad4954e-44ec-4469-b063-24b80b7388cb@github.com> Message-ID: On Tue, 10 Jun 2025 21:13:33 GMT, Vicente Romero wrote: >> This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes >> >> [1] https://bugs.openjdk.org/browse/JDK-8317277 >> >> Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > addressing review comments Looks good. I am sure this approach to record is not the final solution and is bound to change, so this simple temporary approach is good. ------------- Marked as reviewed by liach (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1483#pullrequestreview-2915148616 From matsaave at openjdk.org Wed Jun 11 17:41:23 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 11 Jun 2025 17:41:23 GMT Subject: [lworld] RFR: 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame Message-ID: An early_larval frame contains a set of constant pool indices that are meant to refer to NameAndTypes. These NameAndType entries should refer to strict fields which must be marked as unset and there exists a verify error and associated test to check this, but there are no checks to ensure the input values actually refer to a NameAndType or valid constant pool index. This patch introduces a new error case and adds a test case to `StrictInstanceFieldsTest`. Note that `StrictInstanceFieldsTest.java` is problem listed so the test will not be used until JTREG 7.6 is integrated. ------------- Commit messages: - Fixed comment - 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame Changes: https://git.openjdk.org/valhalla/pull/1484/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1484&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8358093 Stats: 26 lines in 3 files changed: 21 ins; 0 del; 5 mod Patch: https://git.openjdk.org/valhalla/pull/1484.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1484/head:pull/1484 PR: https://git.openjdk.org/valhalla/pull/1484 From fparain at openjdk.org Wed Jun 11 18:12:55 2025 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 11 Jun 2025 18:12:55 GMT Subject: [lworld] RFR: 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame In-Reply-To: References: Message-ID: On Wed, 11 Jun 2025 17:18:35 GMT, Matias Saavedra Silva wrote: > An early_larval frame contains a set of constant pool indices that are meant to refer to NameAndTypes. These NameAndType entries should refer to strict fields which must be marked as unset and there exists a verify error and associated test to check this, but there are no checks to ensure the input values actually refer to a NameAndType or valid constant pool index. > > This patch introduces a new error case and adds a test case to `StrictInstanceFieldsTest`. Note that `StrictInstanceFieldsTest.java` is problem listed so the test will not be used until JTREG 7.6 is integrated. Verified with tier 1-5 tests. LGTM ------------- Marked as reviewed by fparain (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1484#pullrequestreview-2918230729 From vromero at openjdk.org Wed Jun 11 19:50:58 2025 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 11 Jun 2025 19:50:58 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors [v4] In-Reply-To: References: Message-ID: > This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes > > [1] https://bugs.openjdk.org/browse/JDK-8317277 > > Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding missing switches ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1483/files - new: https://git.openjdk.org/valhalla/pull/1483/files/674dbeb2..b0262388 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1483&range=02-03 Stats: 116 lines in 30 files changed: 35 ins; 2 del; 79 mod Patch: https://git.openjdk.org/valhalla/pull/1483.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1483/head:pull/1483 PR: https://git.openjdk.org/valhalla/pull/1483 From vromero at openjdk.org Wed Jun 11 19:50:58 2025 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 11 Jun 2025 19:50:58 GMT Subject: [lworld] RFR: 8358777: [lworld] Allow explicit super invocation in canonical constructors [v3] In-Reply-To: References: <9NSMvlghrRhV-J8o55FbGjYHbU89-Uoa2g3V7lqgjWg=.8ad4954e-44ec-4469-b063-24b80b7388cb@github.com> Message-ID: On Tue, 10 Jun 2025 22:06:20 GMT, Chen Liang wrote: > Looks good. I am sure this approach to record is not the final solution and is bound to change, so this simple temporary approach is good. thanks, yes I also think it will change ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1483#issuecomment-2963968211 From vromero at openjdk.org Wed Jun 11 21:35:40 2025 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 11 Jun 2025 21:35:40 GMT Subject: [lworld] Integrated: 8358777: [lworld] Allow explicit super invocation in canonical constructors In-Reply-To: References: Message-ID: On Tue, 10 Jun 2025 17:02:31 GMT, Vicente Romero wrote: > This is the implementation of section `Record class constructors` of JEP 401, see [1]. This PR allows a normal canonical constructor for a record class to contain an explicit 'super()' call, expressing an explicit division between early and late construction. Same applies to identity record classes > > [1] https://bugs.openjdk.org/browse/JDK-8317277 > > Note: this PR depends on flexible constructor bodies, given that the change that makes it a final feature is not merged in lworld yet I will wait for that to happen to do a merge and then push this fix This pull request has now been integrated. Changeset: 658a8d28 Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/658a8d287f5a897b01754598a6d06d55d2769e91 Stats: 52 lines in 7 files changed: 29 ins; 5 del; 18 mod 8358777: [lworld] Allow explicit super invocation in canonical constructors Reviewed-by: liach ------------- PR: https://git.openjdk.org/valhalla/pull/1483 From chagedorn at openjdk.org Thu Jun 12 09:28:20 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 12 Jun 2025 09:28:20 GMT Subject: [lworld] Integrated: 8344532: [lworld] TestLWord.test88 IR mismatch after jdk-24+20 Message-ID: The disabled IR rules no longer seem to fail with latest lworld. Let's re-enable them. Ran test through tier1-4 + stress. Thanks, Christian ------------- Commit messages: - 8344532: [lworld] TestLWord.test88 IR mismatch after jdk-24+20 Changes: https://git.openjdk.org/valhalla/pull/1485/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1485&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8344532 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1485.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1485/head:pull/1485 PR: https://git.openjdk.org/valhalla/pull/1485 From chagedorn at openjdk.org Thu Jun 12 09:28:21 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 12 Jun 2025 09:28:21 GMT Subject: [lworld] Integrated: 8344532: [lworld] TestLWord.test88 IR mismatch after jdk-24+20 In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 09:21:47 GMT, Christian Hagedorn wrote: > The disabled IR rules no longer seem to fail with latest lworld. Let's re-enable them. > > Ran test through tier1-4 + stress. > > Thanks, > Christian This pull request has now been integrated. Changeset: 8984c628 Author: Christian Hagedorn URL: https://git.openjdk.org/valhalla/commit/8984c628342bff416ec9b8e1f5676e1538f69e92 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod 8344532: [lworld] TestLWord.test88 IR mismatch after jdk-24+20 ------------- PR: https://git.openjdk.org/valhalla/pull/1485 From thartmann at openjdk.org Thu Jun 12 11:17:46 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 12 Jun 2025 11:17:46 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue In-Reply-To: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Fri, 6 Jun 2025 11:46:23 GMT, Quan Anh Mai wrote: > Hi, > > This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. > > Please kindly review, thanks very much. Thanks for working on this Quan-Anh! I executed some quick testing and noticed that `TestIntrinsics` fails: 359 InlineType === _ 13 15 16 24 25 31 37 43 52 65 74 110 111 [[ 394 360 360 384 374 ]] #compiler/valhalla/inlinetypes/MyValue1 (compiler/valhalla/inlinetypes/MyInterface):NotNull:exact * Oop:compiler/valhalla/inlinetypes/MyValue1 (compiler/valhalla/inlinetypes/MyInterface):NotNull:exact * !orig=14 !jvms: TestIntrinsics::test72 @ bci:-1 (line 1456) 394 AddP === _ 359 360 87 [[ 399 ]] Oop:compiler/valhalla/inlinetypes/MyValue1 (compiler/valhalla/inlinetypes/MyInterface):NotNull:exact+bot * [narrow] !jvms: TestIntrinsics::test72 @ bci:21 (line 1458) # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/workspace/open/src/hotspot/share/opto/compile.cpp:2073), pid=1806857, tid=1806873 # assert(false) failed: Should have been buffered # # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-06-11-1437268.tobias.hartmann.valhalla2) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-06-11-1437268.tobias.hartmann.valhalla2, mixed mode, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0xb384b1] Compile::process_inline_types(PhaseIterGVN&, bool)+0xa11 Current CompileTask: C2:3962 662 b compiler.valhalla.inlinetypes.TestIntrinsics::test72 (78 bytes) Stack: [0x00007f84bb8fa000,0x00007f84bb9fa000], sp=0x00007f84bb9f5080, free space=1004k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xb384b1] Compile::process_inline_types(PhaseIterGVN&, bool)+0xa11 (compile.cpp:2073) V [libjvm.so+0xb55115] Compile::Optimize()+0x1365 (compile.cpp:3033) V [libjvm.so+0xb57cff] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1fef (compile.cpp:874) V [libjvm.so+0x96de34] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x484 (c2compiler.cpp:143) V [libjvm.so+0xb659b8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58 (compileBroker.cpp:2307) V [libjvm.so+0xb66b78] CompileBroker::compiler_thread_loop()+0x568 (compileBroker.cpp:1951) V [libjvm.so+0x10e113b] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:774) V [libjvm.so+0x1b5c406] Thread::call_run()+0xb6 (thread.cpp:231) V [libjvm.so+0x17c7fb8] thread_native_entry(Thread*)+0x128 (os_linux.cpp:875) It mostly seems to fail on linux-aarch64-debug in various configurations for some reason but also once on x64 with `-XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+StressArrayCopyMacroNode -XX:+StressCallingConvention -XX:+StressLCM -XX:+StressGCM -XX:+StressCCP -XX:+StressIGVN -XX:+StressReflectiveCode -XX:+StressMethodHandleLinkerInlining -XX:+StressCompiledExceptionHandlers -XX:MaxNodeLimit=100000`. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2966212919 From thartmann at openjdk.org Thu Jun 12 11:24:43 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 12 Jun 2025 11:24:43 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue In-Reply-To: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Fri, 6 Jun 2025 11:46:23 GMT, Quan Anh Mai wrote: > Hi, > > This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. > > Please kindly review, thanks very much. I also noticed that there are still two leftover ToDos from JDK-8239003 in TestIntrinsics. I think `test54` should be removed because C2 will bail out from compilation. I quickly checked and it also seems that we can re-enable the test with `-XX:+DeoptimizeALot` again. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2966240167 From chagedorn at openjdk.org Thu Jun 12 13:27:21 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 12 Jun 2025 13:27:21 GMT Subject: [lworld] Integrated: 8332814: [lworld] Loop strip mining verification fails with "nothing between inner and outer loop" Message-ID: The test is no longer failing through tier1-4 + stress. I'm therefore re-enabling it. Thanks, Christian ------------- Commit messages: - 8332814: [lworld] Loop strip mining verification fails with "nothing between inner and outer loop" Changes: https://git.openjdk.org/valhalla/pull/1486/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1486&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332814 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1486.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1486/head:pull/1486 PR: https://git.openjdk.org/valhalla/pull/1486 From chagedorn at openjdk.org Thu Jun 12 13:27:21 2025 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Thu, 12 Jun 2025 13:27:21 GMT Subject: [lworld] Integrated: 8332814: [lworld] Loop strip mining verification fails with "nothing between inner and outer loop" In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 13:20:42 GMT, Christian Hagedorn wrote: > The test is no longer failing through tier1-4 + stress. I'm therefore re-enabling it. > > Thanks, > Christian This pull request has now been integrated. Changeset: 85392f66 Author: Christian Hagedorn URL: https://git.openjdk.org/valhalla/commit/85392f66f223067bc22fc4752b155a5e79a34912 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8332814: [lworld] Loop strip mining verification fails with "nothing between inner and outer loop" ------------- PR: https://git.openjdk.org/valhalla/pull/1486 From coleenp at openjdk.org Thu Jun 12 16:09:50 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Thu, 12 Jun 2025 16:09:50 GMT Subject: [lworld] RFR: 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame In-Reply-To: References: Message-ID: On Wed, 11 Jun 2025 17:18:35 GMT, Matias Saavedra Silva wrote: > An early_larval frame contains a set of constant pool indices that are meant to refer to NameAndTypes. These NameAndType entries should refer to strict fields which must be marked as unset and there exists a verify error and associated test to check this, but there are no checks to ensure the input values actually refer to a NameAndType or valid constant pool index. > > This patch introduces a new error case and adds a test case to `StrictInstanceFieldsTest`. Note that `StrictInstanceFieldsTest.java` is problem listed so the test will not be used until JTREG 7.6 is integrated. Verified with tier 1-5 tests. Looks good! ------------- Marked as reviewed by coleenp (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1484#pullrequestreview-2921819429 From matsaave at openjdk.org Thu Jun 12 20:05:42 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Thu, 12 Jun 2025 20:05:42 GMT Subject: [lworld] RFR: 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 16:06:52 GMT, Coleen Phillimore wrote: >> An early_larval frame contains a set of constant pool indices that are meant to refer to NameAndTypes. These NameAndType entries should refer to strict fields which must be marked as unset and there exists a verify error and associated test to check this, but there are no checks to ensure the input values actually refer to a NameAndType or valid constant pool index. >> >> This patch introduces a new error case and adds a test case to `StrictInstanceFieldsTest`. Note that `StrictInstanceFieldsTest.java` is problem listed so the test will not be used until JTREG 7.6 is integrated. Verified with tier 1-5 tests. > > Looks good! Thanks for the reviews @coleenp and @fparain! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1484#issuecomment-2968013984 From matsaave at openjdk.org Thu Jun 12 20:05:43 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Thu, 12 Jun 2025 20:05:43 GMT Subject: [lworld] Integrated: 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame In-Reply-To: References: Message-ID: <6CociI09y5JeDANip1sdpHwblQZjIYsKNejQGwmsYiw=.69c74e13-d6c1-4ea9-8ffd-6b1c5330ec97@github.com> On Wed, 11 Jun 2025 17:18:35 GMT, Matias Saavedra Silva wrote: > An early_larval frame contains a set of constant pool indices that are meant to refer to NameAndTypes. These NameAndType entries should refer to strict fields which must be marked as unset and there exists a verify error and associated test to check this, but there are no checks to ensure the input values actually refer to a NameAndType or valid constant pool index. > > This patch introduces a new error case and adds a test case to `StrictInstanceFieldsTest`. Note that `StrictInstanceFieldsTest.java` is problem listed so the test will not be used until JTREG 7.6 is integrated. Verified with tier 1-5 tests. This pull request has now been integrated. Changeset: bcee1454 Author: Matias Saavedra Silva URL: https://git.openjdk.org/valhalla/commit/bcee145486627c8997f2d13ba28a959abd47ccb5 Stats: 26 lines in 3 files changed: 21 ins; 0 del; 5 mod 8358093: [lworld] Crash when passing invalid constant pool index to early_larval frame Reviewed-by: fparain, coleenp ------------- PR: https://git.openjdk.org/valhalla/pull/1484 From dfenacci at openjdk.org Fri Jun 13 13:37:45 2025 From: dfenacci at openjdk.org (Damon Fenacci) Date: Fri, 13 Jun 2025 13:37:45 GMT Subject: [lworld] RFR: 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 Message-ID: Re-activating the IR check removed in [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) as `compiler/gcbarriers/TestZGCUnrolling.java` is not failing anymore. Testing: Tier1-3 ------------- Commit messages: - JDK-8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 Changes: https://git.openjdk.org/valhalla/pull/1488/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1488&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331551 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1488.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1488/head:pull/1488 PR: https://git.openjdk.org/valhalla/pull/1488 From liach at openjdk.org Fri Jun 13 19:56:40 2025 From: liach at openjdk.org (Chen Liang) Date: Fri, 13 Jun 2025 19:56:40 GMT Subject: [lworld] RFR: 8353236: [lworld] Better documentation for Valhalla Unsafe intrinsics [v3] In-Reply-To: References: <9c3qoF4kf1D22m6SOm5d_Y5W61lZqZnDTmgkoM-oTNU=.a4de2870-7638-4af0-bb21-26d2ae6045fc@github.com> Message-ID: On Thu, 10 Apr 2025 15:29:40 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch clarifies the meaning of undefined behavior when working with `Unsafe` and specifies the requirements when working with `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer`. >> >> Please take a look and leave your suggestions, thanks a lot. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove unnecessary statements Should we change these long paragraphs to a design document, as suggested in https://github.com/openjdk/jdk/pull/24777#pullrequestreview-2864975777? ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1425#issuecomment-2971507038 From coleenp at openjdk.org Fri Jun 13 20:34:34 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Fri, 13 Jun 2025 20:34:34 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition Message-ID: Need to write a test. ------------- Commit messages: - Update test/hotspot/jtreg/runtime/valhalla/inlinetypes/verifier/RedefineStrictFieldsTest.java - Add to the test. - Merge branch 'lworld' into redefine - 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition - rename to early_larval_stackmaps - fix bug - 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition Changes: https://git.openjdk.org/valhalla/pull/1487/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1487&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8359377 Stats: 251 lines in 5 files changed: 248 ins; 1 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1487.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1487/head:pull/1487 PR: https://git.openjdk.org/valhalla/pull/1487 From heidinga at openjdk.org Fri Jun 13 20:34:35 2025 From: heidinga at openjdk.org (Dan Heidinga) Date: Fri, 13 Jun 2025 20:34:35 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 3295: > 3293: if (frame_type == 246) { // EARLY_LARVAL > 3294: // rewrite_cp_refs in unset fields and fall through. > 3295: rewrite_cp_refs_in_unset_fields(stackmap_p, stackmap_end, calc_number_of_entries, frame_type); larval_frames contain an embedded frame - one of the other frames listed in the `stack_map_frame` union. This fixes the field NameAndTypes but doesn't update the embedded frame. The `stackmap_p` ptr is updated in the `rewrite_cp_refs_in_unset_fields` but haven't yet updated the `frame_type`. I think we need to redo this code before exiting this block: frame_type = *stackmap_p; stackmap_p++; test/hotspot/jtreg/runtime/valhalla/inlinetypes/verifier/RedefineStrictFieldsTest.java line 92: > 90: // Rename class "StrictFieldsNew" to "StrictFieldsOld" so we can redefine it. > 91: byte [] buf = replaceAllStrings("StrictFieldsNew", "StrictFieldsOld"); > 92: // Now redine the original version. Suggestion: // Now redefine the original version. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2143310452 PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2146034907 From coleenp at openjdk.org Fri Jun 13 20:34:35 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Fri, 13 Jun 2025 20:34:35 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 17:42:57 GMT, Dan Heidinga wrote: >> Need to write a test. > > src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 3295: > >> 3293: if (frame_type == 246) { // EARLY_LARVAL >> 3294: // rewrite_cp_refs in unset fields and fall through. >> 3295: rewrite_cp_refs_in_unset_fields(stackmap_p, stackmap_end, calc_number_of_entries, frame_type); > > larval_frames contain an embedded frame - one of the other frames listed in the `stack_map_frame` union. This fixes the field NameAndTypes but doesn't update the embedded frame. > > The `stackmap_p` ptr is updated in the `rewrite_cp_refs_in_unset_fields` but haven't yet updated the `frame_type`. I think we need to redo this code before exiting this block: > > frame_type = *stackmap_p; > stackmap_p++; I think it falls through to the embedded frame because it's next in the stream (?) Oh yes, you're right. I still haven't written the test. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2143370793 From matsaave at openjdk.org Fri Jun 13 20:34:35 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Fri, 13 Jun 2025 20:34:35 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 3318: > 3316: > 3317: // reserved for future use > 3318: else if (frame_type >= 128 && frame_type <= 245) { This is beyond the scope of your fix but I think we should have an enum for the frame types here just like in stackMapTable.cpp. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2145164924 From coleenp at openjdk.org Fri Jun 13 20:34:36 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Fri, 13 Jun 2025 20:34:36 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Fri, 13 Jun 2025 13:58:37 GMT, Matias Saavedra Silva wrote: >> Need to write a test. > > src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 3318: > >> 3316: >> 3317: // reserved for future use >> 3318: else if (frame_type >= 128 && frame_type <= 245) { > > This is beyond the scope of your fix but I think we should have an enum for the frame types here just like in stackMapTable.cpp. I agree. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2145416082 From qamai at openjdk.org Fri Jun 13 22:58:53 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Fri, 13 Jun 2025 22:58:53 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert Message-ID: Hi, The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. Please take a look and share your thoughts, thanks very much. ------------- Commit messages: - Optimize the case when all inputs into a Phi cluster is the same node Changes: https://git.openjdk.org/valhalla/pull/1489/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1489&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8336003 Stats: 47 lines in 3 files changed: 43 ins; 3 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1489.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1489/head:pull/1489 PR: https://git.openjdk.org/valhalla/pull/1489 From qamai at openjdk.org Fri Jun 13 23:30:54 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Fri, 13 Jun 2025 23:30:54 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v2] In-Reply-To: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: > Hi, > > This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. > > Please kindly review, thanks very much. Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: Buffer an InlineTypeNode on mismatched access ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1482/files - new: https://git.openjdk.org/valhalla/pull/1482/files/1673d7b8..0edc1de6 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=00-01 Stats: 13 lines in 1 file changed: 12 ins; 1 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1482.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1482/head:pull/1482 PR: https://git.openjdk.org/valhalla/pull/1482 From qamai at openjdk.org Fri Jun 13 23:52:40 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Fri, 13 Jun 2025 23:52:40 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v3] In-Reply-To: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: > Hi, > > This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. > > Please kindly review, thanks very much. Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: Revisit TODOs in TestIntrinsics ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1482/files - new: https://git.openjdk.org/valhalla/pull/1482/files/0edc1de6..cf137ea9 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=01-02 Stats: 32 lines in 1 file changed: 0 ins; 31 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1482.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1482/head:pull/1482 PR: https://git.openjdk.org/valhalla/pull/1482 From qamai at openjdk.org Fri Jun 13 23:55:34 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Fri, 13 Jun 2025 23:55:34 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue In-Reply-To: References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Thu, 12 Jun 2025 11:22:28 GMT, Tobias Hartmann wrote: >> Hi, >> >> This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. >> >> Please kindly review, thanks very much. > > I also noticed that there are still two leftover ToDos from JDK-8239003 in TestIntrinsics. I think `test54` should be removed because C2 will bail out from compilation. I quickly checked and it also seems that we can re-enable the test with `-XX:+DeoptimizeALot` again. @TobiHartmann It was because I need to buffer the `InlineTypeNode` if a load is required, I have added necessary handling for `InlineTypeNode`. For the TODOs in `TestIntrinsics`, `test54` seems like it can be removed since it tries to pass a larval value object to another method, `test79` and `test84` can be reenabled. For `test84`, I think an allocation is still necessary for the return value, so I remove that IR condition. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2971987447 From brendan at sidecourt.com Sat Jun 14 00:32:27 2025 From: brendan at sidecourt.com (Brendan McCarthy) Date: Fri, 13 Jun 2025 17:32:27 -0700 Subject: Why is explicit JEP 8303099 nullness not strict? Message-ID: Question on https://openjdk.org/jeps/8303099 "JEP draft: Null-Restricted and Nullable Types (Preview)": Why is a narrowing conversion from X? to X! a compiler warning rather than compiler error? I fully appreciate the need to avoid any sort of breaking errors when nullness is adapted on only one side of a two-party relationship. However, if a library goes out of its way to declare static void doSomething(String! foo) {...} A caller shouldn't be allowed to explicitly contradict it with: String? x = ... YourClass.doSomething(x) This is a clear clash of intents. If the caller didn't want to bother with nullness operators then they wouldn't have added them in the first place. Much more useful (for me anyway) for the compiler to stop the mistake immediately. I've seen a few Valhalla youtube updates as well as Reddit threads including one where Brian Goetz suggested that would break source or binary compatibility, but I fail to see how breakage applies in this scenario. What am I missing? Thanks in advance for any clarification. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thartmann at openjdk.org Mon Jun 16 09:32:48 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 16 Jun 2025 09:32:48 GMT Subject: [lworld] RFR: 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 In-Reply-To: References: Message-ID: On Fri, 13 Jun 2025 13:29:05 GMT, Damon Fenacci wrote: > Re-activating the IR check removed in [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) as `compiler/gcbarriers/TestZGCUnrolling.java` is not failing anymore. > > Testing: Tier1-3 Looks good to me, thanks for checking! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1488#pullrequestreview-2931328460 From dfenacci at openjdk.org Mon Jun 16 10:55:40 2025 From: dfenacci at openjdk.org (Damon Fenacci) Date: Mon, 16 Jun 2025 10:55:40 GMT Subject: [lworld] RFR: 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 In-Reply-To: References: Message-ID: On Mon, 16 Jun 2025 09:30:01 GMT, Tobias Hartmann wrote: >> Re-activating the IR check removed in [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) as `compiler/gcbarriers/TestZGCUnrolling.java` is not failing anymore. >> >> Testing: Tier1-3 > > Looks good to me, thanks for checking! Thanks for the review @TobiHartmann. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1488#issuecomment-2976076949 From duke at openjdk.org Mon Jun 16 10:55:40 2025 From: duke at openjdk.org (duke) Date: Mon, 16 Jun 2025 10:55:40 GMT Subject: [lworld] RFR: 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 In-Reply-To: References: Message-ID: On Fri, 13 Jun 2025 13:29:05 GMT, Damon Fenacci wrote: > Re-activating the IR check removed in [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) as `compiler/gcbarriers/TestZGCUnrolling.java` is not failing anymore. > > Testing: Tier1-3 @dafedafe Your change (at version facc60522c8e23702707d2adbc24f6a765bd991c) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1488#issuecomment-2976079683 From thartmann at openjdk.org Mon Jun 16 11:52:43 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 16 Jun 2025 11:52:43 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v3] In-Reply-To: References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Fri, 13 Jun 2025 23:52:40 GMT, Quan Anh Mai wrote: >> Hi, >> >> This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. >> >> Please kindly review, thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > Revisit TODOs in TestIntrinsics Thanks for investigating! What about this one? https://github.com/openjdk/valhalla/blob/0bbfece897944f0f25e0d45fc8a4027d3828efde/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java#L72-L73 ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2976252279 From coleenp at openjdk.org Mon Jun 16 11:55:37 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Mon, 16 Jun 2025 11:55:37 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: <7PVLavPiPg-GzXoFHJ1FEP2DY-0OvHDKSSLGlU0hUYU=.c4d529c9-5163-415c-ae4b-66a5cf83ea5b@github.com> On Fri, 13 Jun 2025 15:56:45 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 3318: >> >>> 3316: >>> 3317: // reserved for future use >>> 3318: else if (frame_type >= 128 && frame_type <= 245) { >> >> This is beyond the scope of your fix but I think we should have an enum for the frame types here just like in stackMapTable.cpp. > > I agree. I'll have a look at fixing that in mainline first. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1487#discussion_r2149778440 From thartmann at openjdk.org Mon Jun 16 11:55:37 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 16 Jun 2025 11:55:37 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue In-Reply-To: References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Fri, 13 Jun 2025 23:52:34 GMT, Quan Anh Mai wrote: > For test84, I think an allocation is still necessary for the return value, so I remove that IR condition. But that should only be needed if `InlineTypeReturnedAsFields` is turned off, right? Can we restrict the IR rule accordingly? ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2976268063 From dfenacci at openjdk.org Mon Jun 16 11:58:49 2025 From: dfenacci at openjdk.org (Damon Fenacci) Date: Mon, 16 Jun 2025 11:58:49 GMT Subject: [lworld] Integrated: 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 In-Reply-To: References: Message-ID: On Fri, 13 Jun 2025 13:29:05 GMT, Damon Fenacci wrote: > Re-activating the IR check removed in [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) as `compiler/gcbarriers/TestZGCUnrolling.java` is not failing anymore. > > Testing: Tier1-3 This pull request has now been integrated. Changeset: 9c01e842 Author: Damon Fenacci Committer: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/9c01e8429221581b26a19491fa9cdca2f9c8177b Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8331551: [lworld] compiler/gcbarriers/TestZGCUnrolling.java fails after merging jdk-23+6 Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1488 From qamai at openjdk.org Mon Jun 16 12:46:24 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Mon, 16 Jun 2025 12:46:24 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v4] In-Reply-To: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: <-CLEMgcWQqt-XDleIcSVmlguUqQwI7iZo8ztxRC6JZE=.e1bbd9be-01b6-43e0-a5e6-f4d21324412f@github.com> > Hi, > > This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. > > Please kindly review, thanks very much. Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: remove -DeoptimizeALot ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1482/files - new: https://git.openjdk.org/valhalla/pull/1482/files/cf137ea9..74378233 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1482&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1482.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1482/head:pull/1482 PR: https://git.openjdk.org/valhalla/pull/1482 From qamai at openjdk.org Mon Jun 16 12:46:25 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Mon, 16 Jun 2025 12:46:25 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v3] In-Reply-To: References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Mon, 16 Jun 2025 11:49:53 GMT, Tobias Hartmann wrote: > Thanks for investigating! What about this one? Ah yes I missed that, removed! > But that should only be needed if `InlineTypeReturnedAsFields` is turned off, right? Can we restrict the IR rule accordingly? Unfortunately `MyValue1` has 15 GPR fields so I don't think it can be returned as fields. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2976515008 From thartmann at openjdk.org Mon Jun 16 14:40:45 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 16 Jun 2025 14:40:45 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v3] In-Reply-To: References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> Message-ID: On Mon, 16 Jun 2025 12:43:00 GMT, Quan Anh Mai wrote: > Unfortunately MyValue1 has 15 GPR fields so I don't think it can be returned as fields. Ah, make sense! Thanks. I'll re-run testing. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2976919992 From thartmann at openjdk.org Mon Jun 16 14:49:42 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 16 Jun 2025 14:49:42 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert In-Reply-To: References: Message-ID: On Fri, 13 Jun 2025 22:53:32 GMT, Quan Anh Mai wrote: > Hi, > > The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. > > Please take a look and share your thoughts, thanks very much. Thanks for working on this Quan-Anh! `compiler/c2/TestDeadLoopSplitIfLoop.java` now fails with `-XX:-EnableValhalla`: # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/open/src/hotspot/share/opto/phaseX.cpp:784), pid=1729076, tid=1729093 # assert(no_dead_loop) failed: dead loop detected # # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-06-16-1157190.tobias.hartmann.valhalla2) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-06-16-1157190.tobias.hartmann.valhalla2, compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x184ec45] PhaseGVN::dead_loop_check(Node*) [clone .part.0]+0x1d5 Current CompileTask: C2:309 14 b compiler.c2.TestDeadLoopSplitIfLoop::test (88 bytes) Stack: [0x00007f1323dff000,0x00007f1323eff000], sp=0x00007f1323efa0e0, free space=1004k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x184ec45] PhaseGVN::dead_loop_check(Node*) [clone .part.0]+0x1d5 (phaseX.cpp:784) V [libjvm.so+0x185fe39] PhaseIterGVN::transform_old(Node*)+0x529 (phaseX.cpp:767) V [libjvm.so+0x1854c54] PhaseIterGVN::optimize()+0xb4 (phaseX.cpp:1054) V [libjvm.so+0xb54796] Compile::Optimize()+0x326 (compile.cpp:2779) V [libjvm.so+0xb583bf] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1fef (compile.cpp:874) V [libjvm.so+0x96de34] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x484 (c2compiler.cpp:142) V [libjvm.so+0xb66078] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58 (compileBroker.cpp:2307) V [libjvm.so+0xb67238] CompileBroker::compiler_thread_loop()+0x568 (compileBroker.cpp:1951) V [libjvm.so+0x10e17fb] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:774) V [libjvm.so+0x1b5b146] Thread::call_run()+0xb6 (thread.cpp:231) V [libjvm.so+0x17c6e38] thread_native_entry(Thread*)+0x128 (os_linux.cpp:875) src/hotspot/share/opto/cfgnode.cpp line 1604: > 1602: Node* phi_in = current->in(i); > 1603: if (phi_in->is_Phi()) { > 1604: visited.append_if_missing(phi_in->as_Phi()); Would a `Unique_Node_List` be more appropriate here? ------------- PR Review: https://git.openjdk.org/valhalla/pull/1489#pullrequestreview-2932445271 PR Review Comment: https://git.openjdk.org/valhalla/pull/1489#discussion_r2150199110 From matsaave at openjdk.org Mon Jun 16 16:08:43 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Mon, 16 Jun 2025 16:08:43 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. LGTM! Thanks for catching this ------------- Marked as reviewed by matsaave (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1487#pullrequestreview-2932722308 From qamai at openjdk.org Mon Jun 16 17:45:56 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Mon, 16 Jun 2025 17:45:56 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v2] In-Reply-To: References: Message-ID: > Hi, > > The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. > > Please take a look and share your thoughts, thanks very much. Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: fix dead loop ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1489/files - new: https://git.openjdk.org/valhalla/pull/1489/files/422301be..67f5c154 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1489&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1489&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1489.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1489/head:pull/1489 PR: https://git.openjdk.org/valhalla/pull/1489 From qamai at openjdk.org Mon Jun 16 17:50:43 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Mon, 16 Jun 2025 17:50:43 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v2] In-Reply-To: References: Message-ID: <1cQLkOxrtCkTo2Pw4SUMBi4XOXq6y995BvXPWEeJ-nI=.5ee40e62-ac94-4277-82f6-78129e951817@github.com> On Mon, 16 Jun 2025 14:46:54 GMT, Tobias Hartmann wrote: >> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: >> >> fix dead loop > > src/hotspot/share/opto/cfgnode.cpp line 1604: > >> 1602: Node* phi_in = current->in(i); >> 1603: if (phi_in->is_Phi()) { >> 1604: visited.append_if_missing(phi_in->as_Phi()); > > Would a `Unique_Node_List` be more appropriate here? `Unique_Node_List` cannot work with `const Node*` so `GrowableArray` is the only option here. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1489#discussion_r2150534984 From qamai at openjdk.org Mon Jun 16 18:06:44 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Mon, 16 Jun 2025 18:06:44 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jun 2025 17:45:56 GMT, Quan Anh Mai wrote: >> Hi, >> >> The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. >> >> Please take a look and share your thoughts, thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > fix dead loop Thanks for your testing, the failure is due to the fact that when traversing the `Phi` inputs, I decided to skip dead inputs. This may lead to a case like an iv with a dead backedge: `Phi = Phi + 1`. However, since the backedge is dead, the function only finds the entry node, leading to `entry = entry + 1`. I fixed this by traversing all the inputs instead of only the live ones. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1489#issuecomment-2977545145 From heidinga at openjdk.org Mon Jun 16 20:35:48 2025 From: heidinga at openjdk.org (Dan Heidinga) Date: Mon, 16 Jun 2025 20:35:48 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: <6vwGFzs7CQprKknPcRPx9DSi5rAE0tsnQ3lx7s8c8I8=.e0fd689a-43bf-48da-ab9a-c3f2f998440f@github.com> On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. Lgtm ------------- Marked as reviewed by heidinga (no project role). PR Review: https://git.openjdk.org/valhalla/pull/1487#pullrequestreview-2933424280 From coleenp at openjdk.org Mon Jun 16 20:35:48 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Mon, 16 Jun 2025 20:35:48 GMT Subject: [lworld] RFR: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: <5Hie9ii2I5ZJQAPYIzrCp0rk8X39bGrUEEaWA1SxN9M=.425aeca9-ac71-4d6c-869d-48cf5f36909f@github.com> On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. Thanks Matias and Dan. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1487#issuecomment-2978036354 From coleenp at openjdk.org Mon Jun 16 20:35:49 2025 From: coleenp at openjdk.org (Coleen Phillimore) Date: Mon, 16 Jun 2025 20:35:49 GMT Subject: [lworld] Integrated: 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition In-Reply-To: References: Message-ID: On Thu, 12 Jun 2025 17:19:25 GMT, Coleen Phillimore wrote: > Need to write a test. This pull request has now been integrated. Changeset: cab7c4bd Author: Coleen Phillimore URL: https://git.openjdk.org/valhalla/commit/cab7c4bdbf91a58c22b2d42f7ccd805238c349e4 Stats: 251 lines in 5 files changed: 248 ins; 1 del; 2 mod 8359377: [lworld] Fix cp indexes in larval stackmaps in redefinition Reviewed-by: matsaave, heidinga ------------- PR: https://git.openjdk.org/valhalla/pull/1487 From qamai at openjdk.org Tue Jun 17 04:01:24 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 17 Jun 2025 04:01:24 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v3] In-Reply-To: References: Message-ID: > Hi, > > The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. > > Please take a look and share your thoughts, thanks very much. Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: use Unique_Node_List ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1489/files - new: https://git.openjdk.org/valhalla/pull/1489/files/67f5c154..c5071cdb Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1489&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1489&range=01-02 Stats: 7 lines in 2 files changed: 0 ins; 1 del; 6 mod Patch: https://git.openjdk.org/valhalla/pull/1489.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1489/head:pull/1489 PR: https://git.openjdk.org/valhalla/pull/1489 From qamai at openjdk.org Tue Jun 17 04:01:25 2025 From: qamai at openjdk.org (Quan Anh Mai) Date: Tue, 17 Jun 2025 04:01:25 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v3] In-Reply-To: <1cQLkOxrtCkTo2Pw4SUMBi4XOXq6y995BvXPWEeJ-nI=.5ee40e62-ac94-4277-82f6-78129e951817@github.com> References: <1cQLkOxrtCkTo2Pw4SUMBi4XOXq6y995BvXPWEeJ-nI=.5ee40e62-ac94-4277-82f6-78129e951817@github.com> Message-ID: On Mon, 16 Jun 2025 17:48:26 GMT, Quan Anh Mai wrote: >> src/hotspot/share/opto/cfgnode.cpp line 1604: >> >>> 1602: Node* phi_in = current->in(i); >>> 1603: if (phi_in->is_Phi()) { >>> 1604: visited.append_if_missing(phi_in->as_Phi()); >> >> Would a `Unique_Node_List` be more appropriate here? > > `Unique_Node_List` cannot work with `const Node*` so `GrowableArray` is the only option here. Update: Changed it to a `Unique_Node_List`. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1489#discussion_r2151268510 From duke at openjdk.org Tue Jun 17 04:04:42 2025 From: duke at openjdk.org (duke) Date: Tue, 17 Jun 2025 04:04:42 GMT Subject: [lworld] Withdrawn: 8355227: [lworld] Clarify preview API status for some valhalla APIs In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 21:19:21 GMT, Chen Liang wrote: > Per [JEP 12](https://openjdk.org/jeps/12): > >> In order for frameworks to deliver early support for a preview language feature, frameworks should utilize the reflective preview APIs that are co-developed with it. This will allow frameworks to keep up when programs are written to use the permanent version of the language feature. > > According to these rules, the `Objects` methods and the `IdentityException` class themselves must be reflective preview APIs: programs compiled without preview feature dependencies that are running with preview features enabled should be able to access these APIs, as at run-time, they may receive value objects and `IdentityException` thrown by the JVM. > > The only remaining essential preview APIs are the constructors of `IdentityException`: non-preview programs have no reason to construct them. > > In addition, fixed a few JEP feature reference: notably, add reference to [Strict Fields JEP](https://openjdk.org/jeps/8350458). > > Also, made ClassFile API new models reflective preview APIs - class file processors wish to process structures from preview class files even if the current runtime is not in preview. This is already happening to javac and javap. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/valhalla/pull/1439 From thartmann at openjdk.org Tue Jun 17 06:03:42 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 17 Jun 2025 06:03:42 GMT Subject: [lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v4] In-Reply-To: <-CLEMgcWQqt-XDleIcSVmlguUqQwI7iZo8ztxRC6JZE=.e1bbd9be-01b6-43e0-a5e6-f4d21324412f@github.com> References: <7fCHBFnGicE_vQdt8tLxvTQ5ShjPURocDRUMoQ_yx68=.3f013756-798c-413f-92d2-29b75d5c9206@github.com> <-CLEMgcWQqt-XDleIcSVmlguUqQwI7iZo8ztxRC6JZE=.e1bbd9be-01b6-43e0-a5e6-f4d21324412f@github.com> Message-ID: On Mon, 16 Jun 2025 12:46:24 GMT, Quan Anh Mai wrote: >> Hi, >> >> This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`. >> >> Please kindly review, thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > remove -DeoptimizeALot Testing looks good now except for one last failure with `compiler/valhalla/inlinetypes/TestIntrinsics.java` and `-XX:Tier0BackedgeNotifyFreqLog=0 -XX:Tier2BackedgeNotifyFreqLog=0 -XX:Tier3BackedgeNotifyFreqLog=0 -XX:Tier2BackEdgeThreshold=1 -XX:Tier3BackEdgeThreshold=1 -XX:Tier4BackEdgeThreshold=1 -Xbatch`: # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S509733/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d98a4bd7-58a9-4f29-b8d0-431bc28dcc7e/runs/a5899c58-42e7-464d-909b-9619da50104d/workspace/open/src/hotspot/share/prims/unsafe.cpp:256), pid=2121432, tid=2121433 # assert(_obj == nullptr || !_obj->is_inline_type() || _obj->mark().is_larval_state()) failed: must be an object instance or a larval inline type # # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-06-16-1439046.tobias.hartmann.valhalla2) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-06-16-1439046.tobias.hartmann.valhalla2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x1bbe2be] Unsafe_PutInt+0x28e Stack: [0x00007ff7140b4000,0x00007ff7141b5000], sp=0x00007ff7141b33b0, free space=1020k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1bbe2be] Unsafe_PutInt+0x28e (unsafe.cpp:256) J 3090 jdk.internal.misc.Unsafe.putInt(Ljava/lang/Object;JI)V java.base at 25-lworld5ea (0 bytes) @ 0x00007ff6fc8582c4 [0x00007ff6fc858220+0x00000000000000a4] j compiler.valhalla.inlinetypes.TestIntrinsics.test84(Lcompiler/valhalla/inlinetypes/MyValue1;)Lcompiler/valhalla/inlinetypes/MyValue1;+46 j compiler.valhalla.inlinetypes.TestIntrinsics.test84_verifier()V+16 J 3280 c2 java.lang.invoke.LambdaForm$DMH+0x000000002e091000.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)V java.base at 25-lworld5ea (14 bytes) @ 0x00007ff6fc883fe0 [0x00007ff6fc883fa0+0x0000000000000040] j java.lang.invoke.LambdaForm$MH+0x000000002e105800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+35 java.base at 25-lworld5ea J 3271 c2 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base at 25-lworld5ea (92 bytes) @ 0x00007ff6fc881c80 [0x00007ff6fc881ba0+0x00000000000000e0] j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base at 25-lworld5ea j compiler.lib.ir_framework.test.CustomRunTest.invokeTest()V+49 J 3044 c2 compiler.lib.ir_framework.test.AbstractTest.run()V (41 bytes) @ 0x00007ff6fc846620 [0x00007ff6fc8465a0+0x0000000000000080] J 3052% c2 compiler.lib.ir_framework.test.TestVM.runTests()V (535 bytes) @ 0x00007ff6fc84afdc [0x00007ff6fc84af20+0x00000000000000bc] j compiler.lib.ir_framework.test.TestVM.start()V+9 j compiler.lib.ir_framework.test.TestVM.main([Ljava/lang/String;)V+38 v ~StubRoutines::call_stub 0x00007ff6fbd18001 V [libjvm.so+0x10a5728] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x508 (javaCalls.cpp:429) V [libjvm.so+0x12037c0] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x420 (jni.cpp:887) V [libjvm.so+0x12077b4] jni_CallStaticVoidMethod+0x214 (jni.cpp:1746) C [libjli.so+0x3b9a] invokeStaticMainWithArgs+0x4a (java.c:392) C [libjli.so+0x4c78] JavaMain+0xf08 (java.c:640) C [libjli.so+0x8019] ThreadJavaMain+0x9 (java_md.c:646) Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 3090 jdk.internal.misc.Unsafe.putInt(Ljava/lang/Object;JI)V java.base at 25-lworld5ea (0 bytes) @ 0x00007ff6fc858292 [0x00007ff6fc858220+0x0000000000000072] j compiler.valhalla.inlinetypes.TestIntrinsics.test84(Lcompiler/valhalla/inlinetypes/MyValue1;)Lcompiler/valhalla/inlinetypes/MyValue1;+46 j compiler.valhalla.inlinetypes.TestIntrinsics.test84_verifier()V+16 J 3280 c2 java.lang.invoke.LambdaForm$DMH+0x000000002e091000.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)V java.base at 25-lworld5ea (14 bytes) @ 0x00007ff6fc883fe0 [0x00007ff6fc883fa0+0x0000000000000040] j java.lang.invoke.LambdaForm$MH+0x000000002e105800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+35 java.base at 25-lworld5ea J 3271 c2 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base at 25-lworld5ea (92 bytes) @ 0x00007ff6fc881c80 [0x00007ff6fc881ba0+0x00000000000000e0] j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base at 25-lworld5ea j compiler.lib.ir_framework.test.CustomRunTest.invokeTest()V+49 J 3044 c2 compiler.lib.ir_framework.test.AbstractTest.run()V (41 bytes) @ 0x00007ff6fc846620 [0x00007ff6fc8465a0+0x0000000000000080] J 3052% c2 compiler.lib.ir_framework.test.TestVM.runTests()V (535 bytes) @ 0x00007ff6fc84afdc [0x00007ff6fc84af20+0x00000000000000bc] j compiler.lib.ir_framework.test.TestVM.start()V+9 j compiler.lib.ir_framework.test.TestVM.main([Ljava/lang/String;)V+38 v ~StubRoutines::call_stub 0x00007ff6fbd18001 ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2979048975 From tobias.hartmann at oracle.com Tue Jun 17 13:20:03 2025 From: tobias.hartmann at oracle.com (Tobias Hartmann) Date: Tue, 17 Jun 2025 15:20:03 +0200 Subject: =?UTF-8?Q?Result=3A_New_Valhalla_Committer=3A_Qu=C3=A2n-Anh_Mai?= Message-ID: Voting [1] for Qu?n-Anh Mai [2] is now closed. Yes: 8 Veto: 0 Abstain: 0 According to the bylaw's definition of Lazy Consensus [3], this is sufficient to approve the nomination. Thanks, Tobias [1] https://mail.openjdk.org/pipermail/valhalla-dev/2025-June/014355.html [2] https://openjdk.org/census#qamai [3] https://openjdk.org/bylaws#lazy-consensus From thartmann at openjdk.org Wed Jun 18 09:07:59 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 18 Jun 2025 09:07:59 GMT Subject: [lworld] RFR: 8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert [v3] In-Reply-To: References: Message-ID: <0kpykhWP7GwAT0VQwN_t4WCLkBJCBsSH_3AhR8oo6kU=.b75feff8-333c-42b7-aad0-92da831e806c@github.com> On Tue, 17 Jun 2025 04:01:24 GMT, Quan Anh Mai wrote: >> Hi, >> >> The issue here is that the IGVN cannot deduce that the `IsBuffered` input is a constant 1. This is because after the `InlineTypeNode` is pushed down through a `Phi` cluster, the `IsBuffered` input is a `Phi` cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for a `PhiNode` to look through its `Phi` inputs to discover the unique non-phi input of a `Phi` cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass. >> >> Please take a look and share your thoughts, thanks very much. > > Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision: > > use Unique_Node_List Looks good to me! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1489#pullrequestreview-2938375551 From duke at openjdk.org Wed Jun 18 16:43:47 2025 From: duke at openjdk.org (ExE Boss) Date: Wed, 18 Jun 2025 16:43:47 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v8] In-Reply-To: References: Message-ID: On Thu, 29 May 2025 19:48:45 GMT, Roger Riggs wrote: >> Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently. >> Simplified WeakHashMap javadoc updates for IdentityException. >> Added note to System.identityHashCode to include value objects. >> Added to class javadoc for IdentityHashMap for value objects. > > Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: > > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge > - Expand javadoc reference to Reference > - Merge remote-tracking branch 'refs/remotes/origin/8346307-throws-identityexception' into 8346307-throws-identityexception > - Merge branch 'openjdk:lworld' into 8346307-throws-identityexception > - ... and 2 more: https://git.openjdk.org/valhalla/compare/be146831...b6cd55b5 This is?still incorrect: ------------- PR Review: https://git.openjdk.org/valhalla/pull/1327#pullrequestreview-2937562632 From duke at openjdk.org Wed Jun 18 16:43:47 2025 From: duke at openjdk.org (ExE Boss) Date: Wed, 18 Jun 2025 16:43:47 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v4] In-Reply-To: References: Message-ID: On Wed, 19 Feb 2025 19:42:36 GMT, Roger Riggs wrote: >> Indeed, this API is returning `false` for interfaces and primitive types if preview features are not enabled, which is wrong. Making it simply return `!isIdentity()` may be better and conforms to the javadoc specification here. See https://github.com/openjdk/valhalla/blob/991ec927a2a111e5021b12be3413dfc96efbc74a/src/hotspot/share/prims/jvm.cpp#L1333-L1337 > > Corrected in 68dd3fb675d0f87da8de2bc7525d5bcc2a87dac1 Suggestion: return !isIdentity(); ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1327#discussion_r2153517423 From rriggs at openjdk.org Fri Jun 20 20:37:43 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 20 Jun 2025 20:37:43 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v8] In-Reply-To: References: Message-ID: On Wed, 18 Jun 2025 16:41:11 GMT, ExE Boss wrote: > This is still incorrect: Unless Preview is enabled, there is no such thing as a value class (according to the spec). Until JEP 401 is enabled, all classes are identity classes. So it would be incorrect to report that primitive classes, interfaces, and void.class are value classes. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1327#issuecomment-2992715312 From mchevalier at openjdk.org Tue Jun 24 08:23:19 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Tue, 24 Jun 2025 08:23:19 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull Message-ID: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. ------------- Commit messages: - Rename InlineTypeNode::IsInit to NullMarker, hopefully with helpful comment Changes: https://git.openjdk.org/valhalla/pull/1491/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1491&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8339481 Stats: 14 lines in 2 files changed: 3 ins; 0 del; 11 mod Patch: https://git.openjdk.org/valhalla/pull/1491.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1491/head:pull/1491 PR: https://git.openjdk.org/valhalla/pull/1491 From thartmann at openjdk.org Tue Jun 24 11:49:41 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 24 Jun 2025 11:49:41 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull In-Reply-To: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Mon, 23 Jun 2025 12:42:06 GMT, Marc Chevalier wrote: > Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. Thanks for working on this, Marc! There are some more places that need re-naming, for example: Getter/setter methods, `ObjectValue::_is_init`, code in `PhaseOutput::FillLocArray`, code in `Deoptimization::realloc_objects`, code in `StackValue::create_stack_value`. Also, all the occurrences of `is_init` in inlinetypenode.hpp/cpp. src/hotspot/share/opto/inlinetypenode.hpp line 111: > 109: Node* get_oop() const { return in(Oop); } > 110: void set_oop(PhaseGVN& gvn, Node* oop) { set_req_X(Oop, oop, &gvn); } > 111: Node* get_is_init() const { return in(NullMarker); } The method names need a re-naming as well. ------------- Changes requested by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1491#pullrequestreview-2953432330 PR Review Comment: https://git.openjdk.org/valhalla/pull/1491#discussion_r2163734572 From mchevalier at openjdk.org Tue Jun 24 16:08:58 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Tue, 24 Jun 2025 16:08:58 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v2] In-Reply-To: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: <0aY_qTRHEbaDJzX_tALf2ojkiMJm0540TzUebCZ8gcs=.08b72e96-ba72-4afd-9d53-515846402c73@github.com> > Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: More rename ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1491/files - new: https://git.openjdk.org/valhalla/pull/1491/files/86c55aa6..f9d4baaf Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1491&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1491&range=00-01 Stats: 95 lines in 15 files changed: 0 ins; 0 del; 95 mod Patch: https://git.openjdk.org/valhalla/pull/1491.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1491/head:pull/1491 PR: https://git.openjdk.org/valhalla/pull/1491 From mchevalier at openjdk.org Tue Jun 24 16:08:58 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Tue, 24 Jun 2025 16:08:58 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull In-Reply-To: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Mon, 23 Jun 2025 12:42:06 GMT, Marc Chevalier wrote: > Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. I've changed a lot, as suggested, and based on my shallow knowledge of Valhalla, I can say some makes sense, but I'm not sure everything is the right kind of "is_init". Testing seems ok. At least, it compiles! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1491#issuecomment-3001082521 From pedro.lamarao at prodist.com.br Tue Jun 24 17:08:28 2025 From: pedro.lamarao at prodist.com.br (=?UTF-8?Q?Pedro_Lamar=C3=A3o?=) Date: Tue, 24 Jun 2025 14:08:28 -0300 Subject: Compilation failure with clang 20 Message-ID: Hello all, Thanks for your hard work on this project! I am posting here because the issue tracker in Github is disabled and I am unsure where else to post such issues. I am seeing a compilation failure with current HEAD and clang 20, three instances of the same complaint: * For target hotspot_variant-server_libjvm_objs_resolvedMethodEntry.o: /home/centos/valhalla/src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedMethodEntry' [-Werror,-Wnontrivial-memcall] 43 | memset(this, 0, sizeof(*this)); | ^ /home/centos/valhalla/src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: note: explicitly cast the pointer to silence this warning 43 | memset(this, 0, sizeof(*this)); | ^ | (void*) Taking a quick look at the declaration for ResolvedMethodEntry, it seems to me that it could be made trivially copyable by defining copy constructor and copy assignment = default. I suppose the compiler considers this in principle to invoke undefined behaviour. git HEAD: commit cab7c4bdbf91a58c22b2d42f7ccd805238c349e4 BuIld configuration: Configuration summary: * Name: linux-x86_64-server-release * Debug level: release * HS debug level: product * JVM variants: server * JVM features: server: 'cds compiler1 compiler2 epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc' * OpenJDK target: OS: linux, CPU architecture: x86, address length: 64 * Version string: 25-internal-adhoc.centos.valhalla (25-internal) * Source date: 1740061836 (2025-02-20T14:30:36Z) Tools summary: * Boot JDK: openjdk version "24" 2025-03-18 OpenJDK Runtime Environment (build 24+36-3646) OpenJDK 64-Bit Server VM (build 24+36-3646, mixed mode, sharing) (at /home/centos/jdk-24) * Toolchain: clang (clang/LLVM) * C Compiler: Version 20.1.2 (at /usr/bin/clang) * C++ Compiler: Version 20.1.2 (at /usr/bin/clang++) Build performance summary: * Build jobs: 15 * Memory limit: 15861 MB -- Pedro Lamar?o -------------- next part -------------- An HTML attachment was scrubbed... URL: From thartmann at openjdk.org Wed Jun 25 10:47:42 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 25 Jun 2025 10:47:42 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v2] In-Reply-To: <0aY_qTRHEbaDJzX_tALf2ojkiMJm0540TzUebCZ8gcs=.08b72e96-ba72-4afd-9d53-515846402c73@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> <0aY_qTRHEbaDJzX_tALf2ojkiMJm0540TzUebCZ8gcs=.08b72e96-ba72-4afd-9d53-515846402c73@github.com> Message-ID: On Tue, 24 Jun 2025 16:08:58 GMT, Marc Chevalier wrote: >> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. > > Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: > > More rename Thanks Marc. The additional changes look good but I found some more places that need adjustment. Search for `IsInit`, all occurrences need to be adjusted. I think they can simply be replaced by `null marker`. src/hotspot/share/opto/inlinetypenode.hpp line 51: > 49: Oop, // Oop to heap allocated buffer. > 50: IsBuffered, // True if inline type is heap allocated (or nullptr), false otherwise. > 51: NullMarker, // Needs to be checked for nullptr before using the field values. Suggestion: NullMarker, // Needs to be checked before using the field values. ------------- Changes requested by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1491#pullrequestreview-2956890512 PR Review Comment: https://git.openjdk.org/valhalla/pull/1491#discussion_r2165951948 From mchevalier at openjdk.org Wed Jun 25 11:51:01 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Wed, 25 Jun 2025 11:51:01 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v3] In-Reply-To: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: > Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: Forgot the comments... ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1491/files - new: https://git.openjdk.org/valhalla/pull/1491/files/f9d4baaf..8c959a80 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1491&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1491&range=01-02 Stats: 25 lines in 16 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.org/valhalla/pull/1491.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1491/head:pull/1491 PR: https://git.openjdk.org/valhalla/pull/1491 From mchevalier at openjdk.org Wed Jun 25 11:53:43 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Wed, 25 Jun 2025 11:53:43 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v2] In-Reply-To: <0aY_qTRHEbaDJzX_tALf2ojkiMJm0540TzUebCZ8gcs=.08b72e96-ba72-4afd-9d53-515846402c73@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> <0aY_qTRHEbaDJzX_tALf2ojkiMJm0540TzUebCZ8gcs=.08b72e96-ba72-4afd-9d53-515846402c73@github.com> Message-ID: On Tue, 24 Jun 2025 16:08:58 GMT, Marc Chevalier wrote: >> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. > > Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: > > More rename Not sure how one want to use "null marker" grammatically, so I tried what seemed right to me. As it's less said as a programming constant, and more as a normal noun (or nominal group or...), I've tried adjustments. Let me know if some sound wrong. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1491#issuecomment-3004488097 From thartmann at openjdk.org Wed Jun 25 13:20:48 2025 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 25 Jun 2025 13:20:48 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v3] In-Reply-To: References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Wed, 25 Jun 2025 11:51:01 GMT, Marc Chevalier wrote: >> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. > > Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: > > Forgot the comments... Thanks Marc. That looks good to me. Ship it! ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1491#pullrequestreview-2958124781 From mchevalier at openjdk.org Wed Jun 25 13:29:36 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Wed, 25 Jun 2025 13:29:36 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v3] In-Reply-To: References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Wed, 25 Jun 2025 11:51:01 GMT, Marc Chevalier wrote: >> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. > > Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: > > Forgot the comments... Thanks @TobiHartmann! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1491#issuecomment-3004768052 From duke at openjdk.org Wed Jun 25 13:29:36 2025 From: duke at openjdk.org (duke) Date: Wed, 25 Jun 2025 13:29:36 GMT Subject: [lworld] RFR: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull [v3] In-Reply-To: References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Wed, 25 Jun 2025 11:51:01 GMT, Marc Chevalier wrote: >> Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. > > Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision: > > Forgot the comments... @marc-chevalier Your change (at version 8c959a801078afa772c1389a607649d97ef6d272) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1491#issuecomment-3004772466 From mchevalier at openjdk.org Wed Jun 25 14:37:44 2025 From: mchevalier at openjdk.org (Marc Chevalier) Date: Wed, 25 Jun 2025 14:37:44 GMT Subject: [lworld] Integrated: 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull In-Reply-To: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> References: <5bgGu8XZg04HTc-1vGXvpWFL9nYd55dhbGBTzPoqGWI=.a76a8a6b-654c-4615-aecf-61831b37fe6e@github.com> Message-ID: On Mon, 23 Jun 2025 12:42:06 GMT, Marc Chevalier wrote: > Picked the proposed name I found the most fitting. Added a comment to address the concern in the issue. This pull request has now been integrated. Changeset: 81fbc414 Author: Marc Chevalier Committer: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/81fbc4147fe1184dc870208b8d73b6c057861119 Stats: 127 lines in 23 files changed: 3 ins; 0 del; 124 mod 8339481: [lworld] C2: Rename InlineTypeNode::IsInit to NotNull Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1491 From matsaave at openjdk.org Wed Jun 25 17:17:55 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 25 Jun 2025 17:17:55 GMT Subject: [lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute Message-ID: When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests. ------------- Commit messages: - 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute Changes: https://git.openjdk.org/valhalla/pull/1492/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1492&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8360530 Stats: 52 lines in 3 files changed: 50 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1492.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/valhalla/pull/1492 From fparain at openjdk.org Wed Jun 25 19:15:35 2025 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 25 Jun 2025 19:15:35 GMT Subject: [lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 15:52:49 GMT, Matias Saavedra Silva wrote: > When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests. LGTM. Thank you for the additional log messages. ------------- Marked as reviewed by fparain (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1492#pullrequestreview-2959361250 From matsaave at openjdk.org Wed Jun 25 20:41:04 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 25 Jun 2025 20:41:04 GMT Subject: [lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute [v2] In-Reply-To: References: Message-ID: > When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests. Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: Fix copyright ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1492/files - new: https://git.openjdk.org/valhalla/pull/1492/files/39b3be9a..698796ad Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1492&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1492&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1492.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/valhalla/pull/1492 From liach at openjdk.org Wed Jun 25 20:46:40 2025 From: liach at openjdk.org (Chen Liang) Date: Wed, 25 Jun 2025 20:46:40 GMT Subject: [lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 20:41:04 GMT, Matias Saavedra Silva wrote: >> When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests. > > Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: > > Fix copyright Marked as reviewed by liach (Committer). ------------- PR Review: https://git.openjdk.org/valhalla/pull/1492#pullrequestreview-2959608974 From rriggs at openjdk.org Wed Jun 25 22:05:56 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 25 Jun 2025 22:05:56 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v9] In-Reply-To: References: Message-ID: > Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently. > Simplified WeakHashMap javadoc updates for IdentityException. > Added note to System.identityHashCode to include value objects. > Added to class javadoc for IdentityHashMap for value objects. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: - A few editorial changes Highlight that in preview-mode, Objects can have either identity or value subclasses. - Merge branch 'lworld' into 8346307-throws-identityexception - Merge branch 'lworld' into 8346307-throws-identityexception - "value interface" is a left over from an earlier design and is not allowed by the JEP 401 JLS. An interface will never have the ACC_IDENTITY modifier, hence 'isValue()' will be true but is not significant. Class.toGenericString() should only include the "value" prefix for record and regular classes. Correct the test to match the toGenericString() output. - Merge branch 'lworld' into 8346307-throws-identityexception - Merge branch 'lworld' into 8346307-throws-identityexception - Merge - Merge branch 'lworld' into 8346307-throws-identityexception - Merge branch 'lworld' into 8346307-throws-identityexception - Merge branch 'lworld' into 8346307-throws-identityexception - ... and 6 more: https://git.openjdk.org/valhalla/compare/81fbc414...6cbade17 ------------- Changes: https://git.openjdk.org/valhalla/pull/1327/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1327&range=08 Stats: 266 lines in 12 files changed: 204 ins; 17 del; 45 mod Patch: https://git.openjdk.org/valhalla/pull/1327.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1327/head:pull/1327 PR: https://git.openjdk.org/valhalla/pull/1327 From liach at openjdk.org Wed Jun 25 22:37:44 2025 From: liach at openjdk.org (Chen Liang) Date: Wed, 25 Jun 2025 22:37:44 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v9] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 22:05:56 GMT, Roger Riggs wrote: >> Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently. >> Simplified WeakHashMap javadoc updates for IdentityException. >> Added note to System.identityHashCode to include value objects. >> Added to class javadoc for IdentityHashMap for value objects. > > Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: > > - A few editorial changes > Highlight that in preview-mode, Objects can have either identity or value subclasses. > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - "value interface" is a left over from an earlier design and is not allowed by the JEP 401 JLS. > An interface will never have the ACC_IDENTITY modifier, hence 'isValue()' will be true but is not significant. > Class.toGenericString() should only include the "value" prefix for record and regular classes. > Correct the test to match the toGenericString() output. > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - ... and 6 more: https://git.openjdk.org/valhalla/compare/81fbc414...6cbade17 We should document explicitly that all classes, including primitives and void, are considered identity when preview features are not enabled. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1327#issuecomment-3006435915 From rriggs at openjdk.org Thu Jun 26 16:52:43 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 26 Jun 2025 16:52:43 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v9] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 22:34:51 GMT, Chen Liang wrote: > We should document explicitly that all classes, including primitives and void, are considered identity when preview features are not enabled. Primitives and void are not classes and never have identity. The primitive *wrappers* and Void *are* classes have identity if that's what you're meaning. Interface classes never have identity (do not have ACC_SUPER/ACC_IDENTITY). Interface classes with --enable-preview are reported as value classes. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1327#issuecomment-3009118676 From duke at openjdk.org Thu Jun 26 17:48:44 2025 From: duke at openjdk.org (ExE Boss) Date: Thu, 26 Jun 2025 17:48:44 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v9] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 22:05:56 GMT, Roger Riggs wrote: >> Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently. >> Simplified WeakHashMap javadoc updates for IdentityException. >> Added note to System.identityHashCode to include value objects. >> Added to class javadoc for IdentityHashMap for value objects. > > Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: > > - A few editorial changes > Highlight that in preview-mode, Objects can have either identity or value subclasses. > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - "value interface" is a left over from an earlier design and is not allowed by the JEP 401 JLS. > An interface will never have the ACC_IDENTITY modifier, hence 'isValue()' will be true but is not significant. > Class.toGenericString() should only include the "value" prefix for record and regular classes. > Correct the test to match the toGenericString() output. > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - Merge branch 'lworld' into 8346307-throws-identityexception > - ... and 6 more: https://git.openjdk.org/valhalla/compare/81fbc414...6cbade17 src/java.base/share/classes/java/lang/System.java line 477: > 475: *
> 476: * The "identity hash code" of a {@linkplain Class#isValue() value object} > 477: * is computed by combining the hash codes of the value object's fields recursively. Doesn?t?this?work by?recursively?calling the?`identityHashCode`?algorithm? Suggestion: * The "identity hash code" of a {@linkplain Class#isValue() value object} * is computed by combining the identity hash codes of the value object's * fields recursively. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1327#discussion_r2169584484 From rriggs at openjdk.org Thu Jun 26 19:34:44 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 26 Jun 2025 19:34:44 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v9] In-Reply-To: References: Message-ID: On Thu, 26 Jun 2025 17:43:52 GMT, ExE Boss wrote: >> Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: >> >> - A few editorial changes >> Highlight that in preview-mode, Objects can have either identity or value subclasses. >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - "value interface" is a left over from an earlier design and is not allowed by the JEP 401 JLS. >> An interface will never have the ACC_IDENTITY modifier, hence 'isValue()' will be true but is not significant. >> Class.toGenericString() should only include the "value" prefix for record and regular classes. >> Correct the test to match the toGenericString() output. >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - Merge >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - Merge branch 'lworld' into 8346307-throws-identityexception >> - ... and 6 more: https://git.openjdk.org/valhalla/compare/81fbc414...6cbade17 > > src/java.base/share/classes/java/lang/System.java line 477: > >> 475: *
>> 476: * The "identity hash code" of a {@linkplain Class#isValue() value object} >> 477: * is computed by combining the hash codes of the value object's fields recursively. > > Doesn?t?this?work by?recursively?calling the?`identityHashCode`?algorithm? > Suggestion: > > * The "identity hash code" of a {@linkplain Class#isValue() value object} > * is computed by combining the identity hash codes of the value object's > * fields recursively. The identity hashcode of an Identity object is not recursive, its just the identity hash code of the object. For value objects, the "recursion" is implied, though repeating it reinforces the concept. The identity hashcode of a field, whose type is a value class, is the combination of the identity hashcodes of its fields. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1327#discussion_r2169820802 From rriggs at openjdk.org Thu Jun 26 19:38:27 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 26 Jun 2025 19:38:27 GMT Subject: [lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v10] In-Reply-To: References: Message-ID: > Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently. > Simplified WeakHashMap javadoc updates for IdentityException. > Added note to System.identityHashCode to include value objects. > Added to class javadoc for IdentityHashMap for value objects. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correctly describe computation of identityHashCode ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1327/files - new: https://git.openjdk.org/valhalla/pull/1327/files/6cbade17..023f4f81 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1327&range=09 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1327&range=08-09 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1327.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1327/head:pull/1327 PR: https://git.openjdk.org/valhalla/pull/1327 From matsaave at openjdk.org Thu Jun 26 20:53:13 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Thu, 26 Jun 2025 20:53:13 GMT Subject: [lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute [v2] In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 19:12:43 GMT, Frederic Parain wrote: >> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix copyright > > LGTM. > Thank you for the additional log messages. Thanks for the review @fparain and @liach ! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1492#issuecomment-3009927485 From matsaave at openjdk.org Thu Jun 26 20:54:48 2025 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Thu, 26 Jun 2025 20:54:48 GMT Subject: [lworld] Integrated: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute In-Reply-To: References: Message-ID: On Wed, 25 Jun 2025 15:52:49 GMT, Matias Saavedra Silva wrote: > When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests. This pull request has now been integrated. Changeset: 051283b6 Author: Matias Saavedra Silva URL: https://git.openjdk.org/valhalla/commit/051283b610d1b49446bb3838e7c4c9d87c8616cd Stats: 53 lines in 3 files changed: 50 ins; 0 del; 3 mod 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute Reviewed-by: fparain, liach ------------- PR: https://git.openjdk.org/valhalla/pull/1492