From vromero at openjdk.org Sat Oct 1 19:15:48 2022 From: vromero at openjdk.org (Vicente Romero) Date: Sat, 1 Oct 2022 19:15:48 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: fixing regression tests ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/771/files - new: https://git.openjdk.org/valhalla/pull/771/files/6e2d19c9..6264d345 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=01-02 Stats: 67 lines in 9 files changed: 9 ins; 38 del; 20 mod Patch: https://git.openjdk.org/valhalla/pull/771.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/771/head:pull/771 PR: https://git.openjdk.org/valhalla/pull/771 From thartmann at openjdk.org Mon Oct 3 11:49:43 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 3 Oct 2022 11:49:43 GMT Subject: [lworld] RFR: 8293994: [lworld] Deoptimization from nmethod entry barrier breaks scalarized calling convention Message-ID: The recent sweeper removal ([JDK-8290025](https://bugs.openjdk.org/browse/JDK-8290025)) always enabled nmethod entry barriers. This revealed an issue where deoptimization from the slow path (`-XX:+DeoptimizeNMethodBarriersALot`) breaks the scalarized calling convention because once deoptimization is triggered at nmethod entry via `BarrierSetNMethod::deoptimize`, we already converted the calling convention and can't easily go back. Also with method handle invocation logic, we can not tell in `SharedRuntime::handle_wrong_method` which calling convention the callee nmethod converted to. After evaluating several ideas, I found that the cleanest solution is to have an own nmethod entry barrier per entry point right before converting calling conventions. While debugging, I discovered similar issues with the class init barriers, that I'll address in a follow-up fix ([JDK-8294013](https://bugs.openjdk.org/browse/JDK-8294013)). Thanks, Tobias ------------- Commit messages: - Missing aarch64 fix - Fixed native methods - Fixed initialization of orig_pc - 8293994: [lworld] Deoptimization from nmethod entry barrier breaks scalarized calling convention Changes: https://git.openjdk.org/valhalla/pull/773/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=773&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293994 Stats: 335 lines in 22 files changed: 171 ins; 98 del; 66 mod Patch: https://git.openjdk.org/valhalla/pull/773.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/773/head:pull/773 PR: https://git.openjdk.org/valhalla/pull/773 From thartmann at openjdk.org Mon Oct 3 12:05:59 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 3 Oct 2022 12:05:59 GMT Subject: [lworld] Integrated: 8293994: [lworld] Deoptimization from nmethod entry barrier breaks scalarized calling convention In-Reply-To: References: Message-ID: On Mon, 3 Oct 2022 11:41:25 GMT, Tobias Hartmann wrote: > The recent sweeper removal ([JDK-8290025](https://bugs.openjdk.org/browse/JDK-8290025)) always enabled nmethod entry barriers. This revealed an issue where deoptimization from the slow path (`-XX:+DeoptimizeNMethodBarriersALot`) breaks the scalarized calling convention because once deoptimization is triggered at nmethod entry via `BarrierSetNMethod::deoptimize`, we already converted the calling convention and can't easily go back. Also with method handle invocation logic, we can not tell in `SharedRuntime::handle_wrong_method` which calling convention the callee nmethod converted to. > > After evaluating several ideas, I found that the cleanest solution is to have an own nmethod entry barrier per entry point right before converting calling conventions. > > While debugging, I discovered similar issues with the class init barriers, that I'll address in a follow-up fix ([JDK-8294013](https://bugs.openjdk.org/browse/JDK-8294013)). > > Thanks, > Tobias This pull request has now been integrated. Changeset: ee15e2d9 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/ee15e2d905edf29ed7660ca057d6cadb69de3f87 Stats: 335 lines in 22 files changed: 171 ins; 98 del; 66 mod 8293994: [lworld] Deoptimization from nmethod entry barrier breaks scalarized calling convention ------------- PR: https://git.openjdk.org/valhalla/pull/773 From fparain at openjdk.org Mon Oct 3 15:13:38 2022 From: fparain at openjdk.org (Frederic Parain) Date: Mon, 3 Oct 2022 15:13:38 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: On Thu, 29 Sep 2022 06:49:13 GMT, David Simms wrote: >> Runtime component of -XX:+EnablePrimitiveClasses switch > > David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits: > > - Merge branch 'lworld' into 8288135 > - Extra assertion info for tracking spurious issue > - supports_inline_types() refers to classfile and is separate from Enable flags > - Further testing explicity using flags > - Disable EnablePrimitiveClasses by default > - Explictly flag more tests > - Merge branch 'lworld' into 8288135 > - jdk_valhalla tests > - Merge branch 'lworld' into 8288135 > - Further test fixes > - ... and 12 more: https://git.openjdk.org/valhalla/compare/951544ff...1853e0c6 Thank you for tackling this task. My review is more focused on the VM side than on the tests. A few comments to be addressed. Thank you, Fred src/hotspot/share/classfile/classFileParser.cpp line 3328: > 3326: recognized_modifiers |= JVM_ACC_MODULE; > 3327: } > 3328: // JVM_ACC_VALUE, JVM_ACC_PRIMITIVE, and JVM_ACC_IDENTITY are defined depending on version and feature flag The implementation doesn't seem to match the comment nor the intent of the patch. JVM_ACC_VALUE and JVM_ACC_IDENTITY should be controlled by the class file version (tested with supports_inline_types()), but JVM_ACC_PRIMITIVE should be controlled by the class file version and the EnablePrimitiveClasses flag. src/hotspot/share/classfile/classFileParser.cpp line 5235: > 5233: // Can't enable this check fully until JDK upgrades the bytecode generators. > 5234: // For now, compare to class file version 51 so old verifier doesn't see Q signatures. > 5235: if ( (_major_version < 51 /* CONSTANT_CLASS_DESCRIPTORS */ ) || (!EnablePrimitiveClasses)) { Are there a CRs to track the changes requires in the JDK and the status of this check and its dependency to JDK updates? src/hotspot/share/classfile/classFileParser.cpp line 6183: > 6181: recognized_modifiers |= JVM_ACC_MODULE; > 6182: } > 6183: // Are JVM_ACC_VALUE and JVM_ACC_PRIMITIVE support (version and feature check) JVM_ACC_PRIMITIVE should be controlled by both the value of supports_inline_types() and EnablePrimitiveClasses. src/hotspot/share/runtime/arguments.cpp line 3036: > 3034: } > 3035: > 3036: if (!EnableValhalla) { Why silently change the option when -XX:+EnablePrimitiveClass is specified without -XX:+EnableValhalla? Wouldn't be more informative to throw an error message? test/hotspot/jtreg/runtime/valhalla/inlinetypes/classfileparser/BadACCValue.java line 27: > 25: * @test > 26: * @summary test that if a class file has ACC_VALUE or ACC_PRIMITIVE set then it must be run > 27: * with option -XX:+?nableValhalla or -XX:+EnablePrimitiveClasses respectively. Looks like there's an accent on the E of -XX:+?nableValhalla. ------------- Changes requested by fparain (Committer). PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 07:13:46 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 07:13:46 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: On Mon, 3 Oct 2022 14:09:29 GMT, Frederic Parain wrote: >> David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits: >> >> - Merge branch 'lworld' into 8288135 >> - Extra assertion info for tracking spurious issue >> - supports_inline_types() refers to classfile and is separate from Enable flags >> - Further testing explicity using flags >> - Disable EnablePrimitiveClasses by default >> - Explictly flag more tests >> - Merge branch 'lworld' into 8288135 >> - jdk_valhalla tests >> - Merge branch 'lworld' into 8288135 >> - Further test fixes >> - ... and 12 more: https://git.openjdk.org/valhalla/compare/951544ff...1853e0c6 > > src/hotspot/share/classfile/classFileParser.cpp line 3328: > >> 3326: recognized_modifiers |= JVM_ACC_MODULE; >> 3327: } >> 3328: // JVM_ACC_VALUE, JVM_ACC_PRIMITIVE, and JVM_ACC_IDENTITY are defined depending on version and feature flag > > The implementation doesn't seem to match the comment nor the intent of the patch. JVM_ACC_VALUE and JVM_ACC_IDENTITY should be controlled by the class file version (tested with supports_inline_types()), but JVM_ACC_PRIMITIVE should be controlled by the class file version and the EnablePrimitiveClasses flag. Agree the comment doesn't quite match. Let me check the behavior is correct: Currently (in this patch); - if the classfile is new enough to be aware of the existence (`supports_inline_types()`) of new flags, the are placed in the recognized set, and later feature checks produce errors to use the appropriate switches - older classfiles we simply ignore modifiers that were not defined at the time of that version, if one took a new primitive, and downgraded it's version, the VM will quietly ignore these modifiers (but probably take issue with other classfile features, like static factory with special naming) - `ACC_SUPER `and `ACC_IDENTITY` overlap requires special handling based on both version and feature flag (`EnableValhalla`) Is this your view too ? ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 07:21:32 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 07:21:32 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 07:10:03 GMT, David Simms wrote: >> src/hotspot/share/classfile/classFileParser.cpp line 3328: >> >>> 3326: recognized_modifiers |= JVM_ACC_MODULE; >>> 3327: } >>> 3328: // JVM_ACC_VALUE, JVM_ACC_PRIMITIVE, and JVM_ACC_IDENTITY are defined depending on version and feature flag >> >> The implementation doesn't seem to match the comment nor the intent of the patch. JVM_ACC_VALUE and JVM_ACC_IDENTITY should be controlled by the class file version (tested with supports_inline_types()), but JVM_ACC_PRIMITIVE should be controlled by the class file version and the EnablePrimitiveClasses flag. > > Agree the comment doesn't quite match. Let me check the behavior is correct: > > Currently (in this patch); > - if the classfile is new enough to be aware of the existence (`supports_inline_types()`) of new flags, the are placed in the recognized set, and later feature checks produce errors to use the appropriate switches > - older classfiles we simply ignore modifiers that were not defined at the time of that version, if one took a new primitive, and downgraded it's version, the VM will quietly ignore these modifiers (but probably take issue with other classfile features, like static factory with special naming) > - `ACC_SUPER `and `ACC_IDENTITY` overlap requires special handling based on both version and feature flag (`EnableValhalla`) > > Is this your view too ? Comment removed, it seems superfluous (the code describes itself). ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 08:22:36 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 08:22:36 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: On Mon, 3 Oct 2022 14:13:13 GMT, Frederic Parain wrote: >> David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits: >> >> - Merge branch 'lworld' into 8288135 >> - Extra assertion info for tracking spurious issue >> - supports_inline_types() refers to classfile and is separate from Enable flags >> - Further testing explicity using flags >> - Disable EnablePrimitiveClasses by default >> - Explictly flag more tests >> - Merge branch 'lworld' into 8288135 >> - jdk_valhalla tests >> - Merge branch 'lworld' into 8288135 >> - Further test fixes >> - ... and 12 more: https://git.openjdk.org/valhalla/compare/951544ff...1853e0c6 > > src/hotspot/share/runtime/arguments.cpp line 3036: > >> 3034: } >> 3035: >> 3036: if (!EnableValhalla) { > > Why silently change the option when -XX:+EnablePrimitiveClass is specified without -XX:+EnableValhalla? Wouldn't be more informative to throw an error message? Agreed, added error message ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 08:31:18 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 08:31:18 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: <_kxByALqJ7hdpc_w98bEphJZT7_k4d73aF_A8CmJE3M=.b5eb5277-17e3-43fb-84d6-828e216052c7@github.com> On Mon, 3 Oct 2022 14:21:22 GMT, Frederic Parain wrote: >> David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits: >> >> - Merge branch 'lworld' into 8288135 >> - Extra assertion info for tracking spurious issue >> - supports_inline_types() refers to classfile and is separate from Enable flags >> - Further testing explicity using flags >> - Disable EnablePrimitiveClasses by default >> - Explictly flag more tests >> - Merge branch 'lworld' into 8288135 >> - jdk_valhalla tests >> - Merge branch 'lworld' into 8288135 >> - Further test fixes >> - ... and 12 more: https://git.openjdk.org/valhalla/compare/951544ff...1853e0c6 > > src/hotspot/share/classfile/classFileParser.cpp line 5235: > >> 5233: // Can't enable this check fully until JDK upgrades the bytecode generators. >> 5234: // For now, compare to class file version 51 so old verifier doesn't see Q signatures. >> 5235: if ( (_major_version < 51 /* CONSTANT_CLASS_DESCRIPTORS */ ) || (!EnablePrimitiveClasses)) { > > Are there a CRs to track the changes requires in the JDK and the status of this check and its dependency to JDK updates? I can add a reference to [JDK-8270852](https://bugs.openjdk.org/browse/JDK-8270852) ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 08:34:52 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 08:34:52 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v10] In-Reply-To: References: Message-ID: On Mon, 3 Oct 2022 14:30:54 GMT, Frederic Parain wrote: >> David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits: >> >> - Merge branch 'lworld' into 8288135 >> - Extra assertion info for tracking spurious issue >> - supports_inline_types() refers to classfile and is separate from Enable flags >> - Further testing explicity using flags >> - Disable EnablePrimitiveClasses by default >> - Explictly flag more tests >> - Merge branch 'lworld' into 8288135 >> - jdk_valhalla tests >> - Merge branch 'lworld' into 8288135 >> - Further test fixes >> - ... and 12 more: https://git.openjdk.org/valhalla/compare/951544ff...1853e0c6 > > src/hotspot/share/classfile/classFileParser.cpp line 6183: > >> 6181: recognized_modifiers |= JVM_ACC_MODULE; >> 6182: } >> 6183: // Are JVM_ACC_VALUE and JVM_ACC_PRIMITIVE support (version and feature check) > > JVM_ACC_PRIMITIVE should be controlled by both the value of supports_inline_types() and EnablePrimitiveClasses. Reverted comment to "defined for class version" `// JVM_ACC_VALUE and JVM_ACC_PRIMITIVE are defined for supported version` > test/hotspot/jtreg/runtime/valhalla/inlinetypes/classfileparser/BadACCValue.java line 27: > >> 25: * @test >> 26: * @summary test that if a class file has ACC_VALUE or ACC_PRIMITIVE set then it must be run >> 27: * with option -XX:+?nableValhalla or -XX:+EnablePrimitiveClasses respectively. > > Looks like there's an accent on the E of -XX:+?nableValhalla. Oh yeah, nice spot ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Tue Oct 4 09:41:19 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 4 Oct 2022 09:41:19 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v11] In-Reply-To: References: Message-ID: > Runtime component of -XX:+EnablePrimitiveClasses switch David Simms has updated the pull request incrementally with one additional commit since the last revision: Review comments applied ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/727/files - new: https://git.openjdk.org/valhalla/pull/727/files/1853e0c6..75113462 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=727&range=10 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=727&range=09-10 Stats: 8 lines in 3 files changed: 2 ins; 1 del; 5 mod Patch: https://git.openjdk.org/valhalla/pull/727.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/727/head:pull/727 PR: https://git.openjdk.org/valhalla/pull/727 From mchung at openjdk.org Tue Oct 4 18:43:56 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 18:43:56 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v11] In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 09:41:19 GMT, David Simms wrote: >> Runtime component of -XX:+EnablePrimitiveClasses switch > > David Simms has updated the pull request incrementally with one additional commit since the last revision: > > Review comments applied test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template line 29: > 27: * @test > 28: * @compile -XDenablePrimitiveClasses Point.java Value.java VarHandleTestMethodHandleAccess$Type$.java > 29: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses -Diters=2000 VarHandleTestMethodHandleAccess$Type$ X-VarHandleTestXXX.java.template changes look wrong and maybe merge issue. These files were updated recently. For VarHandles tests, you only need to modify X-VarHandleTestXXX.java.template files to add `-XX:+EnablePrimitiveClasses` flag and then run `test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh` that will regenerate the `test/jdk/java/lang/invoke/VarHandles/VarHandle*` tests. ------------- PR: https://git.openjdk.org/valhalla/pull/727 From mchung at openjdk.org Tue Oct 4 19:01:25 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 19:01:25 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes Message-ID: This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. ------------- Commit messages: - 8294797: [lworld] update javadoc to remove references to primitive classes Changes: https://git.openjdk.org/valhalla/pull/774/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=774&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294797 Stats: 81 lines in 13 files changed: 13 ins; 38 del; 30 mod Patch: https://git.openjdk.org/valhalla/pull/774.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/774/head:pull/774 PR: https://git.openjdk.org/valhalla/pull/774 From rriggs at openjdk.org Tue Oct 4 19:22:38 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 4 Oct 2022 19:22:38 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE Message-ID: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. Update ClassAccessFlagTest and ObjectMethods test to check consistency between Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). ------------- Commit messages: - 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE Changes: https://git.openjdk.org/valhalla/pull/775/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294678 Stats: 48 lines in 3 files changed: 30 ins; 0 del; 18 mod Patch: https://git.openjdk.org/valhalla/pull/775.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/775/head:pull/775 PR: https://git.openjdk.org/valhalla/pull/775 From mchung at openjdk.org Tue Oct 4 20:07:46 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 20:07:46 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE In-Reply-To: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Tue, 4 Oct 2022 19:16:50 GMT, Roger Riggs wrote: > The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. > Update ClassAccessFlagTest and ObjectMethods test to check consistency between > Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). src/java.base/share/classes/java/lang/Class.java line 1522: > 1520: final int mask = ((location == AccessFlag.Location.CLASS) ? > 1521: getClassAccessFlagsRaw() : getModifiers()) | > 1522: (isArray() ? Modifier.IDENTITY : 0); For an array class `a`, `a.accessFlags()` and `AccessFlag.maskToAccessFlags(a.getModifiers(), Location.CLASS)` won't return the same `AccessFlag` set then. The access flags for array type is special anyway. It would be less confusing if `Class::accessFlags()` is consistent with `Class::getModifiers()`. ------------- PR: https://git.openjdk.org/valhalla/pull/775 From mchung at openjdk.org Tue Oct 4 20:12:02 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 20:12:02 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes [v2] In-Reply-To: References: Message-ID: <2tKW0IgDjcPu8OvHCyFEqs9zU5Lh5cAo6Z2j0SVOG-M=.c57be758-bc04-4469-9e9e-6101ddc743ec@github.com> > This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. Mandy Chung has refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/774/files - new: https://git.openjdk.org/valhalla/pull/774/files/7c2794d4..ee15e2d9 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=774&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=774&range=00-01 Stats: 81 lines in 13 files changed: 38 ins; 13 del; 30 mod Patch: https://git.openjdk.org/valhalla/pull/774.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/774/head:pull/774 PR: https://git.openjdk.org/valhalla/pull/774 From mchung at openjdk.org Tue Oct 4 20:12:03 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 20:12:03 GMT Subject: [lworld] Withdrawn: 8294797: [lworld] update javadoc to remove references to primitive classes In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 18:53:23 GMT, Mandy Chung wrote: > This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/valhalla/pull/774 From mchung at openjdk.org Tue Oct 4 20:14:17 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 4 Oct 2022 20:14:17 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes Message-ID: This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. ------------- Commit messages: - 8294797: [lworld] update javadoc to remove references to primitive classes Changes: https://git.openjdk.org/valhalla/pull/776/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=776&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294797 Stats: 81 lines in 13 files changed: 13 ins; 38 del; 30 mod Patch: https://git.openjdk.org/valhalla/pull/776.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/776/head:pull/776 PR: https://git.openjdk.org/valhalla/pull/776 From rriggs at openjdk.org Tue Oct 4 20:42:19 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 4 Oct 2022 20:42:19 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v2] In-Reply-To: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: > The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. > Update ClassAccessFlagTest and ObjectMethods test to check consistency between > Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Update ObjectMethods test ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/775/files - new: https://git.openjdk.org/valhalla/pull/775/files/8515d97e..16c95593 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=00-01 Stats: 7 lines in 1 file changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/valhalla/pull/775.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/775/head:pull/775 PR: https://git.openjdk.org/valhalla/pull/775 From rriggs at openjdk.org Tue Oct 4 20:54:36 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 4 Oct 2022 20:54:36 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v2] In-Reply-To: References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Tue, 4 Oct 2022 20:03:59 GMT, Mandy Chung wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Update ObjectMethods test > > src/java.base/share/classes/java/lang/Class.java line 1522: > >> 1520: final int mask = ((location == AccessFlag.Location.CLASS) ? >> 1521: getClassAccessFlagsRaw() : getModifiers()) | >> 1522: (isArray() ? Modifier.IDENTITY : 0); > > For an array class `a`, `a.accessFlags()` and `AccessFlag.maskToAccessFlags(a.getModifiers(), Location.CLASS)` won't return the same `AccessFlag` set then. The access flags for array type is special anyway. It would be less confusing if `Class::accessFlags()` is consistent with `Class::getModifiers()`. My goal was to have the Class.accessFlags() be consistent with Class methods `isIdentity()` and `isValue()`. Unless we prevail in adding ACC_IDENTITY and ACC_VALUE to Class.getModifiers() there will be an inconsistency among the APIs. `getModifiers()`, though the oldest, has the least flexibility. The goal of the AccessFlags API was to be more flexible, correct, and extensible. It is a question of what the end state should be and how to get there. (The check for isArray() to select the INNER_CLASS location was from the original AccessFlag PR.) ------------- PR: https://git.openjdk.org/valhalla/pull/775 From dsimms at openjdk.org Wed Oct 5 06:26:34 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 5 Oct 2022 06:26:34 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v11] In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 18:40:20 GMT, Mandy Chung wrote: >> David Simms has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments applied > > test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template line 29: > >> 27: * @test >> 28: * @compile -XDenablePrimitiveClasses Point.java Value.java VarHandleTestMethodHandleAccess$Type$.java >> 29: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses -Diters=2000 VarHandleTestMethodHandleAccess$Type$ > > X-VarHandleTestXXX.java.template changes look wrong and maybe merge issue. These files were updated recently. > > For VarHandles tests, you only need to modify X-VarHandleTestXXX.java.template files to add `-XX:+EnablePrimitiveClasses` flag and then run `test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh` that will regenerate the `test/jdk/java/lang/invoke/VarHandles/VarHandle*` tests. So the problem here is SPP. AFAIK, SPP doesn't support boolean expressions, and `X-VarHandleTestMethodHandleAccess.java.template` refers to both `Value` and `Point `. I'm sure there are reasons why the build systems' C preprocessor isn't being used, at build time, and we remove generated source from the repository, but that feels out of scope for this change. ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Wed Oct 5 06:28:47 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 5 Oct 2022 06:28:47 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v12] In-Reply-To: References: Message-ID: > Runtime component of -XX:+EnablePrimitiveClasses switch David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 24 commits: - Merge branch 'lworld' into 8288135 - Review comments applied - Merge branch 'lworld' into 8288135 - Extra assertion info for tracking spurious issue - supports_inline_types() refers to classfile and is separate from Enable flags - Further testing explicity using flags - Disable EnablePrimitiveClasses by default - Explictly flag more tests - Merge branch 'lworld' into 8288135 - jdk_valhalla tests - ... and 14 more: https://git.openjdk.org/valhalla/compare/ee15e2d9...92e5253d ------------- Changes: https://git.openjdk.org/valhalla/pull/727/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=727&range=11 Stats: 1365 lines in 245 files changed: 836 ins; 65 del; 464 mod Patch: https://git.openjdk.org/valhalla/pull/727.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/727/head:pull/727 PR: https://git.openjdk.org/valhalla/pull/727 From thartmann at openjdk.org Wed Oct 5 11:19:12 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 5 Oct 2022 11:19:12 GMT Subject: [lworld] RFR: 8294013: [lworld] Missing class init barriers in c2i adapter Message-ID: Class initialization barriers for static methods are missing in the non-scalarized entry points of nmethods and c2i adapters. I extended the corresponding test to cover this case. Thanks, Tobias ------------- Commit messages: - 8294013: [lworld] Missing class init barriers in c2i adapter Changes: https://git.openjdk.org/valhalla/pull/778/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=778&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294013 Stats: 238 lines in 8 files changed: 89 ins; 76 del; 73 mod Patch: https://git.openjdk.org/valhalla/pull/778.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/778/head:pull/778 PR: https://git.openjdk.org/valhalla/pull/778 From thartmann at openjdk.org Wed Oct 5 11:34:46 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 5 Oct 2022 11:34:46 GMT Subject: [lworld] Integrated: 8294013: [lworld] Missing class init barriers in c2i adapter In-Reply-To: References: Message-ID: On Wed, 5 Oct 2022 11:11:27 GMT, Tobias Hartmann wrote: > Class initialization barriers for static methods are missing in the non-scalarized entry points of nmethods and c2i adapters. I extended the corresponding test to cover this case. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 9932689c Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/9932689c343ddfe3d5586ce6c3817f2f96d54258 Stats: 238 lines in 8 files changed: 89 ins; 76 del; 73 mod 8294013: [lworld] Missing class init barriers in c2i adapter ------------- PR: https://git.openjdk.org/valhalla/pull/778 From fparain at openjdk.org Wed Oct 5 12:03:38 2022 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 5 Oct 2022 12:03:38 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v12] In-Reply-To: References: Message-ID: On Wed, 5 Oct 2022 06:28:47 GMT, David Simms wrote: >> Runtime component of -XX:+EnablePrimitiveClasses switch > > David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 24 commits: > > - Merge branch 'lworld' into 8288135 > - Review comments applied > - Merge branch 'lworld' into 8288135 > - Extra assertion info for tracking spurious issue > - supports_inline_types() refers to classfile and is separate from Enable flags > - Further testing explicity using flags > - Disable EnablePrimitiveClasses by default > - Explictly flag more tests > - Merge branch 'lworld' into 8288135 > - jdk_valhalla tests > - ... and 14 more: https://git.openjdk.org/valhalla/compare/ee15e2d9...92e5253d Thanks for the changes. However, recognized modifiers still need a fix, see proposed code. Fred src/hotspot/share/classfile/classFileParser.cpp line 3328: > 3326: recognized_modifiers |= JVM_ACC_MODULE; > 3327: } > 3328: if (supports_inline_types()) { Suggestion: if (supports_inline_types() { recognized_modifiers |= JVM_ACC_VALUE | JVM_ACC_IDENTITY; if (EnablePrimitiveClasses) { recognized_modifiers |= JVM_ACC_PRIMITIVE; } } ------------- Changes requested by fparain (Committer). PR: https://git.openjdk.org/valhalla/pull/727 From fparain at openjdk.org Wed Oct 5 12:33:40 2022 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 5 Oct 2022 12:33:40 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v12] In-Reply-To: References: Message-ID: <7qQzYCZoCVIV9jok9e-Nz84KvXWe5d-qrzto2P3AjR0=.aaad566f-de54-4f7a-ab55-94c9d9daa20a@github.com> On Wed, 5 Oct 2022 06:28:47 GMT, David Simms wrote: >> Runtime component of -XX:+EnablePrimitiveClasses switch > > David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 24 commits: > > - Merge branch 'lworld' into 8288135 > - Review comments applied > - Merge branch 'lworld' into 8288135 > - Extra assertion info for tracking spurious issue > - supports_inline_types() refers to classfile and is separate from Enable flags > - Further testing explicity using flags > - Disable EnablePrimitiveClasses by default > - Explictly flag more tests > - Merge branch 'lworld' into 8288135 > - jdk_valhalla tests > - ... and 14 more: https://git.openjdk.org/valhalla/compare/ee15e2d9...92e5253d Marked as reviewed by fparain (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/727 From rriggs at openjdk.org Wed Oct 5 17:24:49 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 5 Oct 2022 17:24:49 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v3] In-Reply-To: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: > The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. > Update ClassAccessFlagTest and ObjectMethods test to check consistency between > Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add test cases for interfaces and class with explicit identity and value class declarations ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/775/files - new: https://git.openjdk.org/valhalla/pull/775/files/16c95593..ef450fbe Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=01-02 Stats: 37 lines in 1 file changed: 36 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/775.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/775/head:pull/775 PR: https://git.openjdk.org/valhalla/pull/775 From rriggs at openjdk.org Wed Oct 5 17:44:34 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 5 Oct 2022 17:44:34 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v3] In-Reply-To: References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Tue, 4 Oct 2022 20:50:46 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/Class.java line 1522: >> >>> 1520: final int mask = ((location == AccessFlag.Location.CLASS) ? >>> 1521: getClassAccessFlagsRaw() : getModifiers()) | >>> 1522: (isArray() ? Modifier.IDENTITY : 0); >> >> For an array class `a`, `a.accessFlags()` and `AccessFlag.maskToAccessFlags(a.getModifiers(), Location.CLASS)` won't return the same `AccessFlag` set then. The access flags for array type is special anyway. It would be less confusing if `Class::accessFlags()` is consistent with `Class::getModifiers()`. > > My goal was to have the Class.accessFlags() be consistent with Class methods `isIdentity()` and `isValue()`. > Unless we prevail in adding ACC_IDENTITY and ACC_VALUE to Class.getModifiers() there will be an inconsistency among the APIs. `getModifiers()`, though the oldest, has the least flexibility. The goal of the AccessFlags API was to be more flexible, correct, and extensible. It is a question of what the end state should be and how to get there. > (The check for isArray() to select the INNER_CLASS location was from the original AccessFlag PR.) I'd like to commit this PR as is on this point and propose a separate PR to add ACC_IDENTITY and ACC_VALUE to the modifiers for arrays to be able to judge the impact and get further review. https://bugs.openjdk.org/browse/JDK-8294866 ------------- PR: https://git.openjdk.org/valhalla/pull/775 From mchung at openjdk.org Wed Oct 5 18:38:44 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 5 Oct 2022 18:38:44 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v3] In-Reply-To: References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Wed, 5 Oct 2022 17:41:12 GMT, Roger Riggs wrote: >> My goal was to have the Class.accessFlags() be consistent with Class methods `isIdentity()` and `isValue()`. >> Unless we prevail in adding ACC_IDENTITY and ACC_VALUE to Class.getModifiers() there will be an inconsistency among the APIs. `getModifiers()`, though the oldest, has the least flexibility. The goal of the AccessFlags API was to be more flexible, correct, and extensible. It is a question of what the end state should be and how to get there. >> (The check for isArray() to select the INNER_CLASS location was from the original AccessFlag PR.) > > I'd like to commit this PR as is on this point and propose a separate PR to add ACC_IDENTITY and ACC_VALUE to the modifiers for arrays to be able to judge the impact and get further review. > https://bugs.openjdk.org/browse/JDK-8294866 I agree that we should discuss the modifiers for arrays in a follow-on issue. I suggest this PR to keep `Class::getModifiers` and `Class::accessFlags` consistent to match the specification. JDK-8294866 will do the spec change altogether. ------------- PR: https://git.openjdk.org/valhalla/pull/775 From mchung at openjdk.org Wed Oct 5 18:55:39 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 5 Oct 2022 18:55:39 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v11] In-Reply-To: References: Message-ID: On Wed, 5 Oct 2022 06:22:29 GMT, David Simms wrote: >> test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template line 29: >> >>> 27: * @test >>> 28: * @compile -XDenablePrimitiveClasses Point.java Value.java VarHandleTestMethodHandleAccess$Type$.java >>> 29: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses -Diters=2000 VarHandleTestMethodHandleAccess$Type$ >> >> X-VarHandleTestXXX.java.template changes look wrong and maybe merge issue. These files were updated recently. >> >> For VarHandles tests, you only need to modify X-VarHandleTestXXX.java.template files to add `-XX:+EnablePrimitiveClasses` flag and then run `test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh` that will regenerate the `test/jdk/java/lang/invoke/VarHandles/VarHandle*` tests. > > So the problem here is SPP. AFAIK, SPP doesn't support boolean expressions, and `X-VarHandleTestMethodHandleAccess.java.template` refers to both `Value` and `Point `. > > I'm sure there are reasons why the build systems' C preprocessor isn't being used, at build time, and we remove generated source from the repository, but that feels out of scope for this change. I think there may be confusion due to the name `Value`. Both `Point` and `Value` class are value classes. `-KValue` implies using primitive class. That was done in LW1 or LW2 before the value objects JEP. It's on my TODO to update these tests for value objects. It is okay to remove `if[Point]` case that was added to reduce `iters` from 20000 to 2000. If you want to remove `if[Point]`, use `-Diters=20000` instead. Suggestion: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses -Diters=20000 VarHandleTestMethodHandleAccess$Type$ ------------- PR: https://git.openjdk.org/valhalla/pull/727 From mchung at openjdk.org Wed Oct 5 18:55:41 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 5 Oct 2022 18:55:41 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v12] In-Reply-To: References: Message-ID: On Wed, 5 Oct 2022 06:28:47 GMT, David Simms wrote: >> Runtime component of -XX:+EnablePrimitiveClasses switch > > David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 24 commits: > > - Merge branch 'lworld' into 8288135 > - Review comments applied > - Merge branch 'lworld' into 8288135 > - Extra assertion info for tracking spurious issue > - supports_inline_types() refers to classfile and is separate from Enable flags > - Further testing explicity using flags > - Disable EnablePrimitiveClasses by default > - Explictly flag more tests > - Merge branch 'lworld' into 8288135 > - jdk_valhalla tests > - ... and 14 more: https://git.openjdk.org/valhalla/compare/ee15e2d9...92e5253d test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template line 29: > 27: * @test > 28: * @bug 8156486 > 29: #if[Point] This change intends to make `@compile....` to be conditional. So it can simply do: Suggestion: #if[Point] * @compile -XDenablePrimitiveClasses Point.java Value.java VarHandleTestMethodType$Type$.java #end[Point] No need to duplicate all `@run` statements. test/jdk/valhalla/valuetypes/QTypeDescriptorTest.java line 30: > 28: * @compile -XDenablePrimitiveClasses QTypeDescriptorTest.java > 29: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses QTypeDescriptorTest > 30: * @compile -XDenablePrimitiveClasses QTypeDescriptorTest.java This `@compile` seems duplicated. Since you are on this file, do u mind taking it out? ------------- PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Wed Oct 5 18:55:41 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 5 Oct 2022 18:55:41 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v12] In-Reply-To: References: Message-ID: On Wed, 5 Oct 2022 18:46:31 GMT, Mandy Chung wrote: >> David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 24 commits: >> >> - Merge branch 'lworld' into 8288135 >> - Review comments applied >> - Merge branch 'lworld' into 8288135 >> - Extra assertion info for tracking spurious issue >> - supports_inline_types() refers to classfile and is separate from Enable flags >> - Further testing explicity using flags >> - Disable EnablePrimitiveClasses by default >> - Explictly flag more tests >> - Merge branch 'lworld' into 8288135 >> - jdk_valhalla tests >> - ... and 14 more: https://git.openjdk.org/valhalla/compare/ee15e2d9...92e5253d > > test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template line 29: > >> 27: * @test >> 28: * @bug 8156486 >> 29: #if[Point] > > This change intends to make `@compile....` to be conditional. So it can simply do: > > Suggestion: > > #if[Point] > * @compile -XDenablePrimitiveClasses Point.java Value.java VarHandleTestMethodType$Type$.java > #end[Point] > > > No need to duplicate all `@run` statements. Check > test/jdk/valhalla/valuetypes/QTypeDescriptorTest.java line 30: > >> 28: * @compile -XDenablePrimitiveClasses QTypeDescriptorTest.java >> 29: * @run testng/othervm -XX:+EnableValhalla -XX:+EnablePrimitiveClasses QTypeDescriptorTest >> 30: * @compile -XDenablePrimitiveClasses QTypeDescriptorTest.java > > This `@compile` seems duplicated. Since you are on this file, do u mind taking it out? NP ------------- PR: https://git.openjdk.org/valhalla/pull/727 From vromero at openjdk.org Wed Oct 5 19:15:43 2022 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 5 Oct 2022 19:15:43 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v4] In-Reply-To: References: Message-ID: > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: javac is generating method for abstract value classes ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/771/files - new: https://git.openjdk.org/valhalla/pull/771/files/6264d345..eaa6b66d Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=02-03 Stats: 34 lines in 10 files changed: 4 ins; 16 del; 14 mod Patch: https://git.openjdk.org/valhalla/pull/771.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/771/head:pull/771 PR: https://git.openjdk.org/valhalla/pull/771 From rriggs at openjdk.org Wed Oct 5 20:24:35 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 5 Oct 2022 20:24:35 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v4] In-Reply-To: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: > The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. > Update ClassAccessFlagTest and ObjectMethods test to check consistency between > Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Revert changes to AccessFlags that would return IDENTITY for array classes. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/775/files - new: https://git.openjdk.org/valhalla/pull/775/files/ef450fbe..07774305 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=775&range=02-03 Stats: 12 lines in 3 files changed: 1 ins; 2 del; 9 mod Patch: https://git.openjdk.org/valhalla/pull/775.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/775/head:pull/775 PR: https://git.openjdk.org/valhalla/pull/775 From rriggs at openjdk.org Wed Oct 5 21:19:27 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 5 Oct 2022 21:19:27 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v4] In-Reply-To: References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Wed, 5 Oct 2022 18:36:29 GMT, Mandy Chung wrote: >> I'd like to commit this PR as is on this point and propose a separate PR to add ACC_IDENTITY and ACC_VALUE to the modifiers for arrays to be able to judge the impact and get further review. >> https://bugs.openjdk.org/browse/JDK-8294866 > > I agree that we should discuss the modifiers for arrays in a follow-on issue. I suggest this PR to keep `Class::getModifiers` and `Class::accessFlags` consistent to match the specification. JDK-8294866 will do the spec change altogether. done ------------- PR: https://git.openjdk.org/valhalla/pull/775 From mchung at openjdk.org Wed Oct 5 22:42:43 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 5 Oct 2022 22:42:43 GMT Subject: [lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v4] In-Reply-To: References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Wed, 5 Oct 2022 20:24:35 GMT, Roger Riggs wrote: >> The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. >> Update ClassAccessFlagTest and ObjectMethods test to check consistency between >> Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Revert changes to AccessFlags that would return IDENTITY for array classes. Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/775 From vromero at openjdk.org Thu Oct 6 03:27:04 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 6 Oct 2022 03:27:04 GMT Subject: [lworld] Integrated: 8294774: add more regression tests for value objects Message-ID: additional test coverage for value objects ------------- Commit messages: - adding tests for compiler keys in the not-yet file - updating compiler error key - 8294774: add more regression tests for value objects Changes: https://git.openjdk.org/valhalla/pull/777/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=777&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294774 Stats: 559 lines in 20 files changed: 469 ins; 37 del; 53 mod Patch: https://git.openjdk.org/valhalla/pull/777.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/777/head:pull/777 PR: https://git.openjdk.org/valhalla/pull/777 From vromero at openjdk.org Thu Oct 6 03:27:05 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 6 Oct 2022 03:27:05 GMT Subject: [lworld] Integrated: 8294774: add more regression tests for value objects In-Reply-To: References: Message-ID: <0T0LzOLsx14o2hTgNW7WjNfd_jYW3Cyke349NjVgDsc=.ea56ae35-a6e3-43d7-8285-a3914f2c9687@github.com> On Tue, 4 Oct 2022 20:59:26 GMT, Vicente Romero wrote: > additional test coverage for value objects This pull request has now been integrated. Changeset: 6d4ad250 Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/6d4ad25077f07b978919b0fb40771cd84cc5bbed Stats: 559 lines in 20 files changed: 469 ins; 37 del; 53 mod 8294774: add more regression tests for value objects ------------- PR: https://git.openjdk.org/valhalla/pull/777 From rriggs at openjdk.org Thu Oct 6 14:20:20 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 6 Oct 2022 14:20:20 GMT Subject: [lworld] Integrated: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE In-Reply-To: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> References: <49z9wFHJu4vjRaf8K1FSAnErUwrDpJ8IfWW-Vups-SI=.a96a670b-ad69-43c3-957f-6bccdac826f1@github.com> Message-ID: On Tue, 4 Oct 2022 19:16:50 GMT, Roger Riggs wrote: > The tests for Class.accessFlags should be updated to check ACC_IDENTITY and ACC_VALUE. > Update ClassAccessFlagTest and ObjectMethods test to check consistency between > Class.isIdentity() and Class.isValue() methods with the Class accessFlags(). This pull request has now been integrated. Changeset: 866adb67 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/866adb676c5a22133e5dcb6cad84da2a104844b2 Stats: 82 lines in 3 files changed: 65 ins; 0 del; 17 mod 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/775 From rriggs at openjdk.org Thu Oct 6 16:40:34 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 6 Oct 2022 16:40:34 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 20:08:58 GMT, Mandy Chung wrote: > This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. src/java.base/share/classes/java/lang/ref/PhantomReference.java line 94: > 92: * @param q the queue with which the reference is to be registered, > 93: * or {@code null} if registration is not required > 94: * @throws IdentityException if the referent is an instance of an Instead this should refer to isIdentity(), the implementation uses Objects.isIdentityObject(referent). Perhaps: @throws IdentityException if the referent is not an {@link Objects#isIdentityObject(Object o) identity object}. The same applied to SoftReference and WeakReference. (below) ------------- PR: https://git.openjdk.org/valhalla/pull/776 From vromero at openjdk.org Thu Oct 6 17:15:34 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 6 Oct 2022 17:15:34 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v5] In-Reply-To: References: Message-ID: <5pyq7z0DGN68O4Dsg6LYTGeJPVAUnVK6kl8B4x0A0PQ=.ecc75164-1619-431a-a27f-9d0d0db43f67@github.com> > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge branch 'lworld' into JDK-8247569 - javac is generating method for abstract value classes - fixing regression tests - removing experimental code - 8247569: [lworld] Align with spec for methods ------------- Changes: https://git.openjdk.org/valhalla/pull/771/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=04 Stats: 293 lines in 47 files changed: 87 ins; 59 del; 147 mod Patch: https://git.openjdk.org/valhalla/pull/771.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/771/head:pull/771 PR: https://git.openjdk.org/valhalla/pull/771 From mchung at openjdk.org Thu Oct 6 17:38:34 2022 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 6 Oct 2022 17:38:34 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes [v2] In-Reply-To: References: Message-ID: <2JYHyvfIcKoVYmT-pGMABqxhjqWMaYEV0ii5meOfkZk=.869ec76f-c613-4088-88a9-1dea0e103f6d@github.com> > This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. Mandy Chung 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 @throws for references - Merge branch 'lworld' of https://github.com/openjdk/valhalla into javadoc-fix - 8294797: [lworld] update javadoc to remove references to primitive classes ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/776/files - new: https://git.openjdk.org/valhalla/pull/776/files/7c2794d4..f0d6634b Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=776&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=776&range=00-01 Stats: 891 lines in 35 files changed: 624 ins; 113 del; 154 mod Patch: https://git.openjdk.org/valhalla/pull/776.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/776/head:pull/776 PR: https://git.openjdk.org/valhalla/pull/776 From mchung at openjdk.org Thu Oct 6 17:38:34 2022 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 6 Oct 2022 17:38:34 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes [v2] In-Reply-To: References: Message-ID: On Thu, 6 Oct 2022 16:34:13 GMT, Roger Riggs wrote: >> Mandy Chung 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 @throws for references >> - Merge branch 'lworld' of https://github.com/openjdk/valhalla into javadoc-fix >> - 8294797: [lworld] update javadoc to remove references to primitive classes > > src/java.base/share/classes/java/lang/ref/PhantomReference.java line 94: > >> 92: * @param q the queue with which the reference is to be registered, >> 93: * or {@code null} if registration is not required >> 94: * @throws IdentityException if the referent is an instance of an > > Instead this should refer to isIdentity(), the implementation uses Objects.isIdentityObject(referent). > Perhaps: > @throws IdentityException if the referent is not an {@link Objects#isIdentityObject(Object o) identity object}. > > The same applied to SoftReference and WeakReference. (below) updated. ------------- PR: https://git.openjdk.org/valhalla/pull/776 From rriggs at openjdk.org Thu Oct 6 17:42:14 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 6 Oct 2022 17:42:14 GMT Subject: [lworld] RFR: 8294797: [lworld] update javadoc to remove references to primitive classes [v2] In-Reply-To: <2JYHyvfIcKoVYmT-pGMABqxhjqWMaYEV0ii5meOfkZk=.869ec76f-c613-4088-88a9-1dea0e103f6d@github.com> References: <2JYHyvfIcKoVYmT-pGMABqxhjqWMaYEV0ii5meOfkZk=.869ec76f-c613-4088-88a9-1dea0e103f6d@github.com> Message-ID: On Thu, 6 Oct 2022 17:38:34 GMT, Mandy Chung wrote: >> This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. > > Mandy Chung 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 @throws for references > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into javadoc-fix > - 8294797: [lworld] update javadoc to remove references to primitive classes Marked as reviewed by rriggs (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/776 From mchung at openjdk.org Thu Oct 6 18:13:32 2022 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 6 Oct 2022 18:13:32 GMT Subject: [lworld] Integrated: 8294797: [lworld] update javadoc to remove references to primitive classes In-Reply-To: References: Message-ID: On Tue, 4 Oct 2022 20:08:58 GMT, Mandy Chung wrote: > This reverts the javadoc changes for primitive classes and a couple leftover changes due to the previous design that is no longer applicable. This pull request has now been integrated. Changeset: 2b06f9ed Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/2b06f9ed8b64317ea6f4dafb3559c16a6d7c9c95 Stats: 88 lines in 14 files changed: 14 ins; 38 del; 36 mod 8294797: [lworld] update javadoc to remove references to primitive classes Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/776 From vromero at openjdk.org Fri Oct 7 00:10:07 2022 From: vromero at openjdk.org (Vicente Romero) Date: Fri, 7 Oct 2022 00:10:07 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v6] In-Reply-To: References: Message-ID: > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding regression tests ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/771/files - new: https://git.openjdk.org/valhalla/pull/771/files/f984f661..7f01be1a Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=05 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=04-05 Stats: 108 lines in 1 file changed: 108 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/771.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/771/head:pull/771 PR: https://git.openjdk.org/valhalla/pull/771 From vromero at openjdk.org Fri Oct 7 00:23:18 2022 From: vromero at openjdk.org (Vicente Romero) Date: Fri, 7 Oct 2022 00:23:18 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v7] In-Reply-To: References: Message-ID: > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding missing comment ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/771/files - new: https://git.openjdk.org/valhalla/pull/771/files/7f01be1a..b4d69291 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=06 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=771&range=05-06 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/771.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/771/head:pull/771 PR: https://git.openjdk.org/valhalla/pull/771 From mchung at openjdk.org Fri Oct 7 01:03:14 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 7 Oct 2022 01:03:14 GMT Subject: [lworld] RFR: 8270852: [lworld] bytecodes spinned at runtime should set version to 65535 if preview feature enabled Message-ID: This patch prepares for lworld to switch to a preview feature. Also fix the generation of lambda classes and proxy classes to have `Preload` attribute for value classes (not only primitive classes). ------------- Commit messages: - cleanup import - 8270852: [lworld] bytecodes spinned at runtime should set minor_version to 65535 if preview feature enabled Changes: https://git.openjdk.org/valhalla/pull/779/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=779&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8270852 Stats: 17 lines in 2 files changed: 9 ins; 3 del; 5 mod Patch: https://git.openjdk.org/valhalla/pull/779.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/779/head:pull/779 PR: https://git.openjdk.org/valhalla/pull/779 From dsimms at openjdk.org Fri Oct 7 06:46:55 2022 From: dsimms at openjdk.org (David Simms) Date: Fri, 7 Oct 2022 06:46:55 GMT Subject: [lworld] RFR: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses [v13] In-Reply-To: References: Message-ID: > Runtime component of -XX:+EnablePrimitiveClasses switch David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: - Merge branch 'lworld' into 8288135 - Review comments applied - Merge branch 'lworld' into 8288135 - Review comments applied - Merge branch 'lworld' into 8288135 - Extra assertion info for tracking spurious issue - supports_inline_types() refers to classfile and is separate from Enable flags - Further testing explicity using flags - Disable EnablePrimitiveClasses by default - Explictly flag more tests - ... and 16 more: https://git.openjdk.org/valhalla/compare/2b06f9ed...b6e45f89 ------------- Changes: https://git.openjdk.org/valhalla/pull/727/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=727&range=12 Stats: 1357 lines in 245 files changed: 836 ins; 57 del; 464 mod Patch: https://git.openjdk.org/valhalla/pull/727.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/727/head:pull/727 PR: https://git.openjdk.org/valhalla/pull/727 From dsimms at openjdk.org Fri Oct 7 07:52:51 2022 From: dsimms at openjdk.org (David Simms) Date: Fri, 7 Oct 2022 07:52:51 GMT Subject: [lworld] Integrated: 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses In-Reply-To: References: Message-ID: <_GIgjK2iRtgCtqxoJRQ-yPi78C3S3c1yqXB8iAJlJhc=.9e655c08-c7c2-42fc-84db-888df601e588@github.com> On Thu, 25 Aug 2022 13:16:40 GMT, David Simms wrote: > Runtime component of -XX:+EnablePrimitiveClasses switch This pull request has now been integrated. Changeset: 6a27741b Author: David Simms URL: https://git.openjdk.org/valhalla/commit/6a27741b79020009871da2a6065048902685ae31 Stats: 1357 lines in 245 files changed: 836 ins; 57 del; 464 mod 8288135: [lworld] Implement HotSpot flag -XX:+EnablePrimitiveClasses Reviewed-by: fparain ------------- PR: https://git.openjdk.org/valhalla/pull/727 From thartmann at openjdk.org Fri Oct 7 12:37:32 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 7 Oct 2022 12:37:32 GMT Subject: [lworld] RFR: 8293542: [lworld] Merge InlineTypeNode and InlineTypePtrNode in C2 Message-ID: This is a large refactoring, removing the need to have both an `InlineTypeNode` as well as an `InlineTypePtrNode` in C2, significantly simplifying the IR. The change also includes several bug fixes that could not be easily extracted into an independent change. More cleanups will follow with [JDK-8293800](https://bugs.openjdk.org/browse/JDK-8293800). Thanks, Tobias ------------- Commit messages: - Minor fix for flat arrays - Merge branch 'lworld' into JDK-8293542 - Merge branch 'lworld' into JDK-8293542 - More fixes - More cleanups - 8293542: [lworld] Merge InlineTypeNode and InlineTypePtrNode in C2 Changes: https://git.openjdk.org/valhalla/pull/780/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=780&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293542 Stats: 810 lines in 33 files changed: 177 ins; 348 del; 285 mod Patch: https://git.openjdk.org/valhalla/pull/780.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/780/head:pull/780 PR: https://git.openjdk.org/valhalla/pull/780 From thartmann at openjdk.org Fri Oct 7 13:04:18 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 7 Oct 2022 13:04:18 GMT Subject: [lworld] RFR: [lworld] Added missing -XX:+EnableValhalla to ClassInitBarrier test Message-ID: <7erJhPHAsmdWWdG7r5l2m-Li0sNInLGTtN9pIiAEkeM=.e27635d2-979c-49f0-88ab-4b54a98f8ab1@github.com> Forgot to push this with https://github.com/openjdk/valhalla/pull/778. Thanks, Tobias ------------- Commit messages: - [lworld] Added missing -XX:+EnableValhalla to ClassInitBarrier test Changes: https://git.openjdk.org/valhalla/pull/781/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=781&range=00 Stats: 14 lines in 1 file changed: 0 ins; 0 del; 14 mod Patch: https://git.openjdk.org/valhalla/pull/781.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/781/head:pull/781 PR: https://git.openjdk.org/valhalla/pull/781 From thartmann at openjdk.org Fri Oct 7 13:07:35 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 7 Oct 2022 13:07:35 GMT Subject: [lworld] Integrated: [lworld] Added missing -XX:+EnableValhalla to ClassInitBarrier test In-Reply-To: <7erJhPHAsmdWWdG7r5l2m-Li0sNInLGTtN9pIiAEkeM=.e27635d2-979c-49f0-88ab-4b54a98f8ab1@github.com> References: <7erJhPHAsmdWWdG7r5l2m-Li0sNInLGTtN9pIiAEkeM=.e27635d2-979c-49f0-88ab-4b54a98f8ab1@github.com> Message-ID: On Fri, 7 Oct 2022 12:50:49 GMT, Tobias Hartmann wrote: > Forgot to push this with https://github.com/openjdk/valhalla/pull/778. > > Thanks, > Tobias This pull request has now been integrated. Changeset: d2fa68bb Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/d2fa68bb04bf8747133807e11907e362f0104e76 Stats: 14 lines in 1 file changed: 0 ins; 0 del; 14 mod [lworld] Added missing -XX:+EnableValhalla to ClassInitBarrier test ------------- PR: https://git.openjdk.org/valhalla/pull/781 From mchung at openjdk.org Sat Oct 8 19:20:21 2022 From: mchung at openjdk.org (Mandy Chung) Date: Sat, 8 Oct 2022 19:20:21 GMT Subject: [lworld] RFR: 8294927: [lworld] LambdaMetafactory class should reject identity and value superinterface Message-ID: This PR adds the validation in LambdaMetafactory to reject if the return type of the given factory type is not an identity interface and not a value interface. This also fixes a bug in `Class::isIdentity` to return false for interfaces if Valhalla is not enabled. ------------- Commit messages: - Fix Class::isIdentity to return false for interfaces if Valhalla is disabled - Merge branch 'lworld' of https://github.com/openjdk/valhalla into lmf-validate - 8294927: [lworld] LambdaMetafactory class should reject identity and value superinterface Changes: https://git.openjdk.org/valhalla/pull/783/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=783&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294927 Stats: 258 lines in 11 files changed: 251 ins; 0 del; 7 mod Patch: https://git.openjdk.org/valhalla/pull/783.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/783/head:pull/783 PR: https://git.openjdk.org/valhalla/pull/783 From rriggs at openjdk.org Sat Oct 8 19:22:02 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Sat, 8 Oct 2022 19:22:02 GMT Subject: [lworld] RFR: 8293551: [lworld] Remove obsolete interfaces __primitive__ and __value__, and NonTearable Message-ID: The java.lang interfaces __primitive__ and __value__ as well as java.lang.NonTearable are no longer needed for value objects. The files are deleted and tests updated. ------------- Commit messages: - 8293551: [lworld] Remove obsolete interfaces __primitive__ and __value__, and NonTearable Changes: https://git.openjdk.org/valhalla/pull/782/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=782&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293551 Stats: 152 lines in 6 files changed: 1 ins; 150 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/782.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/782/head:pull/782 PR: https://git.openjdk.org/valhalla/pull/782 From thartmann at openjdk.org Mon Oct 10 08:58:37 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Mon, 10 Oct 2022 08:58:37 GMT Subject: [lworld] Integrated: 8293542: [lworld] Merge InlineTypeNode and InlineTypePtrNode in C2 In-Reply-To: References: Message-ID: On Fri, 7 Oct 2022 12:22:10 GMT, Tobias Hartmann wrote: > This is a large refactoring, removing the need to have both an `InlineTypeNode` as well as an `InlineTypePtrNode` in C2, significantly simplifying the IR. The change also includes several bug fixes that could not be easily extracted into an independent change. > > More cleanups will follow with [JDK-8293800](https://bugs.openjdk.org/browse/JDK-8293800). > > Thanks, > Tobias This pull request has now been integrated. Changeset: 7c569cd2 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/7c569cd2eaeb6a514638fa2483d867c9f17af69d Stats: 810 lines in 33 files changed: 177 ins; 348 del; 285 mod 8293542: [lworld] Merge InlineTypeNode and InlineTypePtrNode in C2 ------------- PR: https://git.openjdk.org/valhalla/pull/780 From dsimms at openjdk.org Mon Oct 10 14:51:41 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 10 Oct 2022 14:51:41 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-20+18' into lworld_merge_jdk_20_18 Added tag jdk-20+18 for changeset 0ec18382b # Conflicts: # src/hotspot/share/ci/ciSignature.cpp # src/hotspot/share/opto/callnode.cpp # src/hotspot/share/opto/callnode.hpp # src/hotspot/share/opto/graphKit.cpp # src/hotspot/share/opto/memnode.cpp # src/hotspot/share/runtime/sharedRuntime.cpp # src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java ------------- Commit messages: - (JDK-8295066) Revert "8242115: C2 SATB barriers are not safepoint-safe" - Trailing whitespace - Merge branch 'lworld' into lworld_merge_jdk_20_18 - Merge tag 'jdk-20+18' into lworld_merge_jdk_20_18 - 8294869: Correct failure of RemovedJDKInternals.java after JDK-8294618 - 8294397: Replace StringBuffer with StringBuilder within java.text - 8294734: Redundant override in AES implementation - 8294618: Update openjdk.java.net => openjdk.org - 8294840: langtools OptionalDependencyTest.java use File.pathSeparator - 8289925: Shared code shouldn't reference the platform specific method frame::interpreter_frame_last_sp() - ... and 97 more: https://git.openjdk.org/valhalla/compare/7c569cd2...36781877 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=784&range=00.0 - jdk: https://webrevs.openjdk.org/?repo=valhalla&pr=784&range=00.1 Changes: https://git.openjdk.org/valhalla/pull/784/files Stats: 12855 lines in 388 files changed: 7926 ins; 3377 del; 1552 mod Patch: https://git.openjdk.org/valhalla/pull/784.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/784/head:pull/784 PR: https://git.openjdk.org/valhalla/pull/784 From dsimms at openjdk.org Mon Oct 10 14:53:26 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 10 Oct 2022 14:53:26 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Mon, 10 Oct 2022 09:34:36 GMT, David Simms wrote: > Merge tag 'jdk-20+18' into lworld_merge_jdk_20_18 > Added tag jdk-20+18 for changeset 0ec18382b > > # Conflicts: > # src/hotspot/share/ci/ciSignature.cpp > # src/hotspot/share/opto/callnode.cpp > # src/hotspot/share/opto/callnode.hpp > # src/hotspot/share/opto/graphKit.cpp > # src/hotspot/share/opto/memnode.cpp > # src/hotspot/share/runtime/sharedRuntime.cpp > # src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java This pull request has now been integrated. Changeset: 67bae7e7 Author: David Simms URL: https://git.openjdk.org/valhalla/commit/67bae7e716ac674ee859f3c97e12d8ad102a8267 Stats: 12855 lines in 388 files changed: 7926 ins; 3377 del; 1552 mod Merge jdk Merge tag 'jdk-20+18' ------------- PR: https://git.openjdk.org/valhalla/pull/784 From mchung at openjdk.org Mon Oct 10 16:24:59 2022 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 10 Oct 2022 16:24:59 GMT Subject: [lworld] RFR: 8293551: [lworld] Remove obsolete interfaces __primitive__ and __value__, and NonTearable In-Reply-To: References: Message-ID: On Fri, 7 Oct 2022 21:05:35 GMT, Roger Riggs wrote: > The java.lang interfaces __primitive__ and __value__ as well as java.lang.NonTearable are no longer needed for value objects. > > The files are deleted and tests updated. Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/782 From rriggs at openjdk.org Mon Oct 10 22:53:56 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 10 Oct 2022 22:53:56 GMT Subject: [lworld] RFR: 8270852: [lworld] bytecodes spinned at runtime should set minor_version to 65535 if preview feature enabled In-Reply-To: References: Message-ID: On Fri, 7 Oct 2022 00:56:39 GMT, Mandy Chung wrote: > This patch prepares for lworld to switch to a preview feature. Also fix the generation of lambda classes and proxy classes to have `Preload` attribute for value classes (not only primitive classes). Marked as reviewed by rriggs (Committer). src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 645: > 643: c = c.getComponentType(); > 644: } > 645: return (c.isValue() && !PrimitiveClass.isPrimitiveClass(c)) || PrimitiveClass.isPrimitiveValueType(c); Perhaps there should be a method that computes this compound expression? ------------- PR: https://git.openjdk.org/valhalla/pull/779 From mchung at openjdk.org Mon Oct 10 22:53:57 2022 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 10 Oct 2022 22:53:57 GMT Subject: [lworld] RFR: 8270852: [lworld] bytecodes spinned at runtime should set minor_version to 65535 if preview feature enabled In-Reply-To: References: Message-ID: <25KwFhzugXTzIEgpdNVVZaHJbE-R862ndOeZmCXn0Ig=.58731bcf-978a-444b-af80-89bc457853f2@github.com> On Mon, 10 Oct 2022 22:30:57 GMT, Roger Riggs wrote: >> This patch prepares for lworld to switch to a preview feature. Also fix the generation of lambda classes and proxy classes to have `Preload` attribute for value classes (not only primitive classes). > > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 645: > >> 643: c = c.getComponentType(); >> 644: } >> 645: return (c.isValue() && !PrimitiveClass.isPrimitiveClass(c)) || PrimitiveClass.isPrimitiveValueType(c); > > Perhaps there should be a method that computes this compound expression? This compound expression should not be needed. Preload attribute is generated for a value class including primitive class. It's a leftover when we added support for value objects. ------------- PR: https://git.openjdk.org/valhalla/pull/779 From rriggs at openjdk.org Mon Oct 10 22:54:06 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 10 Oct 2022 22:54:06 GMT Subject: [lworld] RFR: 8294927: [lworld] LambdaMetafactory class should reject identity and value superinterface In-Reply-To: References: Message-ID: On Sat, 8 Oct 2022 02:12:08 GMT, Mandy Chung wrote: > This PR adds the validation in LambdaMetafactory to reject if the return type of the given factory type is not an identity interface and not a value interface. This also fixes a bug in `Class::isIdentity` to return false for interfaces if Valhalla is not enabled. Marked as reviewed by rriggs (Committer). ------------- PR: https://git.openjdk.org/valhalla/pull/783 From mchung at openjdk.org Mon Oct 10 23:37:41 2022 From: mchung at openjdk.org (Mandy Chung) Date: Mon, 10 Oct 2022 23:37:41 GMT Subject: [lworld] Integrated: 8294927: [lworld] LambdaMetafactory class should reject identity and value superinterface In-Reply-To: References: Message-ID: On Sat, 8 Oct 2022 02:12:08 GMT, Mandy Chung wrote: > This PR adds the validation in LambdaMetafactory to reject if the return type of the given factory type is not an identity interface and not a value interface. This also fixes a bug in `Class::isIdentity` to return false for interfaces if Valhalla is not enabled. This pull request has now been integrated. Changeset: 14c71a4d Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/14c71a4d6f26b41c641799e41685854755d9964e Stats: 258 lines in 11 files changed: 251 ins; 0 del; 7 mod 8294927: [lworld] LambdaMetafactory class should reject identity and value superinterface Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/783 From rriggs at openjdk.org Tue Oct 11 14:59:39 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 11 Oct 2022 14:59:39 GMT Subject: [lworld] Integrated: 8293551: [lworld] Remove obsolete interfaces __primitive__ and __value__, and NonTearable In-Reply-To: References: Message-ID: On Fri, 7 Oct 2022 21:05:35 GMT, Roger Riggs wrote: > The java.lang interfaces __primitive__ and __value__ as well as java.lang.NonTearable are no longer needed for value objects. > > The files are deleted and tests updated. This pull request has now been integrated. Changeset: 8b2d9896 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/8b2d9896b60c18070e37b471f2c35c20c63987c6 Stats: 152 lines in 6 files changed: 1 ins; 150 del; 1 mod 8293551: [lworld] Remove obsolete interfaces __primitive__ and __value__, and NonTearable Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/782 From mchung at openjdk.org Tue Oct 11 16:30:20 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 11 Oct 2022 16:30:20 GMT Subject: [lworld] Integrated: 8270852: [lworld] bytecodes spinned at runtime should set minor_version to 65535 if preview feature enabled In-Reply-To: References: Message-ID: On Fri, 7 Oct 2022 00:56:39 GMT, Mandy Chung wrote: > This patch prepares for lworld to switch to a preview feature. Also fix the generation of lambda classes and proxy classes to have `Preload` attribute for value classes (not only primitive classes). This pull request has now been integrated. Changeset: cf05d5c1 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/cf05d5c19640daaf55beee84334784325a897b7c Stats: 17 lines in 2 files changed: 9 ins; 3 del; 5 mod 8270852: [lworld] bytecodes spinned at runtime should set minor_version to 65535 if preview feature enabled Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/779 From rriggs at openjdk.org Tue Oct 11 19:06:41 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 11 Oct 2022 19:06:41 GMT Subject: [lworld] RFR: 8294860: [lworld] Add java.util.Objects.isValueObject Message-ID: Add method `java.util.Objects.isValueObject(Object obj)`. The complement to `Objects.isIdentityObject(Object obj)` this method return true if the object is a value object. Add the cases to the existing ObjectMethods test. ------------- Commit messages: - 8294860: [lworld] Add java.util.Objects.isValueObject Changes: https://git.openjdk.org/valhalla/pull/786/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=786&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294860 Stats: 15 lines in 2 files changed: 15 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/786.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/786/head:pull/786 PR: https://git.openjdk.org/valhalla/pull/786 From mchung at openjdk.org Tue Oct 11 22:33:37 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 11 Oct 2022 22:33:37 GMT Subject: [lworld] RFR: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods Message-ID: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> This PR does the renaming to match the Value Objects JEP. ------------- Commit messages: - 8280979: Rename PrimitiveObjectMethods to ValueObjectMethods Changes: https://git.openjdk.org/valhalla/pull/787/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8280979 Stats: 999 lines in 14 files changed: 494 ins; 479 del; 26 mod Patch: https://git.openjdk.org/valhalla/pull/787.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/787/head:pull/787 PR: https://git.openjdk.org/valhalla/pull/787 From mchung at openjdk.org Tue Oct 11 22:36:16 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 11 Oct 2022 22:36:16 GMT Subject: [lworld] RFR: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods [v2] In-Reply-To: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> References: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> Message-ID: > This PR does the renaming to match the Value Objects JEP. Mandy Chung has updated the pull request incrementally with two additional commits since the last revision: - fix typo - fix typo ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/787/files - new: https://git.openjdk.org/valhalla/pull/787/files/540c4ec4..1d6ab603 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/787.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/787/head:pull/787 PR: https://git.openjdk.org/valhalla/pull/787 From mchung at openjdk.org Tue Oct 11 22:57:31 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 11 Oct 2022 22:57:31 GMT Subject: [lworld] RFR: 8294860: [lworld] Add java.util.Objects.isValueObject In-Reply-To: References: Message-ID: On Tue, 11 Oct 2022 18:51:47 GMT, Roger Riggs wrote: > Add method `java.util.Objects.isValueObject(Object obj)`. > > The complement to `Objects.isIdentityObject(Object obj)` this method return true if the object is a value object. > > Add the cases to the existing ObjectMethods test. Marked as reviewed by mchung (Committer). src/java.base/share/classes/java/util/Objects.java line 267: > 265: > 266: /** > 267: * {@return {@code true} if the specified object reference is a value object, Maybe add a link to `{@linkplain Class#isValue value} object`. "object reference" might cause confusion and consider as pass by reference. The `java.util.Objects` APIs are inconsistent and some uses "object reference" and some don't. ------------- PR: https://git.openjdk.org/valhalla/pull/786 From rriggs at openjdk.org Wed Oct 12 00:26:40 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 12 Oct 2022 00:26:40 GMT Subject: [lworld] RFR: 8294860: [lworld] Add java.util.Objects.isValueObject [v2] In-Reply-To: References: Message-ID: > Add method `java.util.Objects.isValueObject(Object obj)`. > > The complement to `Objects.isIdentityObject(Object obj)` this method return true if the object is a value object. > > Add the cases to the existing ObjectMethods test. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: add link in Objects.isValueObject() ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/786/files - new: https://git.openjdk.org/valhalla/pull/786/files/80c6914b..163bca19 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=786&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=786&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/786.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/786/head:pull/786 PR: https://git.openjdk.org/valhalla/pull/786 From dsimms at openjdk.org Wed Oct 12 08:42:22 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 12 Oct 2022 08:42:22 GMT Subject: [lworld] Withdrawn: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 28 Sep 2022 17:52:34 GMT, Vicente Romero wrote: > Value classes constructor should be named instead of . This PR can't be pushed without the corresponding support being available on the VM side This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/valhalla/pull/771 From thartmann at openjdk.org Wed Oct 12 12:51:08 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 12 Oct 2022 12:51:08 GMT Subject: [lworld] RFR: 8295152: [lworld] Various C2 compiler issues revealed by stress testing Message-ID: C2 stress testing via aggressive combinations of flags revealed several issues that are fixed by this patch. Expect for one extremely intermittent issue that I'm going to investigate next, the entire (internal) stress job definition now finally passes! Thanks, Tobias ------------- Commit messages: - 8295152: [lworld] Various C2 compiler issues revealed by stress testing Changes: https://git.openjdk.org/valhalla/pull/789/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=789&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295152 Stats: 110 lines in 14 files changed: 54 ins; 16 del; 40 mod Patch: https://git.openjdk.org/valhalla/pull/789.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/789/head:pull/789 PR: https://git.openjdk.org/valhalla/pull/789 From thartmann at openjdk.org Wed Oct 12 12:57:27 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 12 Oct 2022 12:57:27 GMT Subject: [lworld] Integrated: 8295152: [lworld] Various C2 compiler issues revealed by stress testing In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 12:45:44 GMT, Tobias Hartmann wrote: > C2 stress testing via aggressive combinations of flags revealed several issues that are fixed by this patch. Expect for one extremely intermittent issue that I'm going to investigate next, the entire (internal) stress job definition now finally passes! > > Thanks, > Tobias This pull request has now been integrated. Changeset: 82b63b75 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/82b63b75a6ca68a4948fcbd0672d3b777b18d255 Stats: 110 lines in 14 files changed: 54 ins; 16 del; 40 mod 8295152: [lworld] Various C2 compiler issues revealed by stress testing ------------- PR: https://git.openjdk.org/valhalla/pull/789 From jbhateja at openjdk.org Wed Oct 12 13:20:43 2022 From: jbhateja at openjdk.org (Jatin Bhateja) Date: Wed, 12 Oct 2022 13:20:43 GMT Subject: [lworld+vector] RFR: [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. Message-ID: Merging initial Multifields support added by @fparain from his local repository https://github.com/fparain/valhalla/tree/multifields. Best Regards, Jatin ------------- Commit messages: - Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. Changes: https://git.openjdk.org/valhalla/pull/790/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=790&range=00 Stats: 823 lines in 19 files changed: 615 ins; 85 del; 123 mod Patch: https://git.openjdk.org/valhalla/pull/790.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/790/head:pull/790 PR: https://git.openjdk.org/valhalla/pull/790 From jbhateja at openjdk.org Wed Oct 12 13:27:49 2022 From: jbhateja at openjdk.org (Jatin Bhateja) Date: Wed, 12 Oct 2022 13:27:49 GMT Subject: [lworld+vector] RFR: [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. [v2] In-Reply-To: References: Message-ID: > Merging initial Multifields support added by @fparain from his local repository https://github.com/fparain/valhalla/tree/multifields. > > Best Regards, > Jatin Jatin Bhateja has refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available. ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/790/files - new: https://git.openjdk.org/valhalla/pull/790/files/c3a6108e..9039a70b Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=790&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=790&range=00-01 Stats: 791 lines in 19 files changed: 53 ins; 583 del; 155 mod Patch: https://git.openjdk.org/valhalla/pull/790.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/790/head:pull/790 PR: https://git.openjdk.org/valhalla/pull/790 From jbhateja at openjdk.org Wed Oct 12 13:27:51 2022 From: jbhateja at openjdk.org (Jatin Bhateja) Date: Wed, 12 Oct 2022 13:27:51 GMT Subject: [lworld+vector] Withdrawn: [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 13:13:41 GMT, Jatin Bhateja wrote: > Merging initial Multifields support added by @fparain from his local repository https://github.com/fparain/valhalla/tree/multifields. > > Best Regards, > Jatin This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/valhalla/pull/790 From rriggs at openjdk.org Wed Oct 12 13:54:23 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 12 Oct 2022 13:54:23 GMT Subject: [lworld] Integrated: 8294860: [lworld] Add java.util.Objects.isValueObject In-Reply-To: References: Message-ID: On Tue, 11 Oct 2022 18:51:47 GMT, Roger Riggs wrote: > Add method `java.util.Objects.isValueObject(Object obj)`. > > The complement to `Objects.isIdentityObject(Object obj)` this method return true if the object is a value object. > > Add the cases to the existing ObjectMethods test. This pull request has now been integrated. Changeset: e1c3d839 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/e1c3d839c7a9c81bacda90944e3517d594592987 Stats: 15 lines in 2 files changed: 15 ins; 0 del; 0 mod 8294860: [lworld] Add java.util.Objects.isValueObject Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/786 From jbhateja at openjdk.org Wed Oct 12 14:08:49 2022 From: jbhateja at openjdk.org (Jatin Bhateja) Date: Wed, 12 Oct 2022 14:08:49 GMT Subject: [lworld+vector] RFR: [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. Message-ID: Merging initial Multifields support added by @fparain in his local repository https://github.com/fparain/valhalla/tree/multifields. Best Regards, Jatin ------------- Commit messages: - [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. Changes: https://git.openjdk.org/valhalla/pull/792/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=792&range=00 Stats: 823 lines in 19 files changed: 615 ins; 85 del; 123 mod Patch: https://git.openjdk.org/valhalla/pull/792.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/792/head:pull/792 PR: https://git.openjdk.org/valhalla/pull/792 From jbhateja at openjdk.org Wed Oct 12 15:11:24 2022 From: jbhateja at openjdk.org (Jatin Bhateja) Date: Wed, 12 Oct 2022 15:11:24 GMT Subject: [lworld+vector] Integrated: [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 14:00:29 GMT, Jatin Bhateja wrote: > Merging initial Multifields support added by @fparain in his local repository https://github.com/fparain/valhalla/tree/multifields. > > Best Regards, > Jatin This pull request has now been integrated. Changeset: ff1901b9 Author: Jatin Bhateja Committer: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/ff1901b93c3f58de79c04f770b58c83b7c5b0019 Stats: 823 lines in 19 files changed: 615 ins; 85 del; 123 mod [lworld+vector] Borrowing MultiFields initial implementation from https://github.com/fparain/valhalla/tree/multifields. Co-authored-by: Frederic Parain ------------- PR: https://git.openjdk.org/valhalla/pull/792 From mchung at openjdk.org Wed Oct 12 18:11:32 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 12 Oct 2022 18:11:32 GMT Subject: [lworld] RFR: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods [v3] In-Reply-To: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> References: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> Message-ID: <8PyAh-pORY6fgQMgePBYNQeSsQ7nxsaUWNOx2VmLCWQ=.09cfcc3f-ea6c-4cc0-8221-7aed2c8b8bf4@github.com> > This PR does the renaming to match the Value Objects JEP. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: clean up references to value type ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/787/files - new: https://git.openjdk.org/valhalla/pull/787/files/1d6ab603..319b0069 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=01-02 Stats: 31 lines in 1 file changed: 7 ins; 10 del; 14 mod Patch: https://git.openjdk.org/valhalla/pull/787.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/787/head:pull/787 PR: https://git.openjdk.org/valhalla/pull/787 From mchung at openjdk.org Wed Oct 12 18:17:48 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 12 Oct 2022 18:17:48 GMT Subject: [lworld] RFR: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods [v4] In-Reply-To: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> References: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> Message-ID: <3CfE4BJeRYiOkda6hHncATO_6OESG60rBG1LRtumLqk=.8047ad01-e794-4182-a2e3-3f4919e0bb11@github.com> > This PR does the renaming to match the Value Objects JEP. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: update for built-in primitive type ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/787/files - new: https://git.openjdk.org/valhalla/pull/787/files/319b0069..8d473317 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=787&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/787.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/787/head:pull/787 PR: https://git.openjdk.org/valhalla/pull/787 From vromero at openjdk.org Wed Oct 12 19:43:54 2022 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 12 Oct 2022 19:43:54 GMT Subject: [lworld] RFR: 8295086: [lworld] follow-up for JDK-8288131 Message-ID: code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only ------------- Commit messages: - Merge branch 'lworld' into JDK-8295086 - 8295086: [lworld] follow-up for JDK-8288131 Changes: https://git.openjdk.org/valhalla/pull/793/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295086 Stats: 9 lines in 2 files changed: 5 ins; 0 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/793.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/793/head:pull/793 PR: https://git.openjdk.org/valhalla/pull/793 From rriggs at openjdk.org Wed Oct 12 21:31:36 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 12 Oct 2022 21:31:36 GMT Subject: [lworld] RFR: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods [v4] In-Reply-To: <3CfE4BJeRYiOkda6hHncATO_6OESG60rBG1LRtumLqk=.8047ad01-e794-4182-a2e3-3f4919e0bb11@github.com> References: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> <3CfE4BJeRYiOkda6hHncATO_6OESG60rBG1LRtumLqk=.8047ad01-e794-4182-a2e3-3f4919e0bb11@github.com> Message-ID: <1y_VamSEU8BOxJ7CYDcAmy0ueujOjt0sgXav898q4Cc=.abbfc7e5-9aa8-4f74-b033-2625e25ecc6f@github.com> On Wed, 12 Oct 2022 18:17:48 GMT, Mandy Chung wrote: >> This PR does the renaming to match the Value Objects JEP. > > Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: > > update for built-in primitive type LGTM ------------- Marked as reviewed by rriggs (Committer). PR: https://git.openjdk.org/valhalla/pull/787 From rriggs at openjdk.org Wed Oct 12 22:03:36 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 12 Oct 2022 22:03:36 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v3] In-Reply-To: References: Message-ID: On Thu, 29 Sep 2022 19:45:46 GMT, Roger Riggs wrote: >> Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. >> >> Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. >> Similar to regular serialization/deserialization of identity objects. The serialized form is the same. >> Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. >> >> Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove asserts checking for null in cases where null signals there is no local class > and the fields of the class in the stream are to be read and discarded. The draft of the serialization specification update for value objects is: http://cr.openjdk.java.net/~rriggs/lworld-serial-spec/ ------------- PR: https://git.openjdk.org/valhalla/pull/761 From mchung at openjdk.org Wed Oct 12 22:57:24 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 12 Oct 2022 22:57:24 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v3] In-Reply-To: References: Message-ID: On Thu, 29 Sep 2022 19:45:46 GMT, Roger Riggs wrote: >> Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. >> >> Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. >> Similar to regular serialization/deserialization of identity objects. The serialized form is the same. >> Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. >> >> Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Remove asserts checking for null in cases where null signals there is no local class > and the fields of the class in the stream are to be read and discarded. This seems a reasonable way to provide a minimal serialization support for value classes to allow proper solution to be explored. src/java.base/share/classes/java/io/ObjectStreamClass.java line 2100: > 2098: vals[offsets[i]] = switch (typeCodes[i]) { > 2099: case 'L', '[' -> > 2100: unsafe.isFlattened(f) Flattened field has `Q` descriptor. This PR doesn't support primitive class, right? src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line 335: > 333: return constructorToCall; > 334: } > 335: if (cl.isValue()) { Perhaps `newConstructorForExternalization` should also throw UOE if the given class is a value class? ------------- PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Thu Oct 13 14:09:31 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 13 Oct 2022 14:09:31 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v3] In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 21:25:55 GMT, Mandy Chung wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove asserts checking for null in cases where null signals there is no local class >> and the fields of the class in the stream are to be read and discarded. > > src/java.base/share/classes/java/io/ObjectStreamClass.java line 2100: > >> 2098: vals[offsets[i]] = switch (typeCodes[i]) { >> 2099: case 'L', '[' -> >> 2100: unsafe.isFlattened(f) > > Flattened field has `Q` descriptor. This PR doesn't support primitive class, right? As far as I know, a "value type" (aka primitive class) is a value class and the only difference from the Unsafe API point of view is whether it is flattened or not. There may be some additional work for JEP 401. ------------- PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Thu Oct 13 15:05:19 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 13 Oct 2022 15:05:19 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v3] In-Reply-To: References: Message-ID: On Thu, 13 Oct 2022 14:07:24 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/io/ObjectStreamClass.java line 2100: >> >>> 2098: vals[offsets[i]] = switch (typeCodes[i]) { >>> 2099: case 'L', '[' -> >>> 2100: unsafe.isFlattened(f) >> >> Flattened field has `Q` descriptor. This PR doesn't support primitive class, right? > > As far as I know, a "value type" (aka primitive class) is a value class and the only difference from the Unsafe API point of view is whether it is flattened or not. There may be some additional work for JEP 401. Also added a few tests for serializable primitive classes. ------------- PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Thu Oct 13 15:15:32 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 13 Oct 2022 15:15:32 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v4] In-Reply-To: References: Message-ID: > Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. > > Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. > Similar to regular serialization/deserialization of identity objects. The serialized form is the same. > Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. > > Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Merge branch 'lworld' into 8281295-lworld-serialize - Added throw UOE to ReflectionFactory.newConstructorForExternalization. Added tests for serializable primitive value class. - Merge branch 'lworld' into 8281295-lworld-serialize - fix typos - Remove asserts checking for null in cases where null signals there is no local class and the fields of the class in the stream are to be read and discarded. - javadoc cleanup - Merge branch 'lworld' into 8281295-lworld-serialize - Merge branch 'lworld' into 8281295-lworld-serialize - 8281295: Prototype serialization/deserialization using Unsafe. Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. ------------- Changes: https://git.openjdk.org/valhalla/pull/761/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=03 Stats: 1107 lines in 9 files changed: 805 ins; 289 del; 13 mod Patch: https://git.openjdk.org/valhalla/pull/761.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/761/head:pull/761 PR: https://git.openjdk.org/valhalla/pull/761 From mchung at openjdk.org Thu Oct 13 16:28:25 2022 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 13 Oct 2022 16:28:25 GMT Subject: [lworld] Integrated: 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods In-Reply-To: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> References: <1nByP6vfIscIfRj5db86poJie9ZKYbdxo56_JGEmoM4=.db191e6a-1a02-4e7d-956d-37e5b1058d89@github.com> Message-ID: On Tue, 11 Oct 2022 22:28:06 GMT, Mandy Chung wrote: > This PR does the renaming to match the Value Objects JEP. This pull request has now been integrated. Changeset: 191942b5 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/191942b54cef9de298646a00d25882bc94e1d4b4 Stats: 996 lines in 14 files changed: 491 ins; 479 del; 26 mod 8280979: [lworld] Rename PrimitiveObjectMethods to ValueObjectMethods Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/787 From rriggs at openjdk.org Thu Oct 13 19:53:46 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 13 Oct 2022 19:53:46 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v5] In-Reply-To: References: Message-ID: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> > Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. > > Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. > Similar to regular serialization/deserialization of identity objects. The serialized form is the same. > Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. > > Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add primitive class signatures to be treated the same as L types ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/761/files - new: https://git.openjdk.org/valhalla/pull/761/files/6e303c79..b51c128f Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=04 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/761.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/761/head:pull/761 PR: https://git.openjdk.org/valhalla/pull/761 From duke at openjdk.org Thu Oct 13 21:41:29 2022 From: duke at openjdk.org (ExE Boss) Date: Thu, 13 Oct 2022 21:41:29 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v5] In-Reply-To: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> References: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> Message-ID: <9DYcI1n_FlpNZB1Sm72pq75-RdlDzgKsFOKW_mXTK_Q=.1c1cbeef-abaa-48be-a10c-f01218eaeb43@github.com> On Thu, 13 Oct 2022 19:53:46 GMT, Roger Riggs wrote: >> Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. >> >> Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. >> Similar to regular serialization/deserialization of identity objects. The serialized form is the same. >> Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. >> >> Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Add primitive class signatures to be treated the same as L types The?`java.io.Externalizable` interface should?probably be?marked as?an?identity?interface. ------------- PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Thu Oct 13 22:26:19 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 13 Oct 2022 22:26:19 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v5] In-Reply-To: <9DYcI1n_FlpNZB1Sm72pq75-RdlDzgKsFOKW_mXTK_Q=.1c1cbeef-abaa-48be-a10c-f01218eaeb43@github.com> References: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> <9DYcI1n_FlpNZB1Sm72pq75-RdlDzgKsFOKW_mXTK_Q=.1c1cbeef-abaa-48be-a10c-f01218eaeb43@github.com> Message-ID: On Thu, 13 Oct 2022 21:39:15 GMT, ExE Boss wrote: > The `java.io.Externalizable` interface should probably be marked as an identity interface. That would head-off some misuses, and so far I'm not aware of a viable use case. ------------- PR: https://git.openjdk.org/valhalla/pull/761 From vromero at openjdk.org Thu Oct 13 22:54:32 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 13 Oct 2022 22:54:32 GMT Subject: [lworld] RFR: 8295086: [lworld] follow-up for JDK-8288131 [v2] In-Reply-To: References: Message-ID: <67vJiSJKkQJLfym_34aWV7PO7Nng8mNx7SaFeMn_9vI=.2546efc8-80c1-428f-8745-1efaf8337de1@github.com> > code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: following on with the changes after merge ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/793/files - new: https://git.openjdk.org/valhalla/pull/793/files/d65ccf63..115b7c18 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=00-01 Stats: 83 lines in 9 files changed: 35 ins; 3 del; 45 mod Patch: https://git.openjdk.org/valhalla/pull/793.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/793/head:pull/793 PR: https://git.openjdk.org/valhalla/pull/793 From mchung at openjdk.org Fri Oct 14 00:18:00 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 14 Oct 2022 00:18:00 GMT Subject: [lworld] RFR: 8295234: [lworld] inner class of older classfile versions is not recognized as identity class Message-ID: The modifiers of an inner class uses the access flags in the `InnerClasses` attribute. An inner class with an older class file version does not have `ACC_IDENTITY` flag set. Instead of having `Class::isIdentity` to depend on `getModifiers()`, this PR proposes to make `Class::isIdentity` a native method implemented by the VM. In addition, `Class::isIdentity` can be made as intrinsics. I leave `Class::isValue` as is. A value class must have `ACC_VALUE` flag set. `Class::getModifiers` is already intrinsified. We can revisit this in the future when there is a need to make it as a native VM method. ------------- Commit messages: - 8295234: [lworld] inner class of older bytecode versions is not recognized as identity class Changes: https://git.openjdk.org/valhalla/pull/794/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=794&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295234 Stats: 25 lines in 5 files changed: 18 ins; 6 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/794.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/794/head:pull/794 PR: https://git.openjdk.org/valhalla/pull/794 From mchung at openjdk.org Fri Oct 14 00:55:38 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 14 Oct 2022 00:55:38 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v5] In-Reply-To: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> References: <-OVX9qgNPnWY3P6dyGDAvgzhbLHg57cD6Fzuyg7ictU=.018f7bbf-2031-4367-9fdf-f131d784fbd1@github.com> Message-ID: On Thu, 13 Oct 2022 19:53:46 GMT, Roger Riggs wrote: >> Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. >> >> Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. >> Similar to regular serialization/deserialization of identity objects. The serialized form is the same. >> Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. >> >> Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Add primitive class signatures to be treated the same as L types To recap our offline discussion, I would expect `ObjectStreamField::getTypeString` should return `Q-`descriptor if the field type is a primitive class value type (consistent with `Field`). For example, class Test implements Serializable { SerializablePrimitivePoint p; SerializableValuePoint v; } where `p` may be a flattened field of a primitive class value type but `v` is a field of a reference type (value class). In that case, `Field.getType().descriptorString()` on `p` should return `QSerializablePrimitivePoint;`. Since this involves the interoperability and future evolution, perhaps add the serialization support for primitive classes as a follow-on issue. Better to revert the change added for `Q` descriptor and keep this PR for value class only. ------------- PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Fri Oct 14 13:45:41 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 14 Oct 2022 13:45:41 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v6] In-Reply-To: References: Message-ID: > Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. > > Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. > Similar to regular serialization/deserialization of identity objects. The serialized form is the same. > Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. > > Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Revert Q type changes, value types (aka primitive classes) are not fully supported ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/761/files - new: https://git.openjdk.org/valhalla/pull/761/files/b51c128f..bf1f3a17 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=05 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/761.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/761/head:pull/761 PR: https://git.openjdk.org/valhalla/pull/761 From mchung at openjdk.org Fri Oct 14 16:07:21 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 14 Oct 2022 16:07:21 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v6] In-Reply-To: References: Message-ID: On Fri, 14 Oct 2022 13:45:41 GMT, Roger Riggs wrote: >> Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. >> >> Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. >> Similar to regular serialization/deserialization of identity objects. The serialized form is the same. >> Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. >> >> Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Revert Q type changes, value types (aka primitive classes) are not fully supported This looks good as an initial prototype. src/java.base/share/classes/java/io/ObjectOutputStream.java line 136: > 134: * object such as a record. > 135: * > 136: * Value objects cannot be `java.io.Externalizable`. Suggestion: * Value objects cannot be {@code java.io.Externalizable}. ------------- Marked as reviewed by mchung (Committer). PR: https://git.openjdk.org/valhalla/pull/761 From fparain at openjdk.org Fri Oct 14 17:32:27 2022 From: fparain at openjdk.org (Frederic Parain) Date: Fri, 14 Oct 2022 17:32:27 GMT Subject: [lworld] RFR: 8295234: [lworld] inner class of older classfile versions is not recognized as identity class In-Reply-To: References: Message-ID: On Fri, 14 Oct 2022 00:10:57 GMT, Mandy Chung wrote: > The modifiers of an inner class uses the access flags in the `InnerClasses` attribute. An inner class with an older class file version does not have `ACC_IDENTITY` flag set. Instead of having `Class::isIdentity` to depend on `getModifiers()`, this PR proposes to make `Class::isIdentity` a native method implemented by the VM. In addition, `Class::isIdentity` can be made as intrinsics. > > I leave `Class::isValue` as is. A value class must have `ACC_VALUE` flag set. `Class::getModifiers` is already intrinsified. We can revisit this in the future when there is a need to make it as a native VM method. Looks good to me. Fred ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.org/valhalla/pull/794 From mchung at openjdk.org Fri Oct 14 19:20:49 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 14 Oct 2022 19:20:49 GMT Subject: [lworld] Integrated: 8295234: [lworld] inner class of older classfile versions is not recognized as identity class In-Reply-To: References: Message-ID: On Fri, 14 Oct 2022 00:10:57 GMT, Mandy Chung wrote: > The modifiers of an inner class uses the access flags in the `InnerClasses` attribute. An inner class with an older class file version does not have `ACC_IDENTITY` flag set. Instead of having `Class::isIdentity` to depend on `getModifiers()`, this PR proposes to make `Class::isIdentity` a native method implemented by the VM. In addition, `Class::isIdentity` can be made as intrinsics. > > I leave `Class::isValue` as is. A value class must have `ACC_VALUE` flag set. `Class::getModifiers` is already intrinsified. We can revisit this in the future when there is a need to make it as a native VM method. This pull request has now been integrated. Changeset: 336ef700 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/336ef70095ec90b4be47aa29117c943b3b751f84 Stats: 25 lines in 5 files changed: 18 ins; 6 del; 1 mod 8295234: [lworld] inner class of older classfile versions is not recognized as identity class Reviewed-by: fparain ------------- PR: https://git.openjdk.org/valhalla/pull/794 From rriggs at openjdk.org Fri Oct 14 21:22:29 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 14 Oct 2022 21:22:29 GMT Subject: [lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v7] In-Reply-To: References: Message-ID: <-30pdZoORllsw5fAL6uybX0eKnjtufJ2viAv84Qa5fM=.777642fb-45b6-40cf-8ebb-16462a0c514a@github.com> > Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. > > Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. > Similar to regular serialization/deserialization of identity objects. The serialized form is the same. > Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. > > Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct formatting of interface Externalizable ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/761/files - new: https://git.openjdk.org/valhalla/pull/761/files/bf1f3a17..c14c27a5 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=06 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=761&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/761.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/761/head:pull/761 PR: https://git.openjdk.org/valhalla/pull/761 From rriggs at openjdk.org Fri Oct 14 21:51:20 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 14 Oct 2022 21:51:20 GMT Subject: [lworld] Integrated: 8281295: Prototype serialization/deserialization using Unsafe. In-Reply-To: References: Message-ID: On Mon, 19 Sep 2022 18:21:31 GMT, Roger Riggs wrote: > Specify serialization and deserialization of value objects. Value objects are immutable, Externalizable relies on mutation, Externalizable is not supported for value objects. Revised tests and added tests for graphs of value objects. > > Somewhat similar to Record serialization in that back references to the value object store 'null' until the value object is completely deserialized. > Similar to regular serialization/deserialization of identity objects. The serialized form is the same. > Deserialization is done by reading fields and storing into a Buffered larval object, converted to a value object when all of the fields have been read and stored. > > Externalizable and Value Objects are incompatible, value objects are immutable and Externalizable.readExternal is expected to modify the fields of an allocated object. This pull request has now been integrated. Changeset: 143f6b28 Author: Roger Riggs URL: https://git.openjdk.org/valhalla/commit/143f6b28b20f0d3ee6c52fad58f5836230bfb112 Stats: 1107 lines in 9 files changed: 805 ins; 289 del; 13 mod 8281295: Prototype serialization/deserialization using Unsafe. Reviewed-by: mchung ------------- PR: https://git.openjdk.org/valhalla/pull/761 From thartmann at openjdk.org Tue Oct 18 14:48:03 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 18 Oct 2022 14:48:03 GMT Subject: [lworld] RFR: 8295455: [lworld] find_callee_info_helper hits "must have non-abstract attached method" assert Message-ID: I was finally able to reproduce this intermittent issue. The root cause is that the call (re-)resolution code does not correctly detect a C1 caller frame if that one got deoptimized and therefore either hits an assert or uses the wrong callee entry point, leading to incorrect execution. I also fixed an unrelated issue in the scalarized entry point of a C1 compiled method, that leads to the orig_pc not being zeroed. Thanks, Tobias ------------- Commit messages: - 8295455: [lworld] find_callee_info_helper hits "must have non-abstract attached method" assert Changes: https://git.openjdk.org/valhalla/pull/795/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=795&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295455 Stats: 14 lines in 4 files changed: 3 ins; 1 del; 10 mod Patch: https://git.openjdk.org/valhalla/pull/795.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/795/head:pull/795 PR: https://git.openjdk.org/valhalla/pull/795 From dsimms at openjdk.org Tue Oct 18 15:14:08 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 18 Oct 2022 15:14:08 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods Message-ID: Merged javac and VM work together, includes VM support (JDK-8294224) ------------- Commit messages: - Fixes for valhalla/valuetypes/Serialization.java - Merge branch 'lworld' into vnew_javac_hotspot - MethodHandles.java aware of vnew, no longer static/non-static - MethodHandles::resolve_MemberName for - Merge pull request #2 from MrSimms/fixing.failing.regression.tests - fixing failing regression tests - Merge branch 'vnew' into vnew_javac_hotspot - Compile issue - Adjust hotspot_valhalla tests - Abstract value class constructor is vanilla - ... and 13 more: https://git.openjdk.org/valhalla/compare/cf05d5c1...953c2060 Changes: https://git.openjdk.org/valhalla/pull/788/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8247569 Stats: 667 lines in 81 files changed: 270 ins; 94 del; 303 mod Patch: https://git.openjdk.org/valhalla/pull/788.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/788/head:pull/788 PR: https://git.openjdk.org/valhalla/pull/788 From duke at openjdk.org Tue Oct 18 15:14:10 2022 From: duke at openjdk.org (ExE Boss) Date: Tue, 18 Oct 2022 15:14:10 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 08:44:41 GMT, David Simms wrote: > Merged javac and VM work together, includes VM support (JDK-8294224) Personally, I?prefer calling?it just?``, which?would better?support [JDK?8284239]. [JDK?8284239]: https://bugs.openjdk.org/browse/JDK-8284239 "Consider?adding `array::(?)` and?using?it to?compile `T[]::new` method?references" src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java line 59: > 57: classFileVersion += Opcodes.V_PREVIEW; > 58: } > 59: emitInt(classFileVersion); Note?that the?reflection implementation intentionally?uses class?file version?49.0 so?that the?`StackMapFrames`?attribute and?other stricter?requirements are?not?necessary. See?[JEP?416] for?details. https://github.com/openjdk/valhalla/blob/6ae7e4d4aad5712cf2fe6ab9f98dc424fa4170cb/src/hotspot/share/classfile/verifier.hpp#L37-L44 [JEP?416]: https://openjdk.org/jeps/416 ------------- PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Tue Oct 18 15:14:12 2022 From: dsimms at openjdk.org (David Simms) Date: Tue, 18 Oct 2022 15:14:12 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 08:44:41 GMT, David Simms wrote: > Merged javac and VM work together, includes VM support (JDK-8294224) src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java line 67: > 65: DirectMethodHandleDescImpl(Kind kind, ClassDesc owner, String name, MethodTypeDesc type) { > 66: if (kind == CONSTRUCTOR) { > 67: // TODO: missing "value objects", they don't use Q-type desc Needs fixing to support Value Objects (currently only correct for primitive value types) ------------- PR: https://git.openjdk.org/valhalla/pull/788 From mchung at openjdk.org Tue Oct 18 17:38:15 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 18 Oct 2022 17:38:15 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 08:44:41 GMT, David Simms wrote: > Merged javac and VM work together, includes VM support (JDK-8294224) src/java.base/share/classes/java/lang/invoke/MemberName.java line 527: > 525: } > 526: /** Query whether this member is a constructor. */ > 527: boolean isConstructor(String name) { `findConstructor` only finds ``. To get `` method handle, it just uses `Lookup::findStatic` as it's a static method. This `isConstructor` method would cause confusion. I can clean this up as a follow-up. src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2765: > 2763: throw new NoSuchMethodException("Constructors must have void return type: " + refc.getName()); > 2764: } > 2765: String name = refc.isValue() ? "" : ""; `findConstructor` should not find `` which is just a static method. src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 3704: > 3702: return (name.startsWith("<") && > 3703: ((name.equals("") && refKind != REF_newInvokeSpecial) || > 3704: ((name.equals("") || name.equals("")) && refKind != REF_invokeStatic))); This method should only check for ``. `` cannot be looked up. src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java line 95: > 93: boolean isStaticFactory = declaringClass.isValue(); > 94: return (ConstructorAccessor) generate(declaringClass, > 95: isStaticFactory ? "" : "", Core reflection does not use this method accessor generator by default. I don't expect this change is needed. Are you seeing any test failure without this change and other relevant change in jdk.internal.reflect? test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java line 85: > 83: @Test > 84: public void testNoArgStaticFactory() throws Throwable { > 85: // test default vnew init factory Suggestion: // test default static vnew factory ------------- PR: https://git.openjdk.org/valhalla/pull/788 From thartmann at openjdk.org Wed Oct 19 05:15:20 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 19 Oct 2022 05:15:20 GMT Subject: [lworld] Integrated: 8295455: [lworld] find_callee_info_helper hits "must have non-abstract attached method" assert In-Reply-To: References: Message-ID: On Tue, 18 Oct 2022 14:41:45 GMT, Tobias Hartmann wrote: > I was finally able to reproduce this intermittent issue. The root cause is that the call (re-)resolution code does not correctly detect a C1 caller frame if that one got deoptimized and therefore either hits an assert or uses the wrong callee entry point, leading to incorrect execution. > > I also fixed an unrelated issue in the scalarized entry point of a C1 compiled method, that leads to the orig_pc not being zeroed. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 688186b3 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/688186b3fd7c7173c83069fe9d4fc87cfce63778 Stats: 14 lines in 4 files changed: 3 ins; 1 del; 10 mod 8295455: [lworld] find_callee_info_helper hits "must have non-abstract attached method" assert ------------- PR: https://git.openjdk.org/valhalla/pull/795 From dsimms at openjdk.org Wed Oct 19 08:31:21 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 19 Oct 2022 08:31:21 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 08:50:10 GMT, David Simms wrote: >> Merged javac and VM work together, includes VM support (JDK-8294224) > > src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java line 67: > >> 65: DirectMethodHandleDescImpl(Kind kind, ClassDesc owner, String name, MethodTypeDesc type) { >> 66: if (kind == CONSTRUCTOR) { >> 67: // TODO: missing "value objects", they don't use Q-type desc > > Needs fixing to support Value Objects (currently only correct for primitive value types) ...will be fixed in later PR ------------- PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Wed Oct 19 08:35:18 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 19 Oct 2022 08:35:18 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Tue, 18 Oct 2022 17:01:57 GMT, Mandy Chung wrote: >> Merged javac and VM work together, includes VM support (JDK-8294224) > > src/java.base/share/classes/java/lang/invoke/MemberName.java line 527: > >> 525: } >> 526: /** Query whether this member is a constructor. */ >> 527: boolean isConstructor(String name) { > > `findConstructor` only finds ``. To get `` method handle, it just uses `Lookup::findStatic` as it's a static method. This `isConstructor` method would cause confusion. I can clean this up as a follow-up. Thank you ------------- PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Wed Oct 19 10:30:15 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 19 Oct 2022 10:30:15 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v2] In-Reply-To: References: Message-ID: > Merged javac and VM work together, includes VM support (JDK-8294224) David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: - Post 8281295: revert MethodAccessorGenerator, no longer needed - Merge branch 'lworld' into vnew_javac_hotspot - mchung: core-libs fixes - Fixes for valhalla/valuetypes/Serialization.java - Merge branch 'lworld' into vnew_javac_hotspot - MethodHandles.java aware of vnew, no longer static/non-static - MethodHandles::resolve_MemberName for - Merge pull request #2 from MrSimms/fixing.failing.regression.tests fixing failing regression tests - fixing failing regression tests - Merge branch 'vnew' into vnew_javac_hotspot - ... and 16 more: https://git.openjdk.org/valhalla/compare/688186b3...c9d2bb6d ------------- Changes: https://git.openjdk.org/valhalla/pull/788/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=01 Stats: 730 lines in 82 files changed: 319 ins; 103 del; 308 mod Patch: https://git.openjdk.org/valhalla/pull/788.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/788/head:pull/788 PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Wed Oct 19 10:34:48 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 19 Oct 2022 10:34:48 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: > Merged javac and VM work together, includes VM support (JDK-8294224) David Simms has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java Co-authored-by: Mandy Chung ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/788/files - new: https://git.openjdk.org/valhalla/pull/788/files/c9d2bb6d..55e570ee Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/788.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/788/head:pull/788 PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Wed Oct 19 10:34:50 2022 From: dsimms at openjdk.org (David Simms) Date: Wed, 19 Oct 2022 10:34:50 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: On Tue, 18 Oct 2022 17:34:15 GMT, Mandy Chung wrote: >> David Simms has updated the pull request incrementally with one additional commit since the last revision: >> >> Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java >> >> Co-authored-by: Mandy Chung > > src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java line 95: > >> 93: boolean isStaticFactory = declaringClass.isValue(); >> 94: return (ConstructorAccessor) generate(declaringClass, >> 95: isStaticFactory ? "" : "", > > Core reflection does not use this method accessor generator by default. I don't expect this change is needed. Are you seeing any test failure without this change and other relevant change in jdk.internal.reflect? It's gone, JDK-8281295 removed its use ------------- PR: https://git.openjdk.org/valhalla/pull/788 From thartmann at openjdk.org Wed Oct 19 11:54:07 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 19 Oct 2022 11:54:07 GMT Subject: [lworld] RFR: 8295655: [lworld] AArch64: Deoptimization from return value stub fails Message-ID: <8vWkIqh2c9yyYxjuIxG0pnjBQMklO5-93RHLqAXqkPk=.b6c802fc-792c-4ec9-bb24-6a56d879accc@github.com> If found this old issue after enabling stress testing on aarch64, similar to x86_64, `set_last_Java_frame` in `generate_return_value_stub` should not set fp on aarch64. Thanks, Tobias ------------- Commit messages: - 8295655: [lworld] AArch64: Deoptimization from return value stub fails Changes: https://git.openjdk.org/valhalla/pull/796/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=796&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295655 Stats: 7 lines in 3 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/valhalla/pull/796.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/796/head:pull/796 PR: https://git.openjdk.org/valhalla/pull/796 From thartmann at openjdk.org Wed Oct 19 13:18:47 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 19 Oct 2022 13:18:47 GMT Subject: [lworld] Integrated: 8295655: [lworld] AArch64: Deoptimization from return value stub fails In-Reply-To: <8vWkIqh2c9yyYxjuIxG0pnjBQMklO5-93RHLqAXqkPk=.b6c802fc-792c-4ec9-bb24-6a56d879accc@github.com> References: <8vWkIqh2c9yyYxjuIxG0pnjBQMklO5-93RHLqAXqkPk=.b6c802fc-792c-4ec9-bb24-6a56d879accc@github.com> Message-ID: On Wed, 19 Oct 2022 11:46:37 GMT, Tobias Hartmann wrote: > If found this old issue after enabling stress testing on aarch64, similar to x86_64, `set_last_Java_frame` in `generate_return_value_stub` should not set fp on aarch64. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 6c933c17 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/6c933c171145f1e28f22456f3556402286b05525 Stats: 7 lines in 3 files changed: 0 ins; 0 del; 7 mod 8295655: [lworld] AArch64: Deoptimization from return value stub fails ------------- PR: https://git.openjdk.org/valhalla/pull/796 From mchung at openjdk.org Wed Oct 19 16:14:27 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 19 Oct 2022 16:14:27 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: On Wed, 19 Oct 2022 08:27:38 GMT, David Simms wrote: >> src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java line 67: >> >>> 65: DirectMethodHandleDescImpl(Kind kind, ClassDesc owner, String name, MethodTypeDesc type) { >>> 66: if (kind == CONSTRUCTOR) { >>> 67: // TODO: missing "value objects", they don't use Q-type desc >> >> Needs fixing to support Value Objects (currently only correct for primitive value types) > > ...will be fixed in later PR My patch I sent to you already fixed this issue. ------------- PR: https://git.openjdk.org/valhalla/pull/788 From fparain at openjdk.org Wed Oct 19 18:46:24 2022 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 19 Oct 2022 18:46:24 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: <7SxJvTfFdXqO1RL6i-YTMft7MfCg2yC1S-EzRsoDJuw=.15eb8526-99d8-40cd-b6fd-b68446b9ab8b@github.com> On Wed, 19 Oct 2022 10:34:48 GMT, David Simms wrote: >> Merged javac and VM work together, includes VM support (JDK-8294224) > > David Simms has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java > > Co-authored-by: Mandy Chung VM changes look good to me (with one comment on is_object_constructor() and is_static_vnew_factory() methods). src/hotspot/share/oops/method.cpp line 945: > 943: // A method named , if non-static, is a classic object constructor. > 944: bool Method::is_object_constructor() const { > 945: return name() == vmSymbols::object_initializer_name() && !is_static(); Do we still need to check that the method is not static? Now that constructors and static factories have different names, the check of the static flag looks superfluous (applies to the method below as well, and to the comments above the method declaration). ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.org/valhalla/pull/788 From mchung at openjdk.org Wed Oct 19 20:24:29 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 19 Oct 2022 20:24:29 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: References: Message-ID: On Wed, 19 Oct 2022 10:34:48 GMT, David Simms wrote: >> Merged javac and VM work together, includes VM support (JDK-8294224) > > David Simms has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java > > Co-authored-by: Mandy Chung Looks good. A couple more adjustment to the spec. src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java line 163: > 161: /** > 162: * Returns the name of the cracked method handle's underlying member. > 163: * This is {@code ""} or {@code ""} if the underlying member Suggestion: * This is {@code ""} if the underlying member was a constructor, * or {@code ""} if the underlying member was a value class static * factory method, else it is a simple method name or field name. src/java.compiler/share/classes/javax/lang/model/element/ExecutableElement.java line 143: > 141: * {@return the simple name of a constructor, method, or > 142: * initializer} For a constructor, the name {@code ""} or > 143: * {@code ""} is returned, for a static initializer, the Suggestion: * initializer} For a constructor, the name {@code ""} is * returned, for a value class static factory method, the name * {@code ""} is returned, for a static initializer, the ------------- Marked as reviewed by mchung (Committer). PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Thu Oct 20 08:26:43 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 20 Oct 2022 08:26:43 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v4] In-Reply-To: References: Message-ID: > Merged javac and VM work together, includes VM support (JDK-8294224) David Simms has updated the pull request incrementally with two additional commits since the last revision: - Update src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java Co-authored-by: Mandy Chung - Update src/java.compiler/share/classes/javax/lang/model/element/ExecutableElement.java Co-authored-by: Mandy Chung ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/788/files - new: https://git.openjdk.org/valhalla/pull/788/files/55e570ee..8074b30a Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=02-03 Stats: 5 lines in 2 files changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/788.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/788/head:pull/788 PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Thu Oct 20 08:31:33 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 20 Oct 2022 08:31:33 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v3] In-Reply-To: <7SxJvTfFdXqO1RL6i-YTMft7MfCg2yC1S-EzRsoDJuw=.15eb8526-99d8-40cd-b6fd-b68446b9ab8b@github.com> References: <7SxJvTfFdXqO1RL6i-YTMft7MfCg2yC1S-EzRsoDJuw=.15eb8526-99d8-40cd-b6fd-b68446b9ab8b@github.com> Message-ID: <4AA_MrTx-TfXieah5dsDtvdE_nszfkhaxCZO9pExfkU=.a9f9f911-0828-41a3-a6b7-fab51355915e@github.com> On Wed, 19 Oct 2022 18:37:42 GMT, Frederic Parain wrote: >> David Simms has updated the pull request incrementally with one additional commit since the last revision: >> >> Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java >> >> Co-authored-by: Mandy Chung > > src/hotspot/share/oops/method.cpp line 945: > >> 943: // A method named , if non-static, is a classic object constructor. >> 944: bool Method::is_object_constructor() const { >> 945: return name() == vmSymbols::object_initializer_name() && !is_static(); > > Do we still need to check that the method is not static? > Now that constructors and static factories have different names, the check of the static flag looks superfluous (applies to the method below as well, and to the comments above the method declaration). You are correct, any kind of correctness check has already happened during parsing ------------- PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Thu Oct 20 08:41:33 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 20 Oct 2022 08:41:33 GMT Subject: [lworld] RFR: 8247569: [lworld] Align with spec for methods [v5] In-Reply-To: References: Message-ID: > Merged javac and VM work together, includes VM support (JDK-8294224) David Simms has updated the pull request incrementally with two additional commits since the last revision: - github "commit comment" seems to be capable of adding trailing whitespace, fixed - Applied fparain comments ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/788/files - new: https://git.openjdk.org/valhalla/pull/788/files/8074b30a..2acc29c9 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=04 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=788&range=03-04 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/valhalla/pull/788.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/788/head:pull/788 PR: https://git.openjdk.org/valhalla/pull/788 From dsimms at openjdk.org Thu Oct 20 08:45:04 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 20 Oct 2022 08:45:04 GMT Subject: [lworld] Integrated: 8247569: [lworld] Align with spec for methods In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 08:44:41 GMT, David Simms wrote: > Merged javac and VM work together, includes VM support (JDK-8294224) This pull request has now been integrated. Changeset: cc629c95 Author: David Simms URL: https://git.openjdk.org/valhalla/commit/cc629c957ad2c59c539b8fd537a56033febb7d12 Stats: 734 lines in 82 files changed: 323 ins; 103 del; 308 mod 8247569: [lworld] Align with spec for methods 8294224: [lworld] VM support for factory methods Co-authored-by: Vicente Romero Co-authored-by: Harold Seigel Co-authored-by: Mandy Chung Reviewed-by: fparain, mchung ------------- PR: https://git.openjdk.org/valhalla/pull/788 From thartmann at openjdk.org Thu Oct 20 12:28:11 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 20 Oct 2022 12:28:11 GMT Subject: [lworld] RFR: 8295731: [lworld] C1's linear register allocator spill map is incorrect Message-ID: We spuriously assert on AArch64 because the spill location on stack for an 8-byte value is not properly aligned. After some hours of debugging and staring at the Valhalla specific changes, I finally noticed that when moving around the `T_VALUE`/`T_INLINE_TYPE`/`T_PRIMITIVE_OBJECT` basic type definitions, we forgot to adjust the spill map of C1's register allocator accordingly. Thanks, Tobias ------------- Commit messages: - 8295731: [lworld] C1's linear register allocator spill map is incorrect Changes: https://git.openjdk.org/valhalla/pull/797/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=797&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295731 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/797.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/797/head:pull/797 PR: https://git.openjdk.org/valhalla/pull/797 From thartmann at openjdk.org Thu Oct 20 14:11:29 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 20 Oct 2022 14:11:29 GMT Subject: [lworld] Integrated: 8295731: [lworld] C1's linear register allocator spill map is incorrect In-Reply-To: References: Message-ID: On Thu, 20 Oct 2022 12:21:05 GMT, Tobias Hartmann wrote: > We spuriously assert on AArch64 because the spill location on stack for an 8-byte value is not properly aligned. After some hours of debugging and staring at the Valhalla specific changes, I finally noticed that when moving around the `T_VALUE`/`T_INLINE_TYPE`/`T_PRIMITIVE_OBJECT` basic type definitions, we forgot to adjust the spill map of C1's register allocator accordingly. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 4e59de18 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/4e59de18738484a0258f45cd6a49b029f352b3a2 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod 8295731: [lworld] C1's linear register allocator spill map is incorrect ------------- PR: https://git.openjdk.org/valhalla/pull/797 From vromero at openjdk.org Thu Oct 20 20:15:41 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 20 Oct 2022 20:15:41 GMT Subject: [lworld] RFR: 8295086: [lworld] follow-up for JDK-8288131 [v3] In-Reply-To: References: Message-ID: > code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: additional changes ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/793/files - new: https://git.openjdk.org/valhalla/pull/793/files/115b7c18..529d0e01 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=01-02 Stats: 97 lines in 11 files changed: 22 ins; 23 del; 52 mod Patch: https://git.openjdk.org/valhalla/pull/793.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/793/head:pull/793 PR: https://git.openjdk.org/valhalla/pull/793 From vromero at openjdk.org Thu Oct 20 20:19:56 2022 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 20 Oct 2022 20:19:56 GMT Subject: [lworld] RFR: 8295086: [lworld] follow-up for JDK-8288131 [v4] In-Reply-To: References: Message-ID: > code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge branch 'lworld' into JDK-8295086 - additional changes - following on with the changes after merge - Merge branch 'lworld' into JDK-8295086 - 8295086: [lworld] follow-up for JDK-8288131 ------------- Changes: https://git.openjdk.org/valhalla/pull/793/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=03 Stats: 187 lines in 14 files changed: 63 ins; 26 del; 98 mod Patch: https://git.openjdk.org/valhalla/pull/793.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/793/head:pull/793 PR: https://git.openjdk.org/valhalla/pull/793 From mchung at openjdk.org Thu Oct 20 22:50:14 2022 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 20 Oct 2022 22:50:14 GMT Subject: [lworld] RFR: 8224057: [lworld] a hidden value class can't have static factory method Message-ID: A hidden class has no name. Rather than declaring a "" method, a hidden value class will have to provide a different mechanism to create value instances. This PR adds a test to verify that. ------------- Commit messages: - 8224057: [lworld] a hidden value class can't have static factory method Changes: https://git.openjdk.org/valhalla/pull/798/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=798&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8224057 Stats: 221 lines in 3 files changed: 219 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/798.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/798/head:pull/798 PR: https://git.openjdk.org/valhalla/pull/798 From thartmann at openjdk.org Fri Oct 21 06:03:03 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 21 Oct 2022 06:03:03 GMT Subject: [lworld] RFR: 8295735: [lworld] Missing membar after buffer initialization in method handle return Message-ID: A missing membar after buffer initialization in C2's handling of scalarized returns from method handle intrinsics leads to incorrect execution and crashes with compiler/valhalla/inlinetypes/TestBufferTearing.java on aarch64. Thanks, Tobias ------------- Commit messages: - Undo incorrect refactoring - 8295735: [lworld] Missing membar after buffer initialization in method handle return Changes: https://git.openjdk.org/valhalla/pull/799/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=799&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295735 Stats: 11 lines in 1 file changed: 11 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/799.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/799/head:pull/799 PR: https://git.openjdk.org/valhalla/pull/799 From thartmann at openjdk.org Fri Oct 21 07:15:59 2022 From: thartmann at openjdk.org (Tobias Hartmann) Date: Fri, 21 Oct 2022 07:15:59 GMT Subject: [lworld] Integrated: 8295735: [lworld] Missing membar after buffer initialization in method handle return In-Reply-To: References: Message-ID: <2wUIvOznJMyU0efvW2TfZlRULzY0WnQ5g8u0usddf-o=.801db49e-f3e6-46f9-92c9-3a6984a922f8@github.com> On Fri, 21 Oct 2022 05:55:43 GMT, Tobias Hartmann wrote: > A missing membar after buffer initialization in C2's handling of scalarized returns from method handle intrinsics leads to incorrect execution and crashes with compiler/valhalla/inlinetypes/TestBufferTearing.java on aarch64. > > Thanks, > Tobias This pull request has now been integrated. Changeset: e350088b Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/e350088b00de212024094c77683a11ac6a53c5a4 Stats: 11 lines in 1 file changed: 11 ins; 0 del; 0 mod 8295735: [lworld] Missing membar after buffer initialization in method handle return ------------- PR: https://git.openjdk.org/valhalla/pull/799 From mchung at openjdk.org Fri Oct 21 16:05:14 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 21 Oct 2022 16:05:14 GMT Subject: [lworld] Integrated: 8224057: [lworld] a hidden value class can't have static factory method In-Reply-To: References: Message-ID: On Thu, 20 Oct 2022 22:41:53 GMT, Mandy Chung wrote: > A hidden class has no name. Rather than declaring a "" method, a hidden value class will have to provide a different mechanism to create value instances. > > This PR adds a test to verify that. This pull request has now been integrated. Changeset: 3aa9d593 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/3aa9d593ccc361290b8592e7d487db706c29384b Stats: 221 lines in 3 files changed: 219 ins; 1 del; 1 mod 8224057: [lworld] a hidden value class can't have static factory method ------------- PR: https://git.openjdk.org/valhalla/pull/798 From vromero at openjdk.org Sat Oct 22 19:12:35 2022 From: vromero at openjdk.org (Vicente Romero) Date: Sat, 22 Oct 2022 19:12:35 GMT Subject: [lworld] RFR: 8295086: [lworld] follow-up for JDK-8288131 [v5] In-Reply-To: References: Message-ID: > code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only Vicente Romero 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 JDK-8295086 - more changes - Merge branch 'lworld' into JDK-8295086 - additional changes - following on with the changes after merge - Merge branch 'lworld' into JDK-8295086 - 8295086: [lworld] follow-up for JDK-8288131 ------------- Changes: https://git.openjdk.org/valhalla/pull/793/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=793&range=04 Stats: 342 lines in 21 files changed: 62 ins; 176 del; 104 mod Patch: https://git.openjdk.org/valhalla/pull/793.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/793/head:pull/793 PR: https://git.openjdk.org/valhalla/pull/793 From dsimms at openjdk.org Mon Oct 24 09:09:43 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 24 Oct 2022 09:09:43 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 ------------- Commit messages: - ZObjArrayAllocator::initialize from 8294900 used default prototype markWord - Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 - 8294467: Fix sequence-point warnings in Hotspot - 8294468: Fix char-subscripts warnings in Hotspot - 8295662: jdk/incubator/vector tests fail "assert(VM_Version::supports_avx512vlbw()) failed" - 8295668: validate-source failure after JDK-8290011 - 8295372: CompactNumberFormat handling of number one with decimal part - 8295456: (ch) sun.nio.ch.Util::checkBufferPositionAligned gives misleading/incorrect error - 8290011: IGV: Remove dead code and cleanup - 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation - ... and 190 more: https://git.openjdk.org/valhalla/compare/3aa9d593...453a7b45 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=00.0 - jdk: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=00.1 Changes: https://git.openjdk.org/valhalla/pull/800/files Stats: 31259 lines in 1203 files changed: 18280 ins; 8098 del; 4881 mod Patch: https://git.openjdk.org/valhalla/pull/800.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/800/head:pull/800 PR: https://git.openjdk.org/valhalla/pull/800 From dsimms at openjdk.org Mon Oct 24 09:22:04 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 24 Oct 2022 09:22:04 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 David Simms has updated the pull request incrementally with one additional commit since the last revision: Compiler warning ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/800/files - new: https://git.openjdk.org/valhalla/pull/800/files/453a7b45..e44f8550 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=00-01 Stats: 9 lines in 1 file changed: 1 ins; 5 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/800.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/800/head:pull/800 PR: https://git.openjdk.org/valhalla/pull/800 From dsimms at openjdk.org Mon Oct 24 10:22:19 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 24 Oct 2022 10:22:19 GMT Subject: [lworld] RFR: Merge jdk [v3] In-Reply-To: References: Message-ID: > Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 David Simms has updated the pull request incrementally with one additional commit since the last revision: Compile issue, explicit tmp regs to load_oop_heap ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/800/files - new: https://git.openjdk.org/valhalla/pull/800/files/e44f8550..1f0af2a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=01-02 Stats: 9 lines in 3 files changed: 0 ins; 0 del; 9 mod Patch: https://git.openjdk.org/valhalla/pull/800.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/800/head:pull/800 PR: https://git.openjdk.org/valhalla/pull/800 From dsimms at openjdk.org Mon Oct 24 10:35:52 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 24 Oct 2022 10:35:52 GMT Subject: [lworld] RFR: Merge jdk [v4] In-Reply-To: References: Message-ID: > Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 David Simms has updated the pull request incrementally with one additional commit since the last revision: Missed adjusting new assert in merge conflict ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/800/files - new: https://git.openjdk.org/valhalla/pull/800/files/1f0af2a2..b272df1f Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=03 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=800&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/800.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/800/head:pull/800 PR: https://git.openjdk.org/valhalla/pull/800 From dsimms at openjdk.org Mon Oct 24 13:00:54 2022 From: dsimms at openjdk.org (David Simms) Date: Mon, 24 Oct 2022 13:00:54 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Mon, 24 Oct 2022 08:59:30 GMT, David Simms wrote: > Merge tag 'jdk-20+20' into lworld_merge_jdk_20_20 This pull request has now been integrated. Changeset: 3b88153c Author: David Simms URL: https://git.openjdk.org/valhalla/commit/3b88153c50f5b5670bb6bbf756031cbe98c054b8 Stats: 31277 lines in 1205 files changed: 18281 ins; 8103 del; 4893 mod Merge jdk Merge tag 'jdk-20+20' ------------- PR: https://git.openjdk.org/valhalla/pull/800 From vromero at openjdk.org Mon Oct 24 19:25:03 2022 From: vromero at openjdk.org (Vicente Romero) Date: Mon, 24 Oct 2022 19:25:03 GMT Subject: [lworld] Integrated: 8295086: [lworld] follow-up for JDK-8288131 In-Reply-To: References: Message-ID: On Wed, 12 Oct 2022 19:35:56 GMT, Vicente Romero wrote: > code related to primitive classes needs to be hidden behind the -XDenablePrimitiveClasses flag, this work is a follow-up of JDK-8288131. Hiding this remaining code behind the flag is not absolutely necessary as it probably won't be executed anyways but it will make easier to located, and extract if needed, the code related with primitive classes only. > > The initial goal for this one was expanded and I also cleaned up the code, reduced gratuitous differences with master branch, and synchronized the code better with the current spec. This pull request has now been integrated. Changeset: eef5d0bd Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/eef5d0bd79aa97fdb515b5688ba3717ede3a435b Stats: 342 lines in 21 files changed: 62 ins; 176 del; 104 mod 8295086: [lworld] follow-up for JDK-8288131 ------------- PR: https://git.openjdk.org/valhalla/pull/793 From dsimms at openjdk.org Thu Oct 27 09:02:12 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 27 Oct 2022 09:02:12 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-20+21' into lworld_merge_jdk_20_21 # Conflicts: # src/hotspot/share/oops/constantPool.cpp # src/hotspot/share/oops/method.cpp # src/hotspot/share/oops/method.hpp # src/hotspot/share/runtime/sharedRuntime.cpp # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java ------------- Commit messages: - Merge tag 'jdk-20+21' into lworld_merge_jdk_20_21 - 8295823: Use enhanced-for cycle instead of Enumeration in java.naming - 8293093: NPE in P11KeyStore.getID - 8265441: IGV: select block nodes by clicking on it - 8295879: JFR: Remove warnings in the jdk.jfr module - 8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots - 8294752: G1: Remove redundant checks in check_obj_during_refinement - 8295889: NMT preinit code does not handle allocation errors - 8295868: 32-bit Windows build failures after JDK-8294466 - 8295885: GHA: Bump gcc versions - ... and 81 more: https://git.openjdk.org/valhalla/compare/eef5d0bd...ef135072 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=801&range=00.0 - jdk: https://webrevs.openjdk.org/?repo=valhalla&pr=801&range=00.1 Changes: https://git.openjdk.org/valhalla/pull/801/files Stats: 144412 lines in 1016 files changed: 83807 ins; 29949 del; 30656 mod Patch: https://git.openjdk.org/valhalla/pull/801.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/801/head:pull/801 PR: https://git.openjdk.org/valhalla/pull/801 From dsimms at openjdk.org Thu Oct 27 11:28:29 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 27 Oct 2022 11:28:29 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: <1A83gteqnsBtjJCZvNYp5KDFb0nZU9sF9ZBzbwcFBX8=.4bcd0862-47b4-4cc8-90d4-a051c4564588@github.com> > Merge tag 'jdk-20+21' into lworld_merge_jdk_20_21 > > # Conflicts: > # src/hotspot/share/oops/constantPool.cpp > # src/hotspot/share/oops/method.cpp > # src/hotspot/share/oops/method.hpp > # src/hotspot/share/runtime/sharedRuntime.cpp > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 1459 commits: - Merge tag 'jdk-20+21' into lworld_merge_jdk_20_21 Added tag jdk-20+21 for changeset 46e6aee0 # Conflicts: # src/hotspot/share/oops/constantPool.cpp # src/hotspot/share/oops/method.cpp # src/hotspot/share/oops/method.hpp # src/hotspot/share/runtime/sharedRuntime.cpp # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java - 8295086: [lworld] follow-up for JDK-8288131 - Merge jdk Merge tag 'jdk-20+20' - 8224057: [lworld] a hidden value class can't have static factory method - 8295735: [lworld] Missing membar after buffer initialization in method handle return - 8295731: [lworld] C1's linear register allocator spill map is incorrect - 8247569: [lworld] Align with spec for methods 8294224: [lworld] VM support for factory methods Co-authored-by: Vicente Romero Co-authored-by: Harold Seigel Co-authored-by: Mandy Chung Reviewed-by: fparain, mchung - 8295655: [lworld] AArch64: Deoptimization from return value stub fails - 8295455: [lworld] find_callee_info_helper hits "must have non-abstract attached method" assert - 8281295: Prototype serialization/deserialization using Unsafe. Reviewed-by: mchung - ... and 1449 more: https://git.openjdk.org/valhalla/compare/46e6aee0...ef135072 ------------- Changes: https://git.openjdk.org/valhalla/pull/801/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=801&range=01 Stats: 195499 lines in 1605 files changed: 186587 ins; 2175 del; 6737 mod Patch: https://git.openjdk.org/valhalla/pull/801.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/801/head:pull/801 PR: https://git.openjdk.org/valhalla/pull/801 From dsimms at openjdk.org Thu Oct 27 11:28:31 2022 From: dsimms at openjdk.org (David Simms) Date: Thu, 27 Oct 2022 11:28:31 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Thu, 27 Oct 2022 08:52:53 GMT, David Simms wrote: > Merge tag 'jdk-20+21' into lworld_merge_jdk_20_21 > > # Conflicts: > # src/hotspot/share/oops/constantPool.cpp > # src/hotspot/share/oops/method.cpp > # src/hotspot/share/oops/method.hpp > # src/hotspot/share/runtime/sharedRuntime.cpp > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java This pull request has now been integrated. Changeset: 21973951 Author: David Simms URL: https://git.openjdk.org/valhalla/commit/2197395184149a900efa7c95f9bb9cfc926e29d0 Stats: 144412 lines in 1016 files changed: 83807 ins; 29949 del; 30656 mod Merge jdk Merge tag 'jdk-20+21' ------------- PR: https://git.openjdk.org/valhalla/pull/801 From mchung at openjdk.org Fri Oct 28 17:22:08 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 28 Oct 2022 17:22:08 GMT Subject: [lworld] RFR: JDK-8293321: [lworld] substitutability test shall support value class with cyclic membership Message-ID: L-type allows cycles. `acmp` shall support value classes with cyclic membership. This PR adds the support in the Java implementation of `acmp` (i.e. `ValueObjectMethods::isSubstitutable`). This patch includes [John's first cut to make a Y combinator method handle](https://github.com/openjdk/jdk/pull/10155) to enable a method handle to call itself recursively. PR 10155 is adequate for internal use for now. A separate RFE will follow to define such an API. A separate issue [JDK-8296056](https://bugs.openjdk.org/browse/JDK-8296056) tracks the C2 `acmp` support. ------------- Commit messages: - add @ignore test for -Xcomp - minor cleanup - Support recursive data type for value class - Merge branch 'lworld' of https://github.com/openjdk/valhalla into recursive-mh - prototype Changes: https://git.openjdk.org/valhalla/pull/802/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=802&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293321 Stats: 639 lines in 3 files changed: 623 ins; 7 del; 9 mod Patch: https://git.openjdk.org/valhalla/pull/802.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/802/head:pull/802 PR: https://git.openjdk.org/valhalla/pull/802 From jrose at openjdk.org Fri Oct 28 19:33:03 2022 From: jrose at openjdk.org (John R Rose) Date: Fri, 28 Oct 2022 19:33:03 GMT Subject: [lworld] RFR: JDK-8293321: [lworld] substitutability test shall support value class with cyclic membership In-Reply-To: References: Message-ID: On Fri, 28 Oct 2022 17:15:19 GMT, Mandy Chung wrote: > L-type allows cycles. `acmp` shall support value classes with cyclic membership. This PR adds the support in the Java implementation of `acmp` (i.e. `ValueObjectMethods::isSubstitutable`). > > This patch includes [John's first cut to make a Y combinator method handle](https://github.com/openjdk/jdk/pull/10155) to enable a method handle to call itself recursively. PR 10155 is adequate for internal use for now. A separate RFE will follow to define such an API. > > A separate issue [JDK-8296056](https://bugs.openjdk.org/browse/JDK-8296056) tracks the C2 `acmp` support. Two values `x`, `y` are substitutable if and only if, for every access path `x.a.b.c`, `y.a.b.c` also exists (and vice versa), and moreover the two values of those two accesses are themselves substitutable. (The call `.getClass()` is one possible path; the rest of the paths are field references, regardless of access protection.) This definition can be simplified by stipulating that only paths `.a.b.c` which end in a non-value object (primitive, null, id-object) are significant; the equivalence is the same. In the case of a deeply nested (probably recursively-typed) value, the number of such paths maybe exponentially large (compared with the number of object "nodes"). So a naive exploration of all paths will be infeasible. For example, a "ladder" of binary nodes where both sides of each "rung" points to the same "ladder" of one less depth, will have 2^D complexity of enumerating all paths. And cyclic value graphs (which must involve recursive types) have an infinite number of paths, which is even scarier. That said, this is a known problem with known solutions. (It is the DFA minimization problem in disguise, aka the RE equivalence problem, and also the type structural equivalence problem which the Algol designers inflicted on themselves.) In practice, in most cases, the naive algorithm will do fine. https://www.ics.uci.edu/~goodrich/teach/cs162/notes/rm.pdf https://cs.uwaterloo.ca/~dberry/FTP_SITE/reprints.journals.conferences/BerrySchwartz1979TypeEquiv.pdf As we discussed offline, I suggest using a relatively native algorithm for a start, one that doesn't "remember where it has already been", but we should run a counter (of node visits), and throw `StackOverflowError` if the counter gets "unreasonably" large. (Regardless of how many real stack frames were consumed.) This is allowed by the JVMS, though we frown on it. We can refine the algorithm over time. There are lots of ideas in our heads and in the literature for making common cases work better. By allowing SOE, this becomes a QOS rather than a correctness issue. We might possibly come up with a solution for the general case that we are comfortable with. (I can imagine how one would go about it, doing on-the-fly minimization moves on dual DFAs, in the course of a depth-first traversal? but it's tricky. And the payoff is really small.) I would want the algorithm to withstand even determined complexity attacks, from value-object graphs crafted by Evil Masterminds. Since that's not a game I particularly want to play for very long, I think we will also keep the `StackOverflowError` option alive even when we have "smart" algorithms. This can be tuned by a JVM switch. For users who take umbrage at SOE when their value graphs get really big, we will have to say, "you're holding it wrong". No decent language can completely prevent users from harming themselves via some correct but wrong-headed Turing-footgun. I think this is such a situation. ------------- PR: https://git.openjdk.org/valhalla/pull/802 From mchung at openjdk.org Fri Oct 28 21:54:27 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 28 Oct 2022 21:54:27 GMT Subject: [lworld] RFR: JDK-8293321: [lworld] substitutability test shall support value class with cyclic membership [v2] In-Reply-To: References: Message-ID: > L-type allows cycles. `acmp` shall support value classes with cyclic membership. This PR adds the support in the Java implementation of `acmp` (i.e. `ValueObjectMethods::isSubstitutable`). > > This patch includes [John's first cut to make a Y combinator method handle](https://github.com/openjdk/jdk/pull/10155) to enable a method handle to call itself recursively. PR 10155 is adequate for internal use for now. A separate RFE will follow to define such an API. > > A separate issue [JDK-8296056](https://bugs.openjdk.org/browse/JDK-8296056) tracks the C2 `acmp` support. Mandy Chung has updated the pull request incrementally with two additional commits since the last revision: - Add a test case of large graph throwing SOE - Add a node-visit counter and throw SOE if it exceeds the threshold ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/802/files - new: https://git.openjdk.org/valhalla/pull/802/files/00757be8..8b1e5508 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=802&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=802&range=00-01 Stats: 192 lines in 2 files changed: 138 ins; 22 del; 32 mod Patch: https://git.openjdk.org/valhalla/pull/802.diff Fetch: git fetch https://git.openjdk.org/valhalla pull/802/head:pull/802 PR: https://git.openjdk.org/valhalla/pull/802 From mchung at openjdk.org Fri Oct 28 21:55:43 2022 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 28 Oct 2022 21:55:43 GMT Subject: [lworld] RFR: JDK-8293321: [lworld] substitutability test shall support value class with cyclic membership In-Reply-To: References: Message-ID: On Fri, 28 Oct 2022 17:15:19 GMT, Mandy Chung wrote: > L-type allows cycles. `acmp` shall support value classes with cyclic membership. This PR adds the support in the Java implementation of `acmp` (i.e. `ValueObjectMethods::isSubstitutable`). > > This patch includes [John's first cut to make a Y combinator method handle](https://github.com/openjdk/jdk/pull/10155) to enable a method handle to call itself recursively. PR 10155 is adequate for internal use for now. A separate RFE will follow to define such an API. > > A separate issue [JDK-8296056](https://bugs.openjdk.org/browse/JDK-8296056) tracks the C2 `acmp` support. Added a counter and throw SOE if it exceeds the threshold for this initial implementation. ------------- PR: https://git.openjdk.org/valhalla/pull/802