From dsimms at openjdk.org Thu Feb 2 10:01:21 2023 From: dsimms at openjdk.org (David Simms) Date: Thu, 2 Feb 2023 10:01:21 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Remaining merge issues problem listed: * JDK-8301662 * JDK-8301665 ------------- Commit messages: - Remaining merge issues problem listed: - Merge complete - more - more - Fixed TestGetfieldChains - Removed dead code leftover from c2_MacroAssembler_aarch64.cpp - more fixes - some fixes - First set of fixes, needs much more work - Merge conflict originals - ... and 363 more: https://git.openjdk.org/valhalla/compare/6cd250ff...3c47035b The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=818&range=00.0 - jdk: https://webrevs.openjdk.org/?repo=valhalla&pr=818&range=00.1 Changes: https://git.openjdk.org/valhalla/pull/818/files Stats: 26402 lines in 1393 files changed: 13742 ins; 7412 del; 5248 mod Patch: https://git.openjdk.org/valhalla/pull/818.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/818/head:pull/818 PR: https://git.openjdk.org/valhalla/pull/818 From dsimms at openjdk.org Thu Feb 2 10:13:10 2023 From: dsimms at openjdk.org (David Simms) Date: Thu, 2 Feb 2023 10:13:10 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Remaining merge issues problem listed: > * JDK-8301662 > * JDK-8301665 David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 1480 commits: - Remaining merge issues problem listed: * JDK-8301662 * JDK-8301665 - Merge complete - more - more - Fixed TestGetfieldChains - Removed dead code leftover from c2_MacroAssembler_aarch64.cpp - more fixes - some fixes - First set of fixes, needs much more work - Merge conflict originals - ... and 1470 more: https://git.openjdk.org/valhalla/compare/33f3bd8f...3c47035b ------------- Changes: https://git.openjdk.org/valhalla/pull/818/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=818&range=01 Stats: 200631 lines in 1553 files changed: 191987 ins; 1997 del; 6647 mod Patch: https://git.openjdk.org/valhalla/pull/818.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/818/head:pull/818 PR: https://git.openjdk.org/valhalla/pull/818 From dsimms at openjdk.org Thu Feb 2 10:13:51 2023 From: dsimms at openjdk.org (David Simms) Date: Thu, 2 Feb 2023 10:13:51 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Thu, 2 Feb 2023 09:43:42 GMT, David Simms wrote: > Remaining merge issues problem listed: > * JDK-8301662 > * JDK-8301665 This pull request has now been integrated. Changeset: 256f488b Author: David Simms URL: https://git.openjdk.org/valhalla/commit/256f488b64846e4af2bfa90d436139bda8d0e7aa Stats: 26402 lines in 1393 files changed: 13742 ins; 7412 del; 5248 mod Merge jdk Merge jdk-21+5 Co-authored-by: Roland Westrelin Co-authored-by: Tobias Hartmann ------------- PR: https://git.openjdk.org/valhalla/pull/818 From rriggs at openjdk.org Thu Feb 2 22:32:11 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 2 Feb 2023 22:32:11 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v3] In-Reply-To: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: > Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) > that requests the flags for a specific class file version number. > Update Class.accessFlags() to request the flags for the specific class file format version of the class file. > Update class file format version tests to match. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Ignore unspecified access flag ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/808/files - new: https://git.openjdk.org/valhalla/pull/808/files/41e0abc5..8479e4ee Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/808.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/808/head:pull/808 PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Thu Feb 2 22:34:20 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 2 Feb 2023 22:34:20 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v2] In-Reply-To: References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: On Tue, 20 Dec 2022 21:27:04 GMT, Roger Riggs wrote: >> Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) >> that requests the flags for a specific class file version number. >> Update Class.accessFlags() to request the flags for the specific class file format version of the class file. >> Update class file format version tests to match. > > Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - Update to include text describing access flags as may depend on class file version. > - Merge branch 'lworld' into 8296950-access-flags-cffv > - 8296950: [lworld] AccessFlags should be specific to class file version. > Add java.lang.reflect.AccessFlag.maskToAccessFlags that requests the flags > for a specific class file version number. Please review support for value class access flags of IDENTITY and VALUE and new method to return class file format version specific flags. ------------- PR: https://git.openjdk.org/valhalla/pull/808 From mchung at openjdk.org Thu Feb 2 23:13:34 2023 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 2 Feb 2023 23:13:34 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v3] In-Reply-To: References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: On Thu, 2 Feb 2023 22:32:11 GMT, Roger Riggs wrote: >> Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) >> that requests the flags for a specific class file version number. >> Update Class.accessFlags() to request the flags for the specific class file format version of the class file. >> Update class file format version tests to match. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Ignore unspecified access flag This looks okay. Is there a test to check the access flags on an old class file such that `SUPER` is returned instead of `IDENTITY`? ------------- PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Fri Feb 3 15:28:20 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 3 Feb 2023 15:28:20 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v3] In-Reply-To: References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: On Thu, 2 Feb 2023 23:10:51 GMT, Mandy Chung wrote: > This looks okay. Is there a test to check the access flags on an old class file such that `SUPER` is returned instead of `IDENTITY`? Yes, the change to VersionedLocationsTest does that. ------------- PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Fri Feb 3 15:36:33 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 3 Feb 2023 15:36:33 GMT Subject: [lworld] RFR: 8301720: Add the PreviewFeature "VALUE_OBJECTS" and annotate new APIs. Message-ID: Add the PreviewFeature for value objects and annotate new APIs. (Any restrictions on use of the APIs will come later.) ------------- Commit messages: - 8301720: Add the PreviewFeature "VALUE_OBJECTS" and annotate new APIs. Changes: https://git.openjdk.org/valhalla/pull/819/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=819&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301720 Stats: 20 lines in 4 files changed: 18 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/819.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/819/head:pull/819 PR: https://git.openjdk.org/valhalla/pull/819 From mchung at openjdk.org Fri Feb 3 17:20:28 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 3 Feb 2023 17:20:28 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v3] In-Reply-To: References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: <2Zb_CmCKxi-PRvOSqq_4qZ3aDZwfdxfb4QNvsarrnBY=.8088b0c8-2d6a-4475-b47f-8d3cf1fd9be9@github.com> On Thu, 2 Feb 2023 22:32:11 GMT, Roger Riggs wrote: >> Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) >> that requests the flags for a specific class file version number. >> Update Class.accessFlags() to request the flags for the specific class file format version of the class file. >> Update class file format version tests to match. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Ignore unspecified access flag I'm referring to a test that compiles a `.class` with an older class file version and the return access flags from `Class::accessFlags` includes `SUPER`. ------------- PR: https://git.openjdk.org/valhalla/pull/808 From mchung at openjdk.org Fri Feb 3 17:42:22 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 3 Feb 2023 17:42:22 GMT Subject: [lworld] RFR: 8301720: Add the PreviewFeature "VALUE_OBJECTS" and annotate new APIs. In-Reply-To: References: Message-ID: On Fri, 3 Feb 2023 15:29:25 GMT, Roger Riggs wrote: > Add the PreviewFeature for value objects and annotate new APIs. > (Any restrictions on use of the APIs will come later.) src/java.base/share/classes/java/lang/Class.java line 636: > 634: * @since Valhalla > 635: */ > 636: @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS) I only expect `@PreviewFeature` on public APIs. No need to mark the package private methods as they are implementation details. ------------- PR: https://git.openjdk.org/valhalla/pull/819 From david.simms at oracle.com Mon Feb 6 10:30:27 2023 From: david.simms at oracle.com (David Simms) Date: Mon, 6 Feb 2023 11:30:27 +0100 Subject: Possible git issue with tags "would clobber existing tag" Message-ID: <247bae7d-73c3-2206-0569-90bd456fa44c@oracle.com> Hi, After the last merge from mainline, the tags were adjusted, and it is possible folks find this issue with there personal fork (assuming you have pull in tags)... ! [rejected]? jdk-21+1 ? -> jdk-21+1 ? (would clobber existing tag) Follow this mail to resolve: https://mail.openjdk.org/pipermail/skara-dev/2020-July/002807.html /D From thartmann at openjdk.org Mon Feb 6 13:59:51 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 6 Feb 2023 13:59:51 GMT Subject: [lworld] Integrated: 8301867: [lworld] BlackholeTest triggers assert "Should have been buffered" Message-ID: The recent merge accidentally removed a Valhalla specific line from the `BlackholeNode` constructor because the class was moved when JDK-8296545 was merged in. This led to the `is_Blackhole()` check in `Compile::process_inline_types` to incorrectly return false. Best regards, Tobias ------------- Commit messages: - 8301867: [lworld] BlackholeTest triggers assert "Should have been buffered" Changes: https://git.openjdk.org/valhalla/pull/820/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=820&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301867 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/820.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/820/head:pull/820 PR: https://git.openjdk.org/valhalla/pull/820 From thartmann at openjdk.org Mon Feb 6 13:59:51 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 6 Feb 2023 13:59:51 GMT Subject: [lworld] Integrated: 8301867: [lworld] BlackholeTest triggers assert "Should have been buffered" In-Reply-To: References: Message-ID: On Mon, 6 Feb 2023 13:51:32 GMT, Tobias Hartmann wrote: > The recent merge accidentally removed a Valhalla specific line from the `BlackholeNode` constructor because the class was moved when JDK-8296545 was merged in. This led to the `is_Blackhole()` check in `Compile::process_inline_types` to incorrectly return false. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 2164d6df Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/2164d6dffea58f42f2e993a576bf35c86705ed36 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8301867: [lworld] BlackholeTest triggers assert "Should have been buffered" ------------- PR: https://git.openjdk.org/valhalla/pull/820 From rriggs at openjdk.org Mon Feb 6 15:00:38 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 15:00:38 GMT Subject: [lworld] RFR: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature [v2] In-Reply-To: References: Message-ID: On Fri, 3 Feb 2023 17:39:26 GMT, Mandy Chung wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove unnecessary PreviewFeature attribute > > src/java.base/share/classes/java/lang/Class.java line 636: > >> 634: * @since Valhalla >> 635: */ >> 636: @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS) > > I only expect `@PreviewFeature` on public APIs. No need to mark the package private methods as they are implementation details. Removed. (That API may come back with "primitive" classes). ------------- PR: https://git.openjdk.org/valhalla/pull/819 From rriggs at openjdk.org Mon Feb 6 15:00:35 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 15:00:35 GMT Subject: [lworld] RFR: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature [v2] In-Reply-To: References: Message-ID: > Add the PreviewFeature for value objects and annotate new APIs. > (Any restrictions on use of the APIs will come later.) Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary PreviewFeature attribute ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/819/files - new: https://git.openjdk.org/valhalla/pull/819/files/b5b0ffdb..f93f9378 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=819&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=819&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/819.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/819/head:pull/819 PR: https://git.openjdk.org/valhalla/pull/819 From rriggs at openjdk.org Mon Feb 6 16:33:39 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 16:33:39 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v4] In-Reply-To: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: > Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) > that requests the flags for a specific class file version number. > Update Class.accessFlags() to request the flags for the specific class file format version of the class file. > Update class file format version tests to match. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add specific test for AccessFlag.SUPER in versions before value class enhancement ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/808/files - new: https://git.openjdk.org/valhalla/pull/808/files/8479e4ee..aca731e7 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=02-03 Stats: 65 lines in 1 file changed: 65 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/808.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/808/head:pull/808 PR: https://git.openjdk.org/valhalla/pull/808 From mchung at openjdk.org Mon Feb 6 17:08:24 2023 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 6 Feb 2023 17:08:24 GMT Subject: [lworld] RFR: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature [v2] In-Reply-To: References: Message-ID: On Mon, 6 Feb 2023 15:00:35 GMT, Roger Riggs wrote: >> Add the PreviewFeature for value objects and annotate new APIs. >> (Any restrictions on use of the APIs will come later.) > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary PreviewFeature attribute `@PreviewFeature` should also be removed from `asPrimaryType', `asValueType', `isPrimaryType`, and `isPrimitiveValueType` ------------- PR: https://git.openjdk.org/valhalla/pull/819 From rriggs at openjdk.org Mon Feb 6 17:34:35 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 17:34:35 GMT Subject: [lworld] RFR: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature [v3] In-Reply-To: References: Message-ID: > Add the PreviewFeature for value objects and annotate new APIs. > (Any restrictions on use of the APIs will come later.) Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary PreviewFeature annotations ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/819/files - new: https://git.openjdk.org/valhalla/pull/819/files/f93f9378..4d4866c2 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=819&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=819&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/819.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/819/head:pull/819 PR: https://git.openjdk.org/valhalla/pull/819 From mchung at openjdk.org Mon Feb 6 17:34:36 2023 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 6 Feb 2023 17:34:36 GMT Subject: [lworld] RFR: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature [v3] In-Reply-To: References: Message-ID: <56zaYyQWO-pdqw0Yjh0KwSxuNZQ9gA2D-lQ_keNa-RE=.759bf082-777b-4d92-8bb8-d7809ba2562c@github.com> On Mon, 6 Feb 2023 17:30:51 GMT, Roger Riggs wrote: >> Add the PreviewFeature for value objects and annotate new APIs. >> (Any restrictions on use of the APIs will come later.) > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary PreviewFeature annotations Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/819 From rriggs at openjdk.org Mon Feb 6 19:22:23 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 19:22:23 GMT Subject: [lworld] Integrated: 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature In-Reply-To: References: Message-ID: On Fri, 3 Feb 2023 15:29:25 GMT, Roger Riggs wrote: > Add the PreviewFeature for value objects and annotate new APIs. > (Any restrictions on use of the APIs will come later.) This pull request has now been integrated. Changeset: 5fd97c73 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/5fd97c73405dde284fa42c201f13bf53beb83eae Stats: 15 lines in 4 files changed: 13 ins; 1 del; 1 mod 8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/819 From mchung at openjdk.org Mon Feb 6 20:08:18 2023 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 6 Feb 2023 20:08:18 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v4] In-Reply-To: References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: On Mon, 6 Feb 2023 16:33:39 GMT, Roger Riggs wrote: >> Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) >> that requests the flags for a specific class file version number. >> Update Class.accessFlags() to request the flags for the specific class file format version of the class file. >> Update class file format version tests to match. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Add specific test for AccessFlag.SUPER in versions before value class enhancement Marked as reviewed by mchung (Committer). test/jdk/java/lang/reflect/AccessFlag/SuperAccessFlagTest.java line 32: > 30: */ > 31: > 32: // Note: cannot use --release 20 because the accessFlags() method is can use `@comment` after `@compile` line ------------- PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Mon Feb 6 20:27:28 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 20:27:28 GMT Subject: [lworld] RFR: 8296950: [lworld] AccessFlags should be specific to class file version [v5] In-Reply-To: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: <0DqMs3gHQqwLNX1amBgw1Hf7MTzdcPNf0XoEQVaySaY=.b8aec4dc-574f-4084-be7c-e2945e3f6b61@github.com> > Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) > that requests the flags for a specific class file version number. > Update Class.accessFlags() to request the flags for the specific class file format version of the class file. > Update class file format version tests to match. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Revise comment based on review comment ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/808/files - new: https://git.openjdk.org/valhalla/pull/808/files/aca731e7..ce6fc263 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=04 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=808&range=03-04 Stats: 5 lines in 1 file changed: 2 ins; 3 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/808.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/808/head:pull/808 PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Mon Feb 6 22:25:11 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 22:25:11 GMT Subject: [lworld] RFR: 8301896: [backout] Revert addition of PreviewFeature for Value classes Message-ID: Revert addition of PreviewFeature for value classes added by JDK-8301720 as PR #819. Created with 'git revert 5fd97c73405dde284fa42c201f13bf53beb83eae'. This reverts commit 5fd97c73405dde284fa42c201f13bf53beb83eae. ------------- Commit messages: - Revert "8301720: [lworld] Value class APIs should have javadoc annotation for PreviewFeature" Changes: https://git.openjdk.org/valhalla/pull/821/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=821&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301896 Stats: 15 lines in 4 files changed: 1 ins; 13 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/821.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/821/head:pull/821 PR: https://git.openjdk.org/valhalla/pull/821 From mchung at openjdk.org Mon Feb 6 22:25:12 2023 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 6 Feb 2023 22:25:12 GMT Subject: [lworld] RFR: 8301896: [backout] Revert addition of PreviewFeature for Value classes In-Reply-To: References: Message-ID: On Mon, 6 Feb 2023 22:02:53 GMT, Roger Riggs wrote: > Revert addition of PreviewFeature for value classes added by JDK-8301720 as PR #819. > > Created with 'git revert 5fd97c73405dde284fa42c201f13bf53beb83eae'. > > This reverts commit 5fd97c73405dde284fa42c201f13bf53beb83eae. Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/821 From rriggs at openjdk.org Mon Feb 6 23:16:16 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 6 Feb 2023 23:16:16 GMT Subject: [lworld] Integrated: 8301896: [backout] Revert addition of PreviewFeature for Value classes In-Reply-To: References: Message-ID: On Mon, 6 Feb 2023 22:02:53 GMT, Roger Riggs wrote: > Revert addition of PreviewFeature for value classes added by JDK-8301720 as PR #819. > > Created with 'git revert 5fd97c73405dde284fa42c201f13bf53beb83eae'. > > This reverts commit 5fd97c73405dde284fa42c201f13bf53beb83eae. This pull request has now been integrated. Changeset: 2ffaa0b0 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/2ffaa0b0ea02fae24959696f1a278d17a3e36dd3 Stats: 15 lines in 4 files changed: 1 ins; 13 del; 1 mod 8301896: [backout] Revert addition of PreviewFeature for Value classes Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/821 From thartmann at openjdk.org Tue Feb 7 14:38:17 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 7 Feb 2023 14:38:17 GMT Subject: [lworld] RFR: 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize Message-ID: Cloning of CastPPs in `PhaseIdealLoop::flatten_array_element_type_check` does not update the bottom type of the CastPP, leading to a mismatch of `type()` and `adr_type()` of a `LoadNKlass` -> `AddP` -> `CastPP` user. As a result, the node is re-added to the IGVN worklist infinitely, assuming that type of the AddP will be updated: https://github.com/openjdk/valhalla/blob/256f488b64846e4af2bfa90d436139bda8d0e7aa/src/hotspot/share/opto/memnode.cpp#L372-L374 Best regards, Tobias ------------- Commit messages: - 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize. Changes: https://git.openjdk.org/valhalla/pull/822/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=822&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301664 Stats: 7 lines in 2 files changed: 2 ins; 4 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/822.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/822/head:pull/822 PR: https://git.openjdk.org/valhalla/pull/822 From thartmann at openjdk.org Tue Feb 7 14:55:02 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 7 Feb 2023 14:55:02 GMT Subject: [lworld] RFR: 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize [v2] In-Reply-To: References: Message-ID: > Cloning of CastPPs in `PhaseIdealLoop::flatten_array_element_type_check` does not update the bottom type of the CastPP, leading to a mismatch of `type()` and `adr_type()` of a `LoadNKlass` -> `AddP` -> `CastPP` user. As a result, the node is re-added to the IGVN worklist infinitely, assuming that type of the AddP will be updated: > https://github.com/openjdk/valhalla/blob/256f488b64846e4af2bfa90d436139bda8d0e7aa/src/hotspot/share/opto/memnode.cpp#L372-L374 > > Best regards, > Tobias Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: Better naming ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/822/files - new: https://git.openjdk.org/valhalla/pull/822/files/441f8ec0..7f18e3fd Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=822&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=822&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/822.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/822/head:pull/822 PR: https://git.openjdk.org/valhalla/pull/822 From thartmann at openjdk.org Tue Feb 7 16:20:36 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 7 Feb 2023 16:20:36 GMT Subject: [lworld] Integrated: 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize In-Reply-To: References: Message-ID: <0TY6aUyn8qApUQvGMmmtFyD82OSBUlZDldtF_LhgU1M=.f9013e81-b1bb-48f3-943c-eba0344bc969@github.com> On Tue, 7 Feb 2023 14:32:12 GMT, Tobias Hartmann wrote: > Cloning of CastPPs in `PhaseIdealLoop::flatten_array_element_type_check` does not update the bottom type of the CastPP, leading to a mismatch of `type()` and `adr_type()` of a `LoadNKlass` -> `AddP` -> `CastPP` user. As a result, the node is re-added to the IGVN worklist infinitely, assuming that type of the AddP will be updated: > https://github.com/openjdk/valhalla/blob/256f488b64846e4af2bfa90d436139bda8d0e7aa/src/hotspot/share/opto/memnode.cpp#L372-L374 > > Best regards, > Tobias This pull request has now been integrated. Changeset: 2b29a9f9 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/2b29a9f99db91bc0904f2a85197256b6b623b589 Stats: 7 lines in 2 files changed: 2 ins; 4 del; 1 mod 8301664: [lworld] Inconsistent CastPP type leads to infinite loop in PhaseIterGVN::optimize ------------- PR: https://git.openjdk.org/valhalla/pull/822 From rriggs at openjdk.org Tue Feb 7 17:23:33 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 7 Feb 2023 17:23:33 GMT Subject: [lworld] RFR: 8301899: [lworld] Value class APIs should have annotation for PreviewFeature Message-ID: Add the PreviewFeature for value objects and annotate new APIs. Update tests to EnablePreview (all tests in test/jdk/valhalla/...) Tier1-3 tests pass. ------------- Commit messages: - 8301899: [lworld] Value class APIs should have annotation for PreviewFeature Changes: https://git.openjdk.org/valhalla/pull/823/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=823&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301899 Stats: 16 lines in 5 files changed: 14 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/823.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/823/head:pull/823 PR: https://git.openjdk.org/valhalla/pull/823 From mchung at openjdk.org Tue Feb 7 20:39:36 2023 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 7 Feb 2023 20:39:36 GMT Subject: [lworld] RFR: 8301899: [lworld] Value class APIs should have annotation for PreviewFeature In-Reply-To: References: Message-ID: On Tue, 7 Feb 2023 17:15:53 GMT, Roger Riggs wrote: > Add the PreviewFeature for value objects and annotate new APIs. > > Update tests to EnablePreview (all tests in test/jdk/valhalla/...) > > Tier1-3 tests pass. Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/823 From rriggs at openjdk.org Tue Feb 7 20:53:23 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 7 Feb 2023 20:53:23 GMT Subject: [lworld] Integrated: 8301899: [lworld] Value class APIs should have annotation for PreviewFeature In-Reply-To: References: Message-ID: On Tue, 7 Feb 2023 17:15:53 GMT, Roger Riggs wrote: > Add the PreviewFeature for value objects and annotate new APIs. > > Update tests to EnablePreview (all tests in test/jdk/valhalla/...) > > Tier1-3 tests pass. This pull request has now been integrated. Changeset: 01d8ccee Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/01d8cceeb40a8c1c8b0de4540aed70d708a5c740 Stats: 16 lines in 5 files changed: 14 ins; 1 del; 1 mod 8301899: [lworld] Value class APIs should have annotation for PreviewFeature Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/823 From thartmann at openjdk.org Mon Feb 13 10:04:45 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 13 Feb 2023 10:04:45 GMT Subject: [lworld] RFR: 8282616: [lworld] C2 does not properly handle circular .ref or value class fields Message-ID: The current C2 implementation recurses infinitely when scalarizing circular .ref or value class fields, leading to a segmentation fault (stack overflow) during compilation. I added code to detect such circularity and limit the scalarization depth accordingly. Unfortunately, we can now observe nodes of the same type but with different scalarization depth during GVN and IGVN. Here's an example: value class V1 { V2 v2 = V2.default; } value class V2 { V1 v1 = V1.default; } V1 a = new V1(); // Scalarized as InlineTypeNodeV1(InlineTypeNodeV2(oop)) V2 b = new V2(); // Scalarized as InlineTypeNodeV2(InlineTypeNodeV1(oop)) V1 c = __ withfield(a, v2, b); // Scalarized as InlineTypeNodeV1(InlineTypeNodeV2(InlineTypeNodeV1(oop))) Nodes for `a` and `c` are of the same type but scalarized with different depth. That's a problem for `InlineTypeNode::merge_with` which relies on Phi nodes to merge field values at the exact same depth. I added code to adjust the scalarization depth during parsing/GVN and limited the creation of Phi nodes during IGVN. All of that is dependent on the detection of circularity. I filed [JDK-8302308](https://bugs.openjdk.org/browse/JDK-8302308) to address some limitations of the current implementation in a low-priority, follow-up enhancement. Thanks, Tobias ------------- Commit messages: - Removed useless check - Added missing check - Removed extra asserts - Removed code added for testing - Improved detection of circularity - Some more fixes/cleanups - First prototype Changes: https://git.openjdk.org/valhalla/pull/824/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=824&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8282616 Stats: 364 lines in 14 files changed: 288 ins; 15 del; 61 mod Patch: https://git.openjdk.org/valhalla/pull/824.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/824/head:pull/824 PR: https://git.openjdk.org/valhalla/pull/824 From thartmann at openjdk.org Mon Feb 13 11:22:54 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 13 Feb 2023 11:22:54 GMT Subject: [lworld] Integrated: 8282616: [lworld] C2 does not properly handle circular .ref or value class fields In-Reply-To: References: Message-ID: On Mon, 13 Feb 2023 09:58:08 GMT, Tobias Hartmann wrote: > The current C2 implementation recurses infinitely when scalarizing circular .ref or value class fields, leading to a segmentation fault (stack overflow) during compilation. I added code to detect such circularity and limit the scalarization depth accordingly. Unfortunately, we can now observe nodes of the same type but with different scalarization depth during GVN and IGVN. Here's an example: > > > value class V1 { > V2 v2 = V2.default; > } > > value class V2 { > V1 v1 = V1.default; > } > > V1 a = new V1(); // Scalarized as InlineTypeNodeV1(InlineTypeNodeV2(oop)) > V2 b = new V2(); // Scalarized as InlineTypeNodeV2(InlineTypeNodeV1(oop)) > V1 c = __ withfield(a, v2, b); // Scalarized as InlineTypeNodeV1(InlineTypeNodeV2(InlineTypeNodeV1(oop))) > > > Nodes for `a` and `c` are of the same type but scalarized with different depth. That's a problem for `InlineTypeNode::merge_with` which relies on Phi nodes to merge field values at the exact same depth. I added code to adjust the scalarization depth during parsing/GVN and limited the creation of Phi nodes during IGVN. All of that is dependent on the detection of circularity. I filed [JDK-8302308](https://bugs.openjdk.org/browse/JDK-8302308) to address some limitations of the current implementation in a low-priority, follow-up enhancement. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 46bfac49 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/46bfac49bcd5eeb898519b253939b5d8f97e9d83 Stats: 364 lines in 14 files changed: 288 ins; 15 del; 61 mod 8282616: [lworld] C2 does not properly handle circular .ref or value class fields ------------- PR: https://git.openjdk.org/valhalla/pull/824 From rriggs at openjdk.org Mon Feb 13 15:07:54 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 13 Feb 2023 15:07:54 GMT Subject: [lworld] Integrated: 8296950: [lworld] AccessFlags should be specific to class file version In-Reply-To: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> References: <39YntreEgkmZr5fVA84OCgX62FqbWzUO5_9kWSPXaDk=.7c54f113-109d-4154-8831-5b4a2bd8f391@github.com> Message-ID: On Mon, 14 Nov 2022 21:12:30 GMT, Roger Riggs wrote: > Add java.lang.reflect.AccessFlag.maskToAccessFlags(mask, location, cffv) > that requests the flags for a specific class file version number. > Update Class.accessFlags() to request the flags for the specific class file format version of the class file. > Update class file format version tests to match. This pull request has now been integrated. Changeset: bc2c7c20 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/bc2c7c206a73c2b762e56077e80b84eaa7fc1755 Stats: 182 lines in 9 files changed: 161 ins; 1 del; 20 mod 8296950: [lworld] AccessFlags should be specific to class file version Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/808 From rriggs at openjdk.org Tue Feb 21 21:35:49 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 21 Feb 2023 21:35:49 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class Message-ID: Make copies of classes to be made value classes in src/java.base/valueclasses/classes Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. ------------- Commit messages: - Merge branch 'lworld' into try-double-build - Cleanup make files generation of value classes - Remove incomplete test ValueClassDepsTest.java. - Merge branch 'lworld' into try-double-build - Refactor to smaller methods and some cleanup. - Modify command line argument handling to support both --patch-module - Update build to generate selected value classes from corresponding core classes - Added test that Valhalla classes modified to be value classes are - When --enable-preview, scan the $HOME/lib/valueclasses/ directory - Reimplemented build of value class overlay classes. - ... and 1 more: https://git.openjdk.org/valhalla/compare/bc2c7c20...9fc43ba8 Changes: https://git.openjdk.org/valhalla/pull/816/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8271959 Stats: 366 lines in 18 files changed: 326 ins; 31 del; 9 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816 From erikj at openjdk.org Tue Feb 21 21:35:51 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 21 Feb 2023 21:35:51 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class In-Reply-To: References: Message-ID: <7hQjWH2e2bVY89L7i4STSn2dp_kcFMOfzAd7ta1Fqwk=.b622d3f7-0cc3-491a-a4f6-698ad758ec9e@github.com> On Thu, 26 Jan 2023 01:38:03 GMT, Roger Riggs wrote: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. There are two major ways you could approach this. 1. Define new top level targets for compiling the value classes and the subsequent jar files. 2. Modify make/CompileJavaModules.gmk to add a second optional compilation and jar file generation which would be part of the top level -java target. You went with option 1. Both have pros and cons, so it kind of depends on what you expect to need to do, as a developer. Do you think you need the fine granular top level target support for selective building? Another aspect is that if you reuse the CompileJavaModules.gmk and run it again with a different outputdir, I think you will be rebuilding quite a lot of things unnecessarily. My understanding is that you only really need the value classes from the this second round of compilation. make/Main.gmk line 227: > 225: SRCS:=$$($1-value-jar-bin-class-files), \ > 226: JAR:=ValueClass_$1.jar, \ > 227: )) This would need to go into a separate new makefile. It's not possible to inline a Setup* macro in a recipe. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From duke at openjdk.org Tue Feb 21 21:35:51 2023 From: duke at openjdk.org (Vladimir Kozelkov) Date: Tue, 21 Feb 2023 21:35:51 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class In-Reply-To: References: Message-ID: On Thu, 26 Jan 2023 01:38:03 GMT, Roger Riggs wrote: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Are these changes part of JEP 402? Will java.lang.Integer etc. replaced in a similar way? ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Tue Feb 21 21:35:52 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 21 Feb 2023 21:35:52 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class In-Reply-To: References: Message-ID: On Thu, 26 Jan 2023 12:39:00 GMT, Vladimir Kozelkov wrote: > Are these changes part of JEP 402? Will java.lang.Integer etc. replaced in a similar way? I think that's unlikely, at least as sketched here. The wrapper types are used before the module system is initialized. Likely, something more specific and low level will be needed for those. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Tue Feb 21 21:35:52 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 21 Feb 2023 21:35:52 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class In-Reply-To: References: Message-ID: On Thu, 26 Jan 2023 01:38:03 GMT, Roger Riggs wrote: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. The initial set of value classes (listed in `make/modules/java.base/gensrc/GensrcValueClasses.gmk`) are generated from the regular versions of those classes with the `value` keyword inserted in the class declaration. java/util/Optional.java \ java/util/OptionalInt.java \ java/util/OptionalLong.java \ java/util/OptionalDouble.java \ java/time/LocalDate.java \ java/time/LocalDateTime.java \ java/time/LocalTime.java \ java/time/Duration.java \ java/time/Instant.java \ java/time/MonthDay.java \ java/time/ZonedDateTime.java \ java/time/OffsetDateTime.java \ java/time/OffsetTime.java \ java/time/YearMonth.java \ java/time/Year.java \ java/time/Period.java \ ------------- PR: https://git.openjdk.org/valhalla/pull/816 From thartmann at openjdk.org Wed Feb 22 13:38:14 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 Feb 2023 13:38:14 GMT Subject: [lworld] RFR: 8293702: [lworld] C1 does not properly handle unloaded inline type field loads Message-ID: We crash in C1 when emitting a `DeoptimizeStub` for handling a null field load from a non-flattened, unloaded inline type field because the state for re-execution after deopt is not initialized. Best regards, Tobias ------------- Commit messages: - 8293702: [lworld] C1 does not properly handle unloaded inline type field loads Changes: https://git.openjdk.org/valhalla/pull/825/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=825&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293702 Stats: 26 lines in 2 files changed: 24 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/825.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/825/head:pull/825 PR: https://git.openjdk.org/valhalla/pull/825 From thartmann at openjdk.org Wed Feb 22 14:02:23 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 Feb 2023 14:02:23 GMT Subject: [lworld] RFR: 8284164: [lworld] Inline type elements of autobox cache should be casted to non-null Message-ID: The problematic logic in `TypeAryPtr::compute_klass` was removed with the integration of [JDK-8297933](https://bugs.openjdk.org/browse/JDK-8297933): https://github.com/openjdk/valhalla/blob/8ac816b8642b1994a21b5b1476aca93ba4a1096a/src/hotspot/share/opto/type.cpp#L6047-L6050 We therefore no longer need the workaround. Best regards, Tobias ------------- Commit messages: - 8284164: [lworld] Inline type elements of autobox cache should be casted to non-null Changes: https://git.openjdk.org/valhalla/pull/826/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=826&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8284164 Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/826.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/826/head:pull/826 PR: https://git.openjdk.org/valhalla/pull/826 From thartmann at openjdk.org Wed Feb 22 14:16:10 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 Feb 2023 14:16:10 GMT Subject: [lworld] Integrated: 8284164: [lworld] Inline type elements of autobox cache should be casted to non-null In-Reply-To: References: Message-ID: On Wed, 22 Feb 2023 13:54:33 GMT, Tobias Hartmann wrote: > The problematic logic in `TypeAryPtr::compute_klass` was removed with the integration of [JDK-8297933](https://bugs.openjdk.org/browse/JDK-8297933): > > https://github.com/openjdk/valhalla/blob/8ac816b8642b1994a21b5b1476aca93ba4a1096a/src/hotspot/share/opto/type.cpp#L6047-L6050 > > We therefore no longer need the workaround. > > Best regards, > Tobias This pull request has now been integrated. Changeset: a5785722 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/a5785722f5f49fba98efdbb3f0edf5c7613d8b83 Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod 8284164: [lworld] Inline type elements of autobox cache should be casted to non-null ------------- PR: https://git.openjdk.org/valhalla/pull/826 From thartmann at openjdk.org Wed Feb 22 14:19:32 2023 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 Feb 2023 14:19:32 GMT Subject: [lworld] Integrated: 8293702: [lworld] C1 does not properly handle unloaded inline type field loads In-Reply-To: References: Message-ID: <6gjm51l-O8pszi95Mdgmk_Py8ehOuvPaaSILtQPBAz4=.8a14ebc8-d46b-4a2c-bf5b-0773dd4ee19a@github.com> On Wed, 22 Feb 2023 13:31:33 GMT, Tobias Hartmann wrote: > We crash in C1 when emitting a `DeoptimizeStub` for handling a null field load from a non-flattened, unloaded inline type field because the state for re-execution after deopt is not initialized. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 21c557a7 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/21c557a725d4eddad6e07d4a7dcdf7f16440c804 Stats: 26 lines in 2 files changed: 24 ins; 0 del; 2 mod 8293702: [lworld] C1 does not properly handle unloaded inline type field loads ------------- PR: https://git.openjdk.org/valhalla/pull/825 From rriggs at openjdk.org Wed Feb 22 15:47:16 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 22 Feb 2023 15:47:16 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v2] In-Reply-To: References: Message-ID: <5PIvXtc5nra7iKwOICF0CUEv64uOUz3vHmtdb8LuigY=.d926b385-1017-41f2-913e-f5cd082aff9d@github.com> > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Modify hotspot test for duplicate modules to check error message from the launcher instead of ExceptionInInitilizer. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/816/files - new: https://git.openjdk.org/valhalla/pull/816/files/9fc43ba8..15b8caf0 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=00-01 Stats: 4 lines in 1 file changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816 From dholmes at openjdk.org Wed Feb 22 21:40:48 2023 From: dholmes at openjdk.org (David Holmes) Date: Wed, 22 Feb 2023 21:40:48 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v2] In-Reply-To: <5PIvXtc5nra7iKwOICF0CUEv64uOUz3vHmtdb8LuigY=.d926b385-1017-41f2-913e-f5cd082aff9d@github.com> References: <5PIvXtc5nra7iKwOICF0CUEv64uOUz3vHmtdb8LuigY=.d926b385-1017-41f2-913e-f5cd082aff9d@github.com> Message-ID: On Wed, 22 Feb 2023 15:47:16 GMT, Roger Riggs wrote: >> Make copies of classes to be made value classes in src/java.base/valueclasses/classes >> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. >> Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar >> >> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. >> For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Modify hotspot test for duplicate modules to check error message from the launcher > instead of ExceptionInInitilizer. Mostly seems reasonable - though I'm not that familiar with the existing module patching logic. One issue with tracking `patch_mod_javabase`. src/hotspot/share/runtime/arguments.cpp line 2221: > 2219: *(module_name + module_len) = '\0'; > 2220: // The path piece begins one past the module_equal sign > 2221: add_patch_mod_prefix(module_name, module_equal + 1, false); `patch_mod_javabase` seems unused here now. Not obvious that this flag is being tracked properly with the new changes. src/hotspot/share/runtime/arguments.cpp line 2246: > 2244: > 2245: jio_snprintf(valueclasses_dir, JVM_MAXPATHLEN, "%s%slib%s" VALUECLASS_STR "%s", > 2246: Arguments::get_java_home(), fileSep, fileSep, fileSep); Nit: please indent continuation line so 'A' and 'v' line up. src/hotspot/share/runtime/arguments.cpp line 2263: > 2261: > 2262: jio_snprintf(path, JVM_MAXPATHLEN, "%s%s", valueclasses_dir, &entry->d_name); > 2263: add_patch_mod_prefix(module_name, path, true); Please document the `true` e.g. `true /* append */` (similar for the false case elsewhere) ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Wed Feb 22 23:04:53 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 22 Feb 2023 23:04:53 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v3] In-Reply-To: References: Message-ID: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Replaced patch_mod_javabase with a check for an empty list of --patch-modules. Other review comment cleanup. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/816/files - new: https://git.openjdk.org/valhalla/pull/816/files/15b8caf0..f7eb632f Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=01-02 Stats: 23 lines in 2 files changed: 0 ins; 2 del; 21 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Wed Feb 22 23:05:02 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 22 Feb 2023 23:05:02 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v2] In-Reply-To: References: <5PIvXtc5nra7iKwOICF0CUEv64uOUz3vHmtdb8LuigY=.d926b385-1017-41f2-913e-f5cd082aff9d@github.com> Message-ID: On Wed, 22 Feb 2023 21:24:43 GMT, David Holmes wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Modify hotspot test for duplicate modules to check error message from the launcher >> instead of ExceptionInInitilizer. > > src/hotspot/share/runtime/arguments.cpp line 2221: > >> 2219: *(module_name + module_len) = '\0'; >> 2220: // The path piece begins one past the module_equal sign >> 2221: add_patch_mod_prefix(module_name, module_equal + 1, false); > > `patch_mod_javabase` seems unused here now. Not obvious that this flag is being tracked properly with the new changes. Patch_mod_javabase is obsolete and is to be removed. Each --patch-module is added to an array as the arguments are parsed. After the arguments are parsed the array is checked to see if any modules have been patched. That is sufficient for the decision to disable CDS. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From dholmes at openjdk.org Thu Feb 23 03:34:28 2023 From: dholmes at openjdk.org (David Holmes) Date: Thu, 23 Feb 2023 03:34:28 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v3] In-Reply-To: References: Message-ID: On Wed, 22 Feb 2023 23:04:53 GMT, Roger Riggs wrote: >> Make copies of classes to be made value classes in src/java.base/valueclasses/classes >> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. >> Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar >> >> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. >> For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Replaced patch_mod_javabase with a check for an empty list of --patch-modules. > Other review comment cleanup. src/hotspot/share/runtime/arguments.cpp line 3193: > 3191: > 3192: if (UseSharedSpaces && _patch_mod_prefix != nullptr) { > 3193: no_shared_spaces("CDS is disabled when any module is patched."); But you are now disabling CDS if any module is patched, when the constraint AFAIK is only on the base module. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Thu Feb 23 17:58:41 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 23 Feb 2023 17:58:41 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v4] In-Reply-To: References: Message-ID: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Restore disabling CDS if java.base is patched. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/816/files - new: https://git.openjdk.org/valhalla/pull/816/files/f7eb632f..8ed83988 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=02-03 Stats: 7 lines in 2 files changed: 5 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Thu Feb 23 20:45:38 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 23 Feb 2023 20:45:38 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v4] In-Reply-To: <7hQjWH2e2bVY89L7i4STSn2dp_kcFMOfzAd7ta1Fqwk=.b622d3f7-0cc3-491a-a4f6-698ad758ec9e@github.com> References: <7hQjWH2e2bVY89L7i4STSn2dp_kcFMOfzAd7ta1Fqwk=.b622d3f7-0cc3-491a-a4f6-698ad758ec9e@github.com> Message-ID: On Thu, 26 Jan 2023 20:59:48 GMT, Erik Joelsson wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Restore disabling CDS if java.base is patched. > > There are two major ways you could approach this. > > 1. Define new top level targets for compiling the value classes and the subsequent jar files. > 2. Modify make/CompileJavaModules.gmk to add a second optional compilation and jar file generation which would be part of the top level -java target. > > You went with option 1. Both have pros and cons, so it kind of depends on what you expect to need to do, as a developer. Do you think you need the fine granular top level target support for selective building? > > Another aspect is that if you reuse the CompileJavaModules.gmk and run it again with a different outputdir, I think you will be rebuilding quite a lot of things unnecessarily. My understanding is that you only really need the value classes from the this second round of compilation. @erikj79 When you have time can you look at the build changes. Thanks ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Thu Feb 23 20:45:38 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 23 Feb 2023 20:45:38 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v3] In-Reply-To: References: Message-ID: On Thu, 23 Feb 2023 03:31:39 GMT, David Holmes wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Replaced patch_mod_javabase with a check for an empty list of --patch-modules. >> Other review comment cleanup. > > src/hotspot/share/runtime/arguments.cpp line 3193: > >> 3191: >> 3192: if (UseSharedSpaces && _patch_mod_prefix != nullptr) { >> 3193: no_shared_spaces("CDS is disabled when any module is patched."); > > But you are now disabling CDS if any module is patched, when the constraint AFAIK is only on the base module. Corrected to restore previous behavior and different messages between patching java.base and any other module. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Fri Feb 24 14:54:34 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 14:54:34 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field Message-ID: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. Replaced with inline expression. ------------- Commit messages: - 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field Changes: https://git.openjdk.org/valhalla/pull/827/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=827&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8303137 Stats: 8 lines in 1 file changed: 1 ins; 4 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/827.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/827/head:pull/827 PR: https://git.openjdk.org/valhalla/pull/827 From mchung at openjdk.org Fri Feb 24 16:03:28 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 24 Feb 2023 16:03:28 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field In-Reply-To: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: On Fri, 24 Feb 2023 14:47:59 GMT, Roger Riggs wrote: > Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. > Replaced with inline expression. Can you elaborate more what the issue is? Why `SET_CLASS_IDENTITY_VALHALLA` is not an issue? ------------- PR: https://git.openjdk.org/valhalla/pull/827 From mchung at openjdk.org Fri Feb 24 16:12:38 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 24 Feb 2023 16:12:38 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v4] In-Reply-To: References: Message-ID: On Thu, 23 Feb 2023 17:58:41 GMT, Roger Riggs wrote: >> Make copies of classes to be made value classes in src/java.base/valueclasses/classes >> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. >> Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar >> >> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. >> For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Restore disabling CDS if java.base is patched. A side note: the change to remove the call to `super()` from the constructors in the jdk master repo. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From erikj at openjdk.org Fri Feb 24 17:47:47 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 Feb 2023 17:47:47 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v4] In-Reply-To: References: Message-ID: On Thu, 23 Feb 2023 17:58:41 GMT, Roger Riggs wrote: >> Make copies of classes to be made value classes in src/java.base/valueclasses/classes >> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. >> Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar >> >> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. >> For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Restore disabling CDS if java.base is patched. Except for some minor cosmetics, the build changes are looking really good. make/CompileJavaModules.gmk line 127: > 125: > 126: ifneq ($(COMPILER), bootjdk) > 127: MODULE_VALUECLASS_SRC_DIRS := $(call FindModuleValueClassSrcDirs, $(MODULE)) Please use 2 spaces for logic block indentation. (see https://openjdk.org/groups/build/doc/code-conventions.html) make/CompileJavaModules.gmk line 132: > 130: ifneq ($(MODULE_VALUECLASS_SRC_DIRS),) > 131: $(eval $(call SetupJavaCompilation, $(MODULE)-$(VALUECLASSES_STR), \ > 132: SMALL_JAVA := false, \ Please use 4 spaces indentation for continuation. ------------- Marked as reviewed by erikj (no project role). PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Fri Feb 24 18:02:37 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 18:02:37 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field In-Reply-To: References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: On Fri, 24 Feb 2023 16:01:12 GMT, Mandy Chung wrote: > Can you elaborate more what the issue is? Why `SET_CLASS_IDENTITY_VALHALLA` is not an issue? The test is checking the 'current' value of the field to see if it is archived (or an exception). The EMPTY_SET is an explicit exception in `cdsHeapVerifier.cpp`so I think it gets a pass. I will remove both static fields and compute the values as the enums are created. ------------- PR: https://git.openjdk.org/valhalla/pull/827 From rriggs at openjdk.org Fri Feb 24 20:10:18 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 20:10:18 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field [v2] In-Reply-To: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: <4TtQIs9PMsIh1pLBqrQlWaXOIC90M_BEYoDrMySy3I4=.17a8d878-aaa3-4e59-ad32-8873519c5123@github.com> > Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. > Replaced with inline expression. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove static field initialization based on ValhallaFeatures enabled. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/827/files - new: https://git.openjdk.org/valhalla/pull/827/files/5847834e..f39167eb Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=827&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=827&range=00-01 Stats: 5 lines in 1 file changed: 1 ins; 2 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/827.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/827/head:pull/827 PR: https://git.openjdk.org/valhalla/pull/827 From rriggs at openjdk.org Fri Feb 24 20:41:56 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 20:41:56 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v5] In-Reply-To: References: Message-ID: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct indentation/space usage in makefiles. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/816/files - new: https://git.openjdk.org/valhalla/pull/816/files/8ed83988..02453b1c Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=04 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=03-04 Stats: 12 lines in 1 file changed: 0 ins; 0 del; 12 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816 From mchung at openjdk.org Fri Feb 24 22:53:30 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 24 Feb 2023 22:53:30 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field [v2] In-Reply-To: <4TtQIs9PMsIh1pLBqrQlWaXOIC90M_BEYoDrMySy3I4=.17a8d878-aaa3-4e59-ad32-8873519c5123@github.com> References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> <4TtQIs9PMsIh1pLBqrQlWaXOIC90M_BEYoDrMySy3I4=.17a8d878-aaa3-4e59-ad32-8873519c5123@github.com> Message-ID: On Fri, 24 Feb 2023 20:10:18 GMT, Roger Riggs wrote: >> Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. >> Replaced with inline expression. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove static field initialization based on ValhallaFeatures enabled. src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 669: > 667: Set.of(CLASS, INNER_CLASS); > 668: private static final Set SET_CLASS_IDENTITY_VALHALLA = > 669: ValhallaFeatures.isEnabled() ? SET_CLASS_INNER_CLASS : EMPTY_SET; Should this static final field be removed? ------------- PR: https://git.openjdk.org/valhalla/pull/827 From rriggs at openjdk.org Fri Feb 24 23:07:06 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 23:07:06 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field [v3] In-Reply-To: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: > Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. > Replaced with inline expression. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove obsolete field ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/827/files - new: https://git.openjdk.org/valhalla/pull/827/files/f39167eb..a5135132 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=827&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=827&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/827.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/827/head:pull/827 PR: https://git.openjdk.org/valhalla/pull/827 From rriggs at openjdk.org Fri Feb 24 23:07:11 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 24 Feb 2023 23:07:11 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field [v2] In-Reply-To: References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> <4TtQIs9PMsIh1pLBqrQlWaXOIC90M_BEYoDrMySy3I4=.17a8d878-aaa3-4e59-ad32-8873519c5123@github.com> Message-ID: <7aQu3zVmIHwnfUrpNFCWLlCMOaxQijbWlKst2uFhbrY=.8a1a148f-c206-4d1e-b4cd-e340691fb92e@github.com> On Fri, 24 Feb 2023 22:51:09 GMT, Mandy Chung wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove static field initialization based on ValhallaFeatures enabled. > > src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 669: > >> 667: Set.of(CLASS, INNER_CLASS); >> 668: private static final Set SET_CLASS_IDENTITY_VALHALLA = >> 669: ValhallaFeatures.isEnabled() ? SET_CLASS_INNER_CLASS : EMPTY_SET; > > Should this static final field be removed? done ------------- PR: https://git.openjdk.org/valhalla/pull/827 From mchung at openjdk.org Fri Feb 24 23:21:26 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 24 Feb 2023 23:21:26 GMT Subject: [lworld] RFR: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field [v3] In-Reply-To: References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: <8CPrnjJvhuEyZMzSbB-bSfLlsZQ4MF9NN4WMimuWNbo=.ea22d181-2a76-489e-86d1-876589534251@github.com> On Fri, 24 Feb 2023 23:07:06 GMT, Roger Riggs wrote: >> Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. >> Replaced with inline expression. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove obsolete field Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/827 From rriggs at openjdk.org Sat Feb 25 14:21:32 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Sat, 25 Feb 2023 14:21:32 GMT Subject: [lworld] Integrated: 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field In-Reply-To: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> References: <5enn1UNAsww1q4ALNZP0aO6hea4MWFaAum4Cb_XnwMk=.d3e89335-18d1-401d-8ad4-750af28476ab@github.com> Message-ID: On Fri, 24 Feb 2023 14:47:59 GMT, Roger Riggs wrote: > Removed private static field in j.l.reflect.AccesFlag that CDS could not archive. > Replaced with inline expression. This pull request has now been integrated. Changeset: 5e871a47 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/5e871a477f79a7407053fdd4f5b4cd2aadcf8901 Stats: 15 lines in 1 file changed: 2 ins; 8 del; 5 mod 8303137: [lworld] Fix ArchivedEnumTest fail caused by changed Enum static field Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/827 From dholmes at openjdk.org Mon Feb 27 21:37:34 2023 From: dholmes at openjdk.org (David Holmes) Date: Mon, 27 Feb 2023 21:37:34 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v5] In-Reply-To: References: Message-ID: On Fri, 24 Feb 2023 20:41:56 GMT, Roger Riggs wrote: >> Make copies of classes to be made value classes in src/java.base/valueclasses/classes >> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. >> Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar >> >> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. >> For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Correct indentation/space usage in makefiles. Sorry for the delay (I don't get email notifications for this PR). The hotspot changes are looking good. One minor nit. src/hotspot/share/runtime/arguments.cpp line 3027: > 3025: } else { > 3026: vm_exit_during_initialization("Cannot specify a module more than once to --patch-module", module_name); > 3027: } This just reduces to: else { vm_exit_during_initialization(err_msg("Cannot specify %s more than once to --patch-module", module_name)); } or even: vm_exit_during_initialization("Cannot specify a module more than once to --patch-module", module_name); ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Mon Feb 27 23:00:47 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 27 Feb 2023 23:00:47 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v5] In-Reply-To: References: Message-ID: On Mon, 27 Feb 2023 21:32:57 GMT, David Holmes wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Correct indentation/space usage in makefiles. > > src/hotspot/share/runtime/arguments.cpp line 3027: > >> 3025: } else { >> 3026: vm_exit_during_initialization("Cannot specify a module more than once to --patch-module", module_name); >> 3027: } > > This just reduces to: > > else { > vm_exit_during_initialization(err_msg("Cannot specify %s more than once to --patch-module", module_name)); > } > > or even: > > vm_exit_during_initialization("Cannot specify a module more than once to --patch-module", module_name); Right, for some reason there are several tests that expect different error messages due to the prior implementation split between hotspot argument parsing and ModuleBootstrap. I couldn't see clearly far enough in the EA/Preview/release cycle to be sure of the final disposition and so punted on correcting everything everywhere. Eventually, the provision to replace some classes with value classes unnecessary. The classes will become permanent. But that can only happen after the feature is no-longer preview and is fully integrated. ------------- PR: https://git.openjdk.org/valhalla/pull/816 From rriggs at openjdk.org Mon Feb 27 23:38:13 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 27 Feb 2023 23:38:13 GMT Subject: [lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v6] In-Reply-To: References: Message-ID: > Make copies of classes to be made value classes in src/java.base/valueclasses/classes > Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module. > Add the jar files to $JAVA_HOME/lib/valueclasses/-valueclasses.jar > > Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla. > For each jar, the equivalent of --patch-module = is added and the system properties `jdk.module.patch.` include jar file paths. Roger Riggs has updated the pull request incrementally with two additional commits since the last revision: - Revert unnecessary removals of super() in java.time.zone - Revert unnecessary removals of super() in java.time.format classes. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/816/files - new: https://git.openjdk.org/valhalla/pull/816/files/02453b1c..e9ac22e9 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=05 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=816&range=04-05 Stats: 8 lines in 4 files changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/816.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/816/head:pull/816 PR: https://git.openjdk.org/valhalla/pull/816