From thartmann at openjdk.java.net Mon Feb 1 10:12:04 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 1 Feb 2021 10:12:04 GMT Subject: [lworld] RFR: 8260363: [lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match In-Reply-To: References: Message-ID: On Thu, 28 Jan 2021 12:26:39 GMT, Roland Westrelin wrote: > This is caused by a StoreCM whose OopStore doesn't point to a Store > node because it was optimized out but to a memory Phi. The Phi is for > slice TypeAryPtr::INLINES. When > Compile::adjust_flattened_array_access_aliases() runs, the > TypeAryPtr::INLINES slice becomes dead and is replaced by independent > slices for each field of flat array elements. Because the StoreCM > doesn't point to a Store, it's impossible to tell what slice it's for > so its input still points to the TypeAryPtr::INLINES Phi once > Compile::adjust_flattened_array_access_aliases() is over. > > Given the TypeAryPtr::INLINES slice is dead that's a problem: assuming > we can end up with a StoreCM that points to a Phi for a non eliminated > Store (the Store would be behind the Phi I suppose in that case), then > after Compile::adjust_flattened_array_access_aliases() runs, the Store > would have moved to a new Phi but the StoreCM wouldn't have been > updated. > > But that's not what causes the crash. The crash occurs because the > TypeAryPtr::INLINES memory subgraph is partially killed by > Compile::adjust_flattened_array_access_aliases() so when matching > occurs the Phi is only reachable through a precedence edge from the > StoreCM (final graph reshaping moves the OopStore input to precedence > edges). It's unreachable from root at matching time (because that code > doesn't follow precendence edge) and is not marked as shared > by Matcher::find_shared(). > > When Compile::adjust_flattened_array_access_aliases() runs, the > StoreCM OopStore is actually first set to a MergeMem node that > captures slices created for flat array fields but when > StoreCMNode::Ideal() executes it sets the input to the > TypeAryPtr::INLINES input of the MergeMem. I think that last steps is > what's incorrect after > Compile::adjust_flattened_array_access_aliases(). So I changed that > logic so it keeps the MergeMem input and also changed final graph > reshape so it adds as many precedence edges as there are flat field > inputs to the MergeMem. These changes are required to preserve > correctness, I believe. > > With that, i still hit the assert because the bottom memory input to > the MergeMem can end up as a precedence edge to the StoreCM (if that > entry to the MergeMem is top). That bottom memory in the case of the > regression test is a Phi that was created by > Compile::adjust_flattened_array_access_aliases() and is usually > optimized out. It's only reachable from the StoreCM precedence edge. I > don't think there's a fundamental problem here so I change matching so > it looks at precedence edges when looking for shared node. I also had > to change node scheduling in a similar way. Looks scary but reasonable to me! :) ------------- Marked as reviewed by thartmann (Committer). PR: https://git.openjdk.java.net/valhalla/pull/317 From rriggs at openjdk.java.net Tue Feb 2 21:01:08 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 2 Feb 2021 21:01:08 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes Message-ID: Update terminology used to refer to primitive classes (from inline classes). Drop the descriptions using "projection" and use "conversion" as needed. Updated dependencies on Class.isPrimitiveClass(). [Updating test names will be a separate task.] ------------- Commit messages: - 8260606: Update Valhalla core-libs naming for methods related to primitive classes Changes: https://git.openjdk.java.net/valhalla/pull/318/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=318&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8260606 Stats: 206 lines in 28 files changed: 0 ins; 14 del; 192 mod Patch: https://git.openjdk.java.net/valhalla/pull/318.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/318/head:pull/318 PR: https://git.openjdk.java.net/valhalla/pull/318 From dsimms at openjdk.java.net Wed Feb 3 07:56:00 2021 From: dsimms at openjdk.java.net (David Simms) Date: Wed, 3 Feb 2021 07:56:00 GMT Subject: [lworld] Integrated: Merge jdk Message-ID: <8lQ8YOvS61VDmsQUBE-RtDLIXttFQUn7A1P5BpD5vM8=.5d6270b9-e87d-411b-af7a-3d7503d628b7@github.com> Merge to 20210119 ------------- Commit messages: - Test fix - Test issue fixed - JDK-8257594 fix merged - Open java.base for reflective setAccessible - Valhalla adjust for JDK-8257772 - 8260575: [lworld] Merge of JDK 17 causing javac type casting issues with reference projections - Version 17 on CheckFeatureGate tests - Tabs (still borked indentation) - Version 60 -> 61 - Remove deprecated warnings - ... and 1075 more: https://git.openjdk.java.net/valhalla/compare/bd81ccfd...328b6125 The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/valhalla/pull/316/files Stats: 143804 lines in 1307 files changed: 137167 ins; 2045 del; 4592 mod Patch: https://git.openjdk.java.net/valhalla/pull/316.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/316/head:pull/316 PR: https://git.openjdk.java.net/valhalla/pull/316 From dsimms at openjdk.java.net Wed Feb 3 07:56:04 2021 From: dsimms at openjdk.java.net (David Simms) Date: Wed, 3 Feb 2021 07:56:04 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: <8lQ8YOvS61VDmsQUBE-RtDLIXttFQUn7A1P5BpD5vM8=.5d6270b9-e87d-411b-af7a-3d7503d628b7@github.com> References: <8lQ8YOvS61VDmsQUBE-RtDLIXttFQUn7A1P5BpD5vM8=.5d6270b9-e87d-411b-af7a-3d7503d628b7@github.com> Message-ID: On Thu, 28 Jan 2021 08:29:09 GMT, David Simms wrote: > Merge to 20210119 This pull request has now been integrated. Changeset: 85690886 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/85690886 Stats: 118958 lines in 3159 files changed: 64244 ins; 32945 del; 21769 mod Merge jdk Merge to 20210119 ------------- PR: https://git.openjdk.java.net/valhalla/pull/316 From roland at openjdk.java.net Wed Feb 3 12:06:06 2021 From: roland at openjdk.java.net (Roland Westrelin) Date: Wed, 3 Feb 2021 12:06:06 GMT Subject: [lworld] RFR: 8260363: [lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match In-Reply-To: References: Message-ID: On Mon, 1 Feb 2021 10:09:23 GMT, Tobias Hartmann wrote: > Looks scary but reasonable to me! :) right! Thanks for the review. ------------- PR: https://git.openjdk.java.net/valhalla/pull/317 From roland at openjdk.java.net Wed Feb 3 12:06:09 2021 From: roland at openjdk.java.net (Roland Westrelin) Date: Wed, 3 Feb 2021 12:06:09 GMT Subject: [lworld] Integrated: 8260363: [lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match In-Reply-To: References: Message-ID: On Thu, 28 Jan 2021 12:26:39 GMT, Roland Westrelin wrote: > This is caused by a StoreCM whose OopStore doesn't point to a Store > node because it was optimized out but to a memory Phi. The Phi is for > slice TypeAryPtr::INLINES. When > Compile::adjust_flattened_array_access_aliases() runs, the > TypeAryPtr::INLINES slice becomes dead and is replaced by independent > slices for each field of flat array elements. Because the StoreCM > doesn't point to a Store, it's impossible to tell what slice it's for > so its input still points to the TypeAryPtr::INLINES Phi once > Compile::adjust_flattened_array_access_aliases() is over. > > Given the TypeAryPtr::INLINES slice is dead that's a problem: assuming > we can end up with a StoreCM that points to a Phi for a non eliminated > Store (the Store would be behind the Phi I suppose in that case), then > after Compile::adjust_flattened_array_access_aliases() runs, the Store > would have moved to a new Phi but the StoreCM wouldn't have been > updated. > > But that's not what causes the crash. The crash occurs because the > TypeAryPtr::INLINES memory subgraph is partially killed by > Compile::adjust_flattened_array_access_aliases() so when matching > occurs the Phi is only reachable through a precedence edge from the > StoreCM (final graph reshaping moves the OopStore input to precedence > edges). It's unreachable from root at matching time (because that code > doesn't follow precendence edge) and is not marked as shared > by Matcher::find_shared(). > > When Compile::adjust_flattened_array_access_aliases() runs, the > StoreCM OopStore is actually first set to a MergeMem node that > captures slices created for flat array fields but when > StoreCMNode::Ideal() executes it sets the input to the > TypeAryPtr::INLINES input of the MergeMem. I think that last steps is > what's incorrect after > Compile::adjust_flattened_array_access_aliases(). So I changed that > logic so it keeps the MergeMem input and also changed final graph > reshape so it adds as many precedence edges as there are flat field > inputs to the MergeMem. These changes are required to preserve > correctness, I believe. > > With that, i still hit the assert because the bottom memory input to > the MergeMem can end up as a precedence edge to the StoreCM (if that > entry to the MergeMem is top). That bottom memory in the case of the > regression test is a Phi that was created by > Compile::adjust_flattened_array_access_aliases() and is usually > optimized out. It's only reachable from the StoreCM precedence edge. I > don't think there's a fundamental problem here so I change matching so > it looks at precedence edges when looking for shared node. I also had > to change node scheduling in a similar way. This pull request has now been integrated. Changeset: fbb8a6bd Author: Roland Westrelin URL: https://git.openjdk.java.net/valhalla/commit/fbb8a6bd Stats: 111 lines in 5 files changed: 98 ins; 0 del; 13 mod 8260363: [lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match Reviewed-by: thartmann ------------- PR: https://git.openjdk.java.net/valhalla/pull/317 From mchung at openjdk.java.net Wed Feb 3 19:10:54 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 3 Feb 2021 19:10:54 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 20:55:07 GMT, Roger Riggs wrote: > Update terminology used to refer to primitive classes (from inline classes). > Drop the descriptions using "projection" and use "conversion" as needed. > Updated dependencies on Class.isPrimitiveClass(). > > [Updating test names will be a separate task.] src/java.base/share/classes/java/lang/Class.java line 558: > 556: * Returns {@code true} if this class is a primitive class. > 557: * > 558: * @return {@code true} if this class is a primitive class, otherwise false Nit: s/false/`{@code false}`/ ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From mchung at openjdk.java.net Wed Feb 3 19:23:00 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 3 Feb 2021 19:23:00 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 20:55:07 GMT, Roger Riggs wrote: > Update terminology used to refer to primitive classes (from inline classes). > Drop the descriptions using "projection" and use "conversion" as needed. > Updated dependencies on Class.isPrimitiveClass(). > > [Updating test names will be a separate task.] src/java.base/share/classes/java/lang/Class.java line 666: > 664: * is returned. > 665: */ > 666: private Class[] newPrimitiveTypeArray() { perhaps rename to `newTypeArrayForPrimitiveClass` src/java.base/share/classes/java/lang/invoke/ValueBootstrapMethods.java line 555: > 553: > 554: /** > 555: * Invoke the bootstrap methods hashCode for the given primitive classobject. a space is missing in `classobject` src/java.base/share/classes/java/lang/invoke/ValueBootstrapMethods.java line 557: > 555: * Invoke the bootstrap methods hashCode for the given primitive classobject. > 556: * @param o the instance to hash. > 557: * @return the hash code of the given primitive classobject. space is missing in the word `classobject` src/java.base/share/classes/java/lang/invoke/ValueBootstrapMethods.java line 584: > 582: * Invoke the bootstrap methods hashCode for the given primitive classobject. > 583: * @param o the instance to hash. > 584: * @return the string representation of the given primitive classobject. same typo `classobject` ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From mchung at openjdk.java.net Wed Feb 3 19:27:55 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 3 Feb 2021 19:27:55 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 20:55:07 GMT, Roger Riggs wrote: > Update terminology used to refer to primitive classes (from inline classes). > Drop the descriptions using "projection" and use "conversion" as needed. > Updated dependencies on Class.isPrimitiveClass(). > > [Updating test names will be a separate task.] Looks good. Do you want to add `IdentityObject` in a separate PR? It's okay with me to add this in this PR. src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 276: > 274: } > 275: > 276: public Object getReferenceVolatile(Object o, long offset, Class vc) { `vc` parameter should also be renamed to `pc` to be consistent with other methods. ------------- Marked as reviewed by mchung (Committer). PR: https://git.openjdk.java.net/valhalla/pull/318 From rriggs at openjdk.java.net Wed Feb 3 19:52:54 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 3 Feb 2021 19:52:54 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: On Wed, 3 Feb 2021 19:24:46 GMT, Mandy Chung wrote: > Looks good. Do you want to add `IdentityObject` in a separate PR? It's okay with me to add this in this PR. IdentityObject is already in java.lang. java.lang.PrimitiveObject has not yet been added. ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From mchung at openjdk.java.net Wed Feb 3 20:00:55 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 3 Feb 2021 20:00:55 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: <59Yvzwa1YlEtxZl-aXNYIwoN-pr0l_8fR48T7W4L9ow=.eabbdb99-d7ad-42ba-bfa4-2be49b842912@github.com> On Wed, 3 Feb 2021 19:50:30 GMT, Roger Riggs wrote: > > Looks good. Do you want to add `IdentityObject` in a separate PR? It's okay with me to add this in this PR. > > IdentityObject is already in java.lang. > > java.lang.PrimitiveObject has not yet been added. I meant `PrimitiveObject` (sorry for the typo). ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From rriggs at openjdk.java.net Wed Feb 3 21:23:03 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 3 Feb 2021 21:23:03 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes [v2] In-Reply-To: References: Message-ID: > Update terminology used to refer to primitive classes (from inline classes). > Drop the descriptions using "projection" and use "conversion" as needed. > Updated dependencies on Class.isPrimitiveClass(). > > [Updating test names will be a separate task.] Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: - Merge branch 'lworld' of https://git.openjdk.java.net/valhalla into 8251554-rename-primitiveclass - Updates per review comments - 8260606: Update Valhalla core-libs naming for methods related to primitive classes ------------- Changes: https://git.openjdk.java.net/valhalla/pull/318/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=318&range=01 Stats: 209 lines in 28 files changed: 0 ins; 14 del; 195 mod Patch: https://git.openjdk.java.net/valhalla/pull/318.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/318/head:pull/318 PR: https://git.openjdk.java.net/valhalla/pull/318 From mchung at openjdk.java.net Wed Feb 3 21:28:54 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 3 Feb 2021 21:28:54 GMT Subject: [lworld] RFR: 8260606: Update Valhalla core-libs naming for methods related to primitive classes [v2] In-Reply-To: References: Message-ID: On Wed, 3 Feb 2021 21:23:03 GMT, Roger Riggs wrote: >> Update terminology used to refer to primitive classes (from inline classes). >> Drop the descriptions using "projection" and use "conversion" as needed. >> Updated dependencies on Class.isPrimitiveClass(). >> >> [Updating test names will be a separate task.] > > Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: > > - Merge branch 'lworld' of https://git.openjdk.java.net/valhalla into 8251554-rename-primitiveclass > - Updates per review comments > - 8260606: Update Valhalla core-libs naming for methods related to primitive classes Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From dsimms at openjdk.java.net Thu Feb 4 12:47:41 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 4 Feb 2021 12:47:41 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-17+8' into lworld_merge_jdk_17_8 Logical merge compilation fixes ------------- Commit messages: - Logical merge compilation fixes - Merge tag 'jdk-17+8' into lworld_merge_jdk_17_8 - 8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N" - 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m - 8258799: [Testbug] RandomCommandsTest must check if tested directive is added via jcmd - 8241995: Clarify InetSocketAddress::toString specification - 8259265: Refactor UncaughtExceptions shell test as java test. - 8260998: Shenandoah: Restore reference processing statistics reporting - 8260617: Merge ZipFile encoding check with the initial hash calculation - 8260581: IGV: enhance node search - ... and 222 more: https://git.openjdk.java.net/valhalla/compare/fbb8a6bd...604b0cb2 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=319&range=00.0 - jdk: https://webrevs.openjdk.java.net/?repo=valhalla&pr=319&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/319/files Stats: 46740 lines in 1143 files changed: 18239 ins; 15300 del; 13201 mod Patch: https://git.openjdk.java.net/valhalla/pull/319.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/319/head:pull/319 PR: https://git.openjdk.java.net/valhalla/pull/319 From dsimms at openjdk.java.net Thu Feb 4 13:23:22 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 4 Feb 2021 13:23:22 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Merge tag 'jdk-17+8' into lworld_merge_jdk_17_8 > Logical merge compilation fixes David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 1083 commits: - Logical merge compilation fixes - Merge tag 'jdk-17+8' into lworld_merge_jdk_17_8 Added tag jdk-17+8 for changeset f025bc1d # Conflicts: # src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp # src/hotspot/share/c1/c1_Compilation.cpp # src/hotspot/share/c1/c1_LIRAssembler.cpp # src/hotspot/share/ci/ciInstanceKlass.cpp # src/hotspot/share/classfile/classFileParser.cpp # src/hotspot/share/classfile/placeholders.hpp # src/hotspot/share/classfile/systemDictionary.cpp # src/hotspot/share/classfile/systemDictionary.hpp # src/hotspot/share/classfile/verificationType.cpp # src/hotspot/share/compiler/compileBroker.cpp # src/hotspot/share/memory/metaspaceClosure.hpp # src/hotspot/share/memory/universe.cpp # src/hotspot/share/oops/arrayKlass.cpp # src/hotspot/share/oops/objArrayKlass.cpp # src/hotspot/share/opto/parse2.cpp # src/hotspot/share/prims/jvm.cpp # test/hotspot/jtreg/vmTestbase/jit/tiered/Test.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java # test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java # test/jdk/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template - 8260363: [lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match Reviewed-by: thartmann - Merge jdk Merge to 20210119 - [lworld] code cleanup reverting some old leftover change - [lworld] Field::get should return default value instead of null on non-flattened inline field Reviewed-by: rriggs - 8260375: [lworld] ValueTearing fails with -XX:FlatArrayElementMaxSize=0 -XX:InlineFieldMaxFlatSize=0 Reviewed-by: thartmann - Remove unused field from Method Reviewed-by: hseigel, lfoltan - 8260283: [lworld] C1's EliminateFieldAccess optimization fails with "wrong types" Reviewed-by: fparain - 8260225: [lworld] C1's delayed load indexed optimization sets incorrect type Reviewed-by: fparain - ... and 1073 more: https://git.openjdk.java.net/valhalla/compare/f025bc1d...604b0cb2 ------------- Changes: https://git.openjdk.java.net/valhalla/pull/319/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=319&range=01 Stats: 144118 lines in 1307 files changed: 137496 ins; 2036 del; 4586 mod Patch: https://git.openjdk.java.net/valhalla/pull/319.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/319/head:pull/319 PR: https://git.openjdk.java.net/valhalla/pull/319 From dsimms at openjdk.java.net Thu Feb 4 13:23:26 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 4 Feb 2021 13:23:26 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 09:55:30 GMT, David Simms wrote: > Merge tag 'jdk-17+8' into lworld_merge_jdk_17_8 > Logical merge compilation fixes This pull request has now been integrated. Changeset: 33dc4fb9 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/33dc4fb9 Stats: 46740 lines in 1143 files changed: 18239 ins; 15300 del; 13201 mod Merge jdk Merge tag 'jdk-17+8' ------------- PR: https://git.openjdk.java.net/valhalla/pull/319 From github.com+5010047+kelthuzadx at openjdk.java.net Thu Feb 4 16:02:06 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Thu, 4 Feb 2021 16:02:06 GMT Subject: [lworld] RFR: 8261019: valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine; " in class file $Proxy5" Message-ID: Hi all, QTypeDescriptorTest.java[0] also fails on my machine, this is occurred after merging JDK[1], I did some investigation. The root cause of the problem is that after the JDK was merged[1], the value of the constant CONSTANT_CLASS_DESCRIPTORS was changed from 61 to 62, but the major version of the class bytes generated dynamically by java.lang.reflect.ProxyGenerator was not updated simultaneously, it remained at the value 60: private byte[] generateClassFile() { // V16 == 60 visit(V16, accessFlags, dotToSlash(className), null, JLR_PROXY, typeNames(interfaces)); ... } ClassFileParser::verify_legal_class_name would go to an unexpected branch, which causes ClassFormatError. void ClassFileParser::verify_legal_class_name(...) const { ... if (length > 0) { ... // read _major_version(60) from dynamically generated class bytes, // compare with updated CONSTANT_CLASS_DESCRIPTORS(61) else if (_major_version >= CONSTANT_CLASS_DESCRIPTORS && bytes[length - 1] == ';' ) { // EXPECTED HERE legal = verify_unqualified_name(bytes + 1, length - 2, LegalClass); } else { // GO TO HERE legal = verify_unqualified_name(bytes, length, LegalClass); } } if (!legal) { ResourceMark rm(THREAD); assert(_class_name != NULL, "invariant"); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), "Illegal class name "%.*s" in class file %s", length, bytes, _class_name->as_C_string() ); return; } } JDK-826101 suspects that JDK-8261021[2] has the same problem since their exception messages are relatively similar. But according to their stack traces, they might be caused by different but related problems. [0] https://bugs.openjdk.java.net/browse/JDK-8261019 [1] https://github.com/openjdk/valhalla/pull/316 [2] https://bugs.openjdk.java.net/browse/JDK-8261021 ------------- Commit messages: - [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine;" in class file $Proxy5 Changes: https://git.openjdk.java.net/valhalla/pull/320/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=320&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261019 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/320.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/320/head:pull/320 PR: https://git.openjdk.java.net/valhalla/pull/320 From mchung at openjdk.java.net Thu Feb 4 18:14:56 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 4 Feb 2021 18:14:56 GMT Subject: [lworld] RFR: 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine; " in class file $Proxy5" In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 15:57:30 GMT, Yang Yi wrote: > Hi all, > > QTypeDescriptorTest.java[0] also fails on my machine, this is occurred after merging JDK[1], I did some investigation. The root cause of the problem is that after the JDK was merged[1], the value of the constant CONSTANT_CLASS_DESCRIPTORS was changed from 61 to 62, but the major version of the class bytes generated dynamically by java.lang.reflect.ProxyGenerator was not updated simultaneously, it remained at the value 60: > private byte[] generateClassFile() { > // V16 == 60 > visit(V16, accessFlags, dotToSlash(className), null, > JLR_PROXY, typeNames(interfaces)); > ... > } > ClassFileParser::verify_legal_class_name would go to an unexpected branch, which causes ClassFormatError. > void ClassFileParser::verify_legal_class_name(...) const { > ... > if (length > 0) { > ... > // read _major_version(60) from dynamically generated class bytes, > // compare with updated CONSTANT_CLASS_DESCRIPTORS(61) > else if (_major_version >= CONSTANT_CLASS_DESCRIPTORS && bytes[length - 1] == ';' ) { > // EXPECTED HERE > legal = verify_unqualified_name(bytes + 1, length - 2, LegalClass); > } else { > // GO TO HERE > legal = verify_unqualified_name(bytes, length, LegalClass); > } > } > if (!legal) { > ResourceMark rm(THREAD); > assert(_class_name != NULL, "invariant"); > Exceptions::fthrow( > THREAD_AND_LOCATION, > vmSymbols::java_lang_ClassFormatError(), > "Illegal class name "%.*s" in class file %s", length, bytes, > _class_name->as_C_string() > ); > return; > } > } > JDK-826101 suspects that JDK-8261021[2] has the same problem since their exception messages are relatively similar. But according to their stack traces, they might be caused by different but related problems. > > [0] https://bugs.openjdk.java.net/browse/JDK-8261019 > [1] https://github.com/openjdk/valhalla/pull/316 > [2] https://bugs.openjdk.java.net/browse/JDK-8261021 Thanks for fixing it. src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 456: > 454: */ > 455: private byte[] generateClassFile() { > 456: visit(V17, accessFlags, dotToSlash(className), null, Alternatively, we can use the value of the system property `java.class.version` to prepare for future class file version change. But this requires parsing it to extract the major version. I'm okay with this simple approach and remember to update it if the class file version is bumped. ------------- Marked as reviewed by mchung (Committer). PR: https://git.openjdk.java.net/valhalla/pull/320 From github.com+5010047+kelthuzadx at openjdk.java.net Fri Feb 5 02:33:10 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Fri, 5 Feb 2021 02:33:10 GMT Subject: [lworld] RFR: 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine; " in class file $Proxy5" [v2] In-Reply-To: References: Message-ID: > Hi all, > > QTypeDescriptorTest.java[0] also fails on my machine, this is occurred after merging JDK[1], I did some investigation. The root cause of the problem is that after the JDK was merged[1], the value of the constant CONSTANT_CLASS_DESCRIPTORS was changed from 61 to 62, but the major version of the class bytes generated dynamically by java.lang.reflect.ProxyGenerator was not updated simultaneously, it remained at the value 60: > private byte[] generateClassFile() { > // V16 == 60 > visit(V16, accessFlags, dotToSlash(className), null, > JLR_PROXY, typeNames(interfaces)); > ... > } > ClassFileParser::verify_legal_class_name would go to an unexpected branch, which causes ClassFormatError. > void ClassFileParser::verify_legal_class_name(...) const { > ... > if (length > 0) { > ... > // read _major_version(60) from dynamically generated class bytes, > // compare with updated CONSTANT_CLASS_DESCRIPTORS(61) > else if (_major_version >= CONSTANT_CLASS_DESCRIPTORS && bytes[length - 1] == ';' ) { > // EXPECTED HERE > legal = verify_unqualified_name(bytes + 1, length - 2, LegalClass); > } else { > // GO TO HERE > legal = verify_unqualified_name(bytes, length, LegalClass); > } > } > if (!legal) { > ResourceMark rm(THREAD); > assert(_class_name != NULL, "invariant"); > Exceptions::fthrow( > THREAD_AND_LOCATION, > vmSymbols::java_lang_ClassFormatError(), > "Illegal class name "%.*s" in class file %s", length, bytes, > _class_name->as_C_string() > ); > return; > } > } > JDK-826101 suspects that JDK-8261021[2] has the same problem since their exception messages are relatively similar. But according to their stack traces, they might be caused by different but related problems. > > [0] https://bugs.openjdk.java.net/browse/JDK-8261019 > [1] https://github.com/openjdk/valhalla/pull/316 > [2] https://bugs.openjdk.java.net/browse/JDK-8261021 Yang Yi has updated the pull request incrementally with one additional commit since the last revision: Update full name ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/320/files - new: https://git.openjdk.java.net/valhalla/pull/320/files/65d376dd..04836bb7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=320&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=320&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/320.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/320/head:pull/320 PR: https://git.openjdk.java.net/valhalla/pull/320 From github.com+5010047+kelthuzadx at openjdk.java.net Fri Feb 5 02:33:11 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Fri, 5 Feb 2021 02:33:11 GMT Subject: [lworld] RFR: 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine; " in class file $Proxy5" [v2] In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 18:12:05 GMT, Mandy Chung wrote: >> Yang Yi has updated the pull request incrementally with one additional commit since the last revision: >> >> Update full name > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 456: > >> 454: */ >> 455: private byte[] generateClassFile() { >> 456: visit(V17, accessFlags, dotToSlash(className), null, > > Alternatively, we can use the value of the system property `java.class.version` to prepare for future class file version change. But this requires parsing it to extract the major version. > > I'm okay with this simple approach and remember to update it if the class file version is bumped. It seems reasonable. When I fix another related fail, I can tweak this part. ------------- PR: https://git.openjdk.java.net/valhalla/pull/320 From github.com+5010047+kelthuzadx at openjdk.java.net Fri Feb 5 03:29:08 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Fri, 5 Feb 2021 03:29:08 GMT Subject: [lworld] RFR: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " Message-ID: Hi all, Can I have a review of this trivial fix? The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. Thanks, Yang Yi ------------- Commit messages: - fix JDK-8261021 Changes: https://git.openjdk.java.net/valhalla/pull/321/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=321&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261021 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/321.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/321/head:pull/321 PR: https://git.openjdk.java.net/valhalla/pull/321 From thartmann at openjdk.java.net Fri Feb 5 08:38:02 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 5 Feb 2021 08:38:02 GMT Subject: [lworld] RFR: 8261037: [lworld] Assert during C2 compilation due to inconsistent JVMState at safepoint Message-ID: We assert when scalarizing an inline type in a safepoint because `debug_end()` (-> `_endoff`) of the attached `JVMState` is larger than `SafePointNode::_max`. I don't think JVMStates should be shared between safepoint nodes and I intend to fix this in mainline with [JDK-8261158](https://bugs.openjdk.java.net/browse/JDK-8261158). Gory details: In `PhaseIdealLoop::is_counted_loop`, we `// Check for immediately preceding SafePoint and remove` by cloning _SafePointNode1_ to _SafePointNode2_ without cloning the attached _JVMState_. Loop unswitching then clones the loop and therefore also clones _SafePointNode2_ to _SafePointNode3_, again without cloning the _JVMState_. All three safepoint nodes now share the same _JVMState_. An inline type is scalarized in _SafePointNode2_, increasing _JVMState_`::_endoff` to account for the fields. Once another inline type is scalarized in _SafePointNode3_, _JVMState_`::_endoff ` is out of bounds of _SafePointNode3_`::_max`. This fix refactors the code (which also serves as workaround because we now access `debug_end()` only after we updated it to the correct value for the current safepoint) and adds a regression test. Best regards, Tobias ------------- Commit messages: - 8261037: [lworld] Assert during C2 compilation due to inconsistent JVMState at safepoint Changes: https://git.openjdk.java.net/valhalla/pull/322/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=322&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261037 Stats: 35 lines in 3 files changed: 30 ins; 3 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/322.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/322/head:pull/322 PR: https://git.openjdk.java.net/valhalla/pull/322 From nick.gasson at arm.com Fri Feb 5 08:41:57 2021 From: nick.gasson at arm.com (Nick Gasson) Date: Fri, 05 Feb 2021 16:41:57 +0800 Subject: Status of AArch64 lworld port Message-ID: <85a6sidhyi.fsf@nicgas01-pc.shanghai.arm.com> Hi, I tried building the lworld branch on AArch64 but it seems to have bit-rotted since the port was originally done. I also noticed JDK-8258038 was raised to track this but it's not assigned at the moment. Just wondering if anyone is planning to work on this? -- Thanks, Nick From thartmann at openjdk.java.net Fri Feb 5 09:14:55 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 5 Feb 2021 09:14:55 GMT Subject: [lworld] Integrated: 8261037: [lworld] Assert during C2 compilation due to inconsistent JVMState at safepoint In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 08:33:19 GMT, Tobias Hartmann wrote: > We assert when scalarizing an inline type in a safepoint because `debug_end()` (-> `_endoff`) of the attached `JVMState` is larger than `SafePointNode::_max`. I don't think JVMStates should be shared between safepoint nodes and I intend to fix this in mainline with [JDK-8261158](https://bugs.openjdk.java.net/browse/JDK-8261158). > > Gory details: > In `PhaseIdealLoop::is_counted_loop`, we `// Check for immediately preceding SafePoint and remove` by cloning _SafePointNode1_ to _SafePointNode2_ without cloning the attached _JVMState_. Loop unswitching then clones the loop and therefore also clones _SafePointNode2_ to _SafePointNode3_, again without cloning the _JVMState_. All three safepoint nodes now share the same _JVMState_. An inline type is scalarized in _SafePointNode2_, increasing _JVMState_`::_endoff` to account for the fields. Once another inline type is scalarized in _SafePointNode3_, _JVMState_`::_endoff ` is out of bounds of _SafePointNode3_`::_max`. > > This fix refactors the code (which also serves as workaround because we now access `debug_end()` only after we updated it to the correct value for the current safepoint) and adds a regression test. > > Best regards, > Tobias This pull request has now been integrated. Changeset: ce486c32 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/ce486c32 Stats: 35 lines in 3 files changed: 30 ins; 3 del; 2 mod 8261037: [lworld] Assert during C2 compilation due to inconsistent JVMState at safepoint ------------- PR: https://git.openjdk.java.net/valhalla/pull/322 From tobias.hartmann at oracle.com Fri Feb 5 09:17:17 2021 From: tobias.hartmann at oracle.com (Tobias Hartmann) Date: Fri, 5 Feb 2021 10:17:17 +0100 Subject: Status of AArch64 lworld port In-Reply-To: <85a6sidhyi.fsf@nicgas01-pc.shanghai.arm.com> References: <85a6sidhyi.fsf@nicgas01-pc.shanghai.arm.com> Message-ID: <1853542c-80f4-db40-97ae-f3b3b74f91d6@oracle.com> Hi Nick, yes, the AArch64 port misses significant changes and is currently not tested on our (Oracle) side. Dmitriy Samersoff worked on this in the past but I'm not sure what his current plans are. In any case, contributions are very welcome and I'm happy to answer questions about the JIT related changes. Best regards, Tobias On 05.02.21 09:41, Nick Gasson wrote: > Hi, > > I tried building the lworld branch on AArch64 but it seems to have > bit-rotted since the port was originally done. I also noticed > JDK-8258038 was raised to track this but it's not assigned at the > moment. Just wondering if anyone is planning to work on this? > > -- > Thanks, > Nick > From thartmann at openjdk.java.net Fri Feb 5 12:30:14 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 5 Feb 2021 12:30:14 GMT Subject: [lworld] RFR: 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 Message-ID: <2eoFD8XkaCfXBIaqwbNSu2w_YZv_wCr8Qtbbdup65ps=.ba6dc036-7443-4b08-9e72-cca9c3fc9bb7@github.com> C1 compilations at level 1 and 2 should not profile array accesses. Best regards, Tobias ------------- Commit messages: - 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 Changes: https://git.openjdk.java.net/valhalla/pull/323/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=323&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261226 Stats: 8 lines in 2 files changed: 7 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/323.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/323/head:pull/323 PR: https://git.openjdk.java.net/valhalla/pull/323 From dsimms at openjdk.java.net Fri Feb 5 15:15:56 2021 From: dsimms at openjdk.java.net (David Simms) Date: Fri, 5 Feb 2021 15:15:56 GMT Subject: [lworld] RFR: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 03:24:10 GMT, Yang Yi wrote: > Hi all, > > Can I have a review of this trivial fix? > > The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. > > Thanks, > Yang Yi Looks good, thanks for the find ------------- Marked as reviewed by dsimms (Committer). PR: https://git.openjdk.java.net/valhalla/pull/321 From rriggs at openjdk.java.net Fri Feb 5 15:15:56 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 5 Feb 2021 15:15:56 GMT Subject: [lworld] RFR: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " In-Reply-To: References: Message-ID: <4A2n4Tj5T3QsLG6HPFcz5uwAbnc3FbNp75NpkxiipAA=.c55cef50-06a2-4de7-946d-ca28617acf5e@github.com> On Fri, 5 Feb 2021 03:24:10 GMT, Yang Yi wrote: > Hi all, > > Can I have a review of this trivial fix? > > The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. > > Thanks, > Yang Yi Marked as reviewed by rriggs (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/321 From thartmann at openjdk.java.net Fri Feb 5 15:26:59 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 5 Feb 2021 15:26:59 GMT Subject: [lworld] Integrated: 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 In-Reply-To: <2eoFD8XkaCfXBIaqwbNSu2w_YZv_wCr8Qtbbdup65ps=.ba6dc036-7443-4b08-9e72-cca9c3fc9bb7@github.com> References: <2eoFD8XkaCfXBIaqwbNSu2w_YZv_wCr8Qtbbdup65ps=.ba6dc036-7443-4b08-9e72-cca9c3fc9bb7@github.com> Message-ID: On Fri, 5 Feb 2021 12:26:42 GMT, Tobias Hartmann wrote: > C1 compilations at level 1 and 2 should not profile array accesses. > > Best regards, > Tobias This pull request has now been integrated. Changeset: ddfba612 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/ddfba612 Stats: 8 lines in 2 files changed: 7 ins; 1 del; 0 mod 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 ------------- PR: https://git.openjdk.java.net/valhalla/pull/323 From rriggs at openjdk.java.net Fri Feb 5 17:27:54 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 5 Feb 2021 17:27:54 GMT Subject: [lworld] Integrated: 8260606: Update Valhalla core-libs naming for methods related to primitive classes In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 20:55:07 GMT, Roger Riggs wrote: > Update terminology used to refer to primitive classes (from inline classes). > Drop the descriptions using "projection" and use "conversion" as needed. > Updated dependencies on Class.isPrimitiveClass(). > > [Updating test names will be a separate task.] This pull request has now been integrated. Changeset: 5f1e8d97 Author: Roger Riggs URL: https://git.openjdk.java.net/valhalla/commit/5f1e8d97 Stats: 209 lines in 28 files changed: 0 ins; 14 del; 195 mod 8260606: Update Valhalla core-libs naming for methods related to primitive classes Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/318 From mchung at openjdk.java.net Fri Feb 5 17:53:55 2021 From: mchung at openjdk.java.net (Mandy Chung) Date: Fri, 5 Feb 2021 17:53:55 GMT Subject: [lworld] RFR: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 03:24:10 GMT, Yang Yi wrote: > Hi all, > > Can I have a review of this trivial fix? > > The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. > > Thanks, > Yang Yi Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/321 From hseigel at openjdk.java.net Fri Feb 5 20:35:00 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 5 Feb 2021 20:35:00 GMT Subject: [lworld] RFR: 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile Message-ID: Please review this small fix to have runtime/valhalla tests call method Class.isPrimitiveClass() instead of Class.isInlineClass(). Thanks, Harold ------------- Commit messages: - 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile Changes: https://git.openjdk.java.net/valhalla/pull/324/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=324&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261264 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/324.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/324/head:pull/324 PR: https://git.openjdk.java.net/valhalla/pull/324 From rriggs at openjdk.java.net Fri Feb 5 20:49:48 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 5 Feb 2021 20:49:48 GMT Subject: [lworld] RFR: 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 20:30:45 GMT, Harold Seigel wrote: > Please review this small fix to have runtime/valhalla tests call method Class.isPrimitiveClass() instead of Class.isInlineClass(). > > Thanks, Harold Sorry Harold I missed these. ------------- Marked as reviewed by rriggs (Committer). PR: https://git.openjdk.java.net/valhalla/pull/324 From hseigel at openjdk.java.net Fri Feb 5 20:57:59 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 5 Feb 2021 20:57:59 GMT Subject: [lworld] RFR: 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile In-Reply-To: References: Message-ID: <4tkQoAGHn2DujoJ8u-jQIU48bb5y--sGrCZ5YaOzgVM=.39c719d2-f802-4f6b-8020-842bc94081e4@github.com> On Fri, 5 Feb 2021 20:46:39 GMT, Roger Riggs wrote: >> Please review this small fix to have runtime/valhalla tests call method Class.isPrimitiveClass() instead of Class.isInlineClass(). >> >> Thanks, Harold > > Sorry Harold I missed these. Thanks Roger for the reivew! ------------- PR: https://git.openjdk.java.net/valhalla/pull/324 From hseigel at openjdk.java.net Fri Feb 5 20:58:00 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 5 Feb 2021 20:58:00 GMT Subject: [lworld] Integrated: 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 20:30:45 GMT, Harold Seigel wrote: > Please review this small fix to have runtime/valhalla tests call method Class.isPrimitiveClass() instead of Class.isInlineClass(). > > Thanks, Harold This pull request has now been integrated. Changeset: c4f63d28 Author: Harold Seigel URL: https://git.openjdk.java.net/valhalla/commit/c4f63d28 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile Reviewed-by: rriggs ------------- PR: https://git.openjdk.java.net/valhalla/pull/324 From github.com+5010047+kelthuzadx at openjdk.java.net Fri Feb 5 21:34:55 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Fri, 5 Feb 2021 21:34:55 GMT Subject: [lworld] Integrated: 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine; " in class file $Proxy5" In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 15:57:30 GMT, Yang Yi wrote: > Hi all, > > QTypeDescriptorTest.java[0] also fails on my machine, this is occurred after merging JDK[1], I did some investigation. The root cause of the problem is that after the JDK was merged[1], the value of the constant CONSTANT_CLASS_DESCRIPTORS was changed from 61 to 62, but the major version of the class bytes generated dynamically by java.lang.reflect.ProxyGenerator was not updated simultaneously, it remained at the value 60: > private byte[] generateClassFile() { > // V16 == 60 > visit(V16, accessFlags, dotToSlash(className), null, > JLR_PROXY, typeNames(interfaces)); > ... > } > ClassFileParser::verify_legal_class_name would go to an unexpected branch, which causes ClassFormatError. > void ClassFileParser::verify_legal_class_name(...) const { > ... > if (length > 0) { > ... > // read _major_version(60) from dynamically generated class bytes, > // compare with updated CONSTANT_CLASS_DESCRIPTORS(61) > else if (_major_version >= CONSTANT_CLASS_DESCRIPTORS && bytes[length - 1] == ';' ) { > // EXPECTED HERE > legal = verify_unqualified_name(bytes + 1, length - 2, LegalClass); > } else { > // GO TO HERE > legal = verify_unqualified_name(bytes, length, LegalClass); > } > } > if (!legal) { > ResourceMark rm(THREAD); > assert(_class_name != NULL, "invariant"); > Exceptions::fthrow( > THREAD_AND_LOCATION, > vmSymbols::java_lang_ClassFormatError(), > "Illegal class name "%.*s" in class file %s", length, bytes, > _class_name->as_C_string() > ); > return; > } > } > JDK-826101 suspects that JDK-8261021[2] has the same problem since their exception messages are relatively similar. But according to their stack traces, they might be caused by different but related problems. > > [0] https://bugs.openjdk.java.net/browse/JDK-8261019 > [1] https://github.com/openjdk/valhalla/pull/316 > [2] https://bugs.openjdk.java.net/browse/JDK-8261021 This pull request has now been integrated. Changeset: 4768ea20 Author: Yang Yi Committer: Harold Seigel URL: https://git.openjdk.java.net/valhalla/commit/4768ea20 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine;" in class file $Proxy5" Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/320 From github.com+5010047+kelthuzadx at openjdk.java.net Fri Feb 5 23:48:55 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Fri, 5 Feb 2021 23:48:55 GMT Subject: [lworld] RFR: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 15:13:01 GMT, David Simms wrote: >> Hi all, >> >> Can I have a review of this trivial fix? >> >> The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. >> >> Thanks, >> Yang Yi > > Looks good, thanks for the find Thank you all for your review? @MrSimms @RogerRiggs @mlchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/321 From github.com+5010047+kelthuzadx at openjdk.java.net Mon Feb 8 08:35:55 2021 From: github.com+5010047+kelthuzadx at openjdk.java.net (Yang Yi) Date: Mon, 8 Feb 2021 08:35:55 GMT Subject: [lworld] Integrated: 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer; " In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 03:24:10 GMT, Yang Yi wrote: > Hi all, > > Can I have a review of this trivial fix? > > The root cause of this problem is similar to PR #320. As explained before, in short, the major version of the dynamically generated bytecode does not match the version required by ClassFileParser::verify_legal_class_name, resulting in a ClassFormatError. > > Thanks, > Yang Yi This pull request has now been integrated. Changeset: b2c84c74 Author: Yang Yi Committer: David Simms URL: https://git.openjdk.java.net/valhalla/commit/b2c84c74 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer;" Reviewed-by: dsimms, rriggs, mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/321 From sadayapalam at openjdk.java.net Mon Feb 8 12:37:40 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 8 Feb 2021 12:37:40 GMT Subject: Integrated: 8260870: [type-restrictions] Generate RestrictedMethod attributes Message-ID: Support for generation of RestrictedMethod attribute both via command line option and type annotations. ------------- Commit messages: - 8260870: [type-restrictions] Generate RestrictedMethod attributes Changes: https://git.openjdk.java.net/valhalla/pull/325/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=325&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8260870 Stats: 504 lines in 14 files changed: 502 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/325.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/325/head:pull/325 PR: https://git.openjdk.java.net/valhalla/pull/325 From sadayapalam at openjdk.java.net Mon Feb 8 12:37:41 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 8 Feb 2021 12:37:41 GMT Subject: Integrated: 8260870: [type-restrictions] Generate RestrictedMethod attributes In-Reply-To: References: Message-ID: On Mon, 8 Feb 2021 12:30:45 GMT, Srikanth Adayapalam wrote: > Support for generation of RestrictedMethod attribute both via command line option and type annotations. This pull request has now been integrated. Changeset: d7af04e6 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/d7af04e6 Stats: 504 lines in 14 files changed: 502 ins; 0 del; 2 mod 8260870: [type-restrictions] Generate RestrictedMethod attributes ------------- PR: https://git.openjdk.java.net/valhalla/pull/325 From dsimms at openjdk.java.net Mon Feb 8 16:13:29 2021 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 8 Feb 2021 16:13:29 GMT Subject: RFR: Merge lworld Message-ID: <6jrMay0kq9W8fSMbKvjTYrL_tlkjibLLXi9BLa2fN_Y=.9a91636f-e177-46fd-a2ad-46420678cf09@github.com> Merge lworld at jdk-17+8 ------------- Commit messages: - Merge lworld - 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer;" - 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine;" in class file $Proxy5" - 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile - 8260606: Update Valhalla core-libs naming for methods related to primitive classes - 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 - 8261037: [lworld] Assert during C2 compilation due to inconsistent JVMState at safepoint - Merge jdk - 8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N" - 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m - ... and 983 more: https://git.openjdk.java.net/valhalla/compare/d7af04e6...81297001 The webrevs contain the adjustments done while merging with regards to each parent branch: - type-restrictions: https://webrevs.openjdk.java.net/?repo=valhalla&pr=326&range=00.0 - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=326&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/326/files Stats: 208176 lines in 4372 files changed: 101136 ins; 64664 del; 42376 mod Patch: https://git.openjdk.java.net/valhalla/pull/326.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/326/head:pull/326 PR: https://git.openjdk.java.net/valhalla/pull/326 From dsimms at openjdk.java.net Mon Feb 8 16:32:51 2021 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 8 Feb 2021 16:32:51 GMT Subject: Integrated: Merge lworld In-Reply-To: <6jrMay0kq9W8fSMbKvjTYrL_tlkjibLLXi9BLa2fN_Y=.9a91636f-e177-46fd-a2ad-46420678cf09@github.com> References: <6jrMay0kq9W8fSMbKvjTYrL_tlkjibLLXi9BLa2fN_Y=.9a91636f-e177-46fd-a2ad-46420678cf09@github.com> Message-ID: On Mon, 8 Feb 2021 15:35:18 GMT, David Simms wrote: > Merge lworld at jdk-17+8 This pull request has now been integrated. Changeset: 5f6ef0f4 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/5f6ef0f4 Stats: 208176 lines in 4372 files changed: 101136 ins; 64664 del; 42376 mod Merge lworld Merge lworld at jdk-17+8 ------------- PR: https://git.openjdk.java.net/valhalla/pull/326 From dsimms at openjdk.java.net Tue Feb 9 10:37:47 2021 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 9 Feb 2021 10:37:47 GMT Subject: [lworld] RFR: 8241894: [lworld] crash in ZGC running InlineOops.java#id3 Message-ID: Remove raw oop load from CollectOops::do_oop() ------------- Commit messages: - 8241894: [lworld] crash in ZGC running InlineOops.java#id3 Changes: https://git.openjdk.java.net/valhalla/pull/327/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=327&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8241894 Stats: 33 lines in 2 files changed: 2 ins; 7 del; 24 mod Patch: https://git.openjdk.java.net/valhalla/pull/327.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/327/head:pull/327 PR: https://git.openjdk.java.net/valhalla/pull/327 From sadayapalam at openjdk.java.net Tue Feb 9 11:47:22 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 9 Feb 2021 11:47:22 GMT Subject: [lworld] Integrated: 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` Message-ID: Compiler changes to accept primitive as the modifier in class declaration plus test changes across components necessitated by said change. ------------- Commit messages: - Fix white space problems - Fix white space problems - 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` Changes: https://git.openjdk.java.net/valhalla/pull/328/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=328&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261393 Stats: 678 lines in 275 files changed: 40 ins; 41 del; 597 mod Patch: https://git.openjdk.java.net/valhalla/pull/328.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/328/head:pull/328 PR: https://git.openjdk.java.net/valhalla/pull/328 From sadayapalam at openjdk.java.net Tue Feb 9 11:47:25 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 9 Feb 2021 11:47:25 GMT Subject: [lworld] Integrated: 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` In-Reply-To: References: Message-ID: On Tue, 9 Feb 2021 11:35:41 GMT, Srikanth Adayapalam wrote: > Compiler changes to accept primitive as the modifier in class declaration plus test changes across components necessitated by said change. This pull request has now been integrated. Changeset: 693282f3 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/693282f3 Stats: 678 lines in 275 files changed: 40 ins; 41 del; 597 mod 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` ------------- PR: https://git.openjdk.java.net/valhalla/pull/328 From srikanth.adayapalam at oracle.com Tue Feb 9 12:02:09 2021 From: srikanth.adayapalam at oracle.com (Srikanth Adayapalam) Date: Tue, 9 Feb 2021 12:02:09 +0000 Subject: [lworld] Integrated: 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` In-Reply-To: References: , Message-ID: Hello! Please take note of this push. It is not inline class anymore, but primitive class as in primitive class Point implements Shape { private double x; private double y; public Point(double x, double y) { this.x = x; this.y = y; } public double x() { return x; } public double y() { return y; } public Point translate(double dx, double dy) { return new Point(x+dx, y+dy); } public boolean contains(Point p) { return equals(p); } } I have adjusted all the tests across components. This change merely adjusts the declaration sites. It is likely that comments in source and tests, APIs internal and external, identifiers, documentation, various experimental command line options etc still refer to inline classes. Respective component owners should follow up. Javac messages are not adjusted yet and will refer to inline types. I will follow up. Srikanth ________________________________ From: valhalla-dev on behalf of Srikanth Adayapalam Sent: 09 February 2021 17:17 To: valhalla-dev at openjdk.java.net Subject: [lworld] Integrated: 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` On Tue, 9 Feb 2021 11:35:41 GMT, Srikanth Adayapalam wrote: > Compiler changes to accept primitive as the modifier in class declaration plus test changes across components necessitated by said change. This pull request has now been integrated. Changeset: 693282f3 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/693282f3 Stats: 678 lines in 275 files changed: 40 ins; 41 del; 597 mod 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` ------------- PR: https://git.openjdk.java.net/valhalla/pull/328 From dsimms at openjdk.java.net Tue Feb 9 13:34:05 2021 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 9 Feb 2021 13:34:05 GMT Subject: [lworld] RFR: 8261439: [lworld] update use of 'inline class' to 'primitive class' in java/lang/invoke and com/sun/jdi/ tests Message-ID: Update 'inline' to 'primitive' ------------- Commit messages: - Indentation with tabs - 8261439: [lworld] update use of 'inline class' to 'primitive class' in java/lang/invoke and com/sun/jdi/ tests Changes: https://git.openjdk.java.net/valhalla/pull/329/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=329&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261439 Stats: 62 lines in 6 files changed: 6 ins; 6 del; 50 mod Patch: https://git.openjdk.java.net/valhalla/pull/329.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/329/head:pull/329 PR: https://git.openjdk.java.net/valhalla/pull/329 From dsimms at openjdk.java.net Tue Feb 9 13:55:32 2021 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 9 Feb 2021 13:55:32 GMT Subject: git: openjdk/valhalla: lworld: 8261439: [lworld] update use of "inline class" to "primitive class" in java/lang/invoke and com/sun/jdi/ tests Message-ID: Changeset: 3d47537a Author: David Simms Date: 2021-02-09 13:55:09 +0000 URL: https://git.openjdk.java.net/valhalla/commit/3d47537a 8261439: [lworld] update use of "inline class" to "primitive class" in java/lang/invoke and com/sun/jdi/ tests ! test/hotspot/jtreg/runtime/cds/appcds/test-classes/HelloInlineClassApp.java ! test/hotspot/jtreg/runtime/cds/appcds/test-classes/Point.java ! test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectMonitorUsage/objmonusage007.java ! test/jdk/com/sun/jdi/JdbInlineTypesTest.java ! test/jdk/java/lang/invoke/VarHandles/Point.java ! test/jdk/java/lang/invoke/VarHandles/Value.java From dsimms at openjdk.java.net Tue Feb 9 13:57:47 2021 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 9 Feb 2021 13:57:47 GMT Subject: [lworld] Integrated: 8261439: [lworld] update use of "inline class" to "primitive class" in java/lang/invoke and com/sun/jdi/ tests In-Reply-To: References: Message-ID: <3c9NfdAQzthzm4-3Z_KFjdWaBOcE-6EB30QnNiJV2MA=.9a1acad4-2ed8-40b7-ae65-45bd14e8f16d@github.com> On Tue, 9 Feb 2021 13:30:11 GMT, David Simms wrote: > Update 'inline' to 'primitive' This pull request has now been integrated. Changeset: 3d47537a Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/3d47537a Stats: 62 lines in 6 files changed: 6 ins; 6 del; 50 mod 8261439: [lworld] update use of "inline class" to "primitive class" in java/lang/invoke and com/sun/jdi/ tests ------------- PR: https://git.openjdk.java.net/valhalla/pull/329 From fparain at openjdk.java.net Tue Feb 9 15:06:56 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 9 Feb 2021 15:06:56 GMT Subject: [lworld] RFR: 8241894: [lworld] crash in ZGC running InlineOops.java#id3 In-Reply-To: References: Message-ID: <76zQXm32PSgmYtoMcurvWZJv8KcFpqiYOciGEX1nd7k=.a9626817-dcfb-4270-a1b0-22b46a36b058@github.com> On Tue, 9 Feb 2021 10:34:12 GMT, David Simms wrote: > Remove raw oop load from CollectOops::do_oop() Looks good to me. Thank you for fixing this long standing issue. Fred ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.java.net/valhalla/pull/327 From dsimms at openjdk.java.net Tue Feb 9 15:06:57 2021 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 9 Feb 2021 15:06:57 GMT Subject: [lworld] Integrated: 8241894: [lworld] crash in ZGC running InlineOops.java#id3 In-Reply-To: References: Message-ID: On Tue, 9 Feb 2021 10:34:12 GMT, David Simms wrote: > Remove raw oop load from CollectOops::do_oop() This pull request has now been integrated. Changeset: 84c3e324 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/84c3e324 Stats: 33 lines in 2 files changed: 2 ins; 7 del; 24 mod 8241894: [lworld] crash in ZGC running InlineOops.java#id3 Reviewed-by: fparain ------------- PR: https://git.openjdk.java.net/valhalla/pull/327 From dsimms at openjdk.java.net Thu Feb 11 20:15:28 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 11 Feb 2021 20:15:28 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-17+9' into lworld_merge_jdk_17_9 ------------- Commit messages: - Logical merge compile fixes - Merge tag 'jdk-17+9' into lworld_merge_jdk_17_9 - 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings - 6211242: AreaAveragingScaleFilter(int, int): IAE is not specified - 6211257: BasicStroke.createStrokedShape(Shape): NPE is not specified - 8261472: BasicConstraintsExtension::toString shows "PathLen:2147483647" if there is no pathLenConstraint - 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources - 8259656: fixpath.sh changes broke _NT_SYMBOL_PATH in RunTests.gmk - 8225081: Remove Telia Company CA certificate expiring in April 2021 - 8261209: isStandalone property: remove dependency on pretty-print - ... and 91 more: https://git.openjdk.java.net/valhalla/compare/84c3e324...c17673a8 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=330&range=00.0 - jdk: https://webrevs.openjdk.java.net/?repo=valhalla&pr=330&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/330/files Stats: 21441 lines in 680 files changed: 13674 ins; 5372 del; 2395 mod Patch: https://git.openjdk.java.net/valhalla/pull/330.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/330/head:pull/330 PR: https://git.openjdk.java.net/valhalla/pull/330 From dsimms at openjdk.java.net Thu Feb 11 21:05:32 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 11 Feb 2021 21:05:32 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Merge tag 'jdk-17+9' into lworld_merge_jdk_17_9 David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 1093 commits: - Logical merge compile fixes - Merge tag 'jdk-17+9' into lworld_merge_jdk_17_9 Added tag jdk-17+9 for changeset ad54d8dd # Conflicts: # src/hotspot/share/runtime/jniHandles.cpp # src/hotspot/share/runtime/reflection.cpp # test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java - 8241894: [lworld] crash in ZGC running InlineOops.java#id3 Reviewed-by: fparain - 8261439: [lworld] update use of "inline class" to "primitive class" in java/lang/invoke and com/sun/jdi/ tests - 8261393: [lworld] Adopt `primitive' as the modifier in declaration of identity free classes in lieu of `inline` - 8261021: [lworld] valhalla/valuetypes/LambdaConversion.java fails Illegal class name "QLambdaConversion$Pointer;" Reviewed-by: dsimms, rriggs, mchung - 8261019: [lworld] valhalla/valuetypes/QTypeDescriptorTest.java "Illegal class name "QLine;" in class file $Proxy5" Reviewed-by: mchung - 8261264: [lworld] runtime/valhalla/inlinetypes tests fail to compile Reviewed-by: rriggs - 8260606: Update Valhalla core-libs naming for methods related to primitive classes Reviewed-by: mchung - 8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 - ... and 1083 more: https://git.openjdk.java.net/valhalla/compare/ad54d8dd...c17673a8 ------------- Changes: https://git.openjdk.java.net/valhalla/pull/330/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=330&range=01 Stats: 144143 lines in 1307 files changed: 137514 ins; 2040 del; 4589 mod Patch: https://git.openjdk.java.net/valhalla/pull/330.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/330/head:pull/330 PR: https://git.openjdk.java.net/valhalla/pull/330 From dsimms at openjdk.java.net Thu Feb 11 21:05:34 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 11 Feb 2021 21:05:34 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: <0CTSaIy1U-bxn8JSlv2doYwalrEBw9qTIDJmsVYvGEY=.0cb107f2-3ced-4f74-8366-609e30e9e45b@github.com> On Thu, 11 Feb 2021 20:09:48 GMT, David Simms wrote: > Merge tag 'jdk-17+9' into lworld_merge_jdk_17_9 This pull request has now been integrated. Changeset: ac814eac Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/ac814eac Stats: 21441 lines in 680 files changed: 13674 ins; 5372 del; 2395 mod Merge jdk Merge tag 'jdk-17+9' ------------- PR: https://git.openjdk.java.net/valhalla/pull/330 From thartmann at openjdk.java.net Fri Feb 12 08:49:58 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 08:49:58 GMT Subject: [lworld] RFR: 8261631: [lworld] Fatal error in C1 compiled code due to unexpected klass Message-ID: An assertion in C1 compiled profiling code triggers because the actual (exact) klass of a field is not as expected. The problem should have been solved by [JDK-8260225](https://bugs.openjdk.java.net/browse/JDK-8260225) but was only partially fixed due to a typo (`!=` vs. `==`). I've also noticed that we are profiling inline types for null, which should be avoided. Best regards, Tobias ------------- Commit messages: - 8261631: [lworld] Fatal error in C1 compiled code due to unexpected klass Changes: https://git.openjdk.java.net/valhalla/pull/331/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=331&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261631 Stats: 11 lines in 3 files changed: 10 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/331.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/331/head:pull/331 PR: https://git.openjdk.java.net/valhalla/pull/331 From thartmann at openjdk.java.net Fri Feb 12 09:16:08 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 09:16:08 GMT Subject: [lworld] RFR: 8261633: [lworld] TestLWorld::test10 fails IR verification Message-ID: IR verification fails because there is an unexpected inline type allocation in the code. This is a test bug. The root cause is a missing `@ForceInline` annotation that makes sure the `test10_helper` method is always inlined such that the allocation can be avoided. Best regards, Tobias ------------- Commit messages: - 8261633: [lworld] TestLWorld::test10 fails IR verification Changes: https://git.openjdk.java.net/valhalla/pull/332/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=332&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261633 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/332.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/332/head:pull/332 PR: https://git.openjdk.java.net/valhalla/pull/332 From thartmann at openjdk.java.net Fri Feb 12 09:23:49 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 09:23:49 GMT Subject: [lworld] Integrated: 8261633: [lworld] TestLWorld::test10 fails IR verification In-Reply-To: References: Message-ID: On Fri, 12 Feb 2021 09:12:00 GMT, Tobias Hartmann wrote: > IR verification fails because there is an unexpected inline type allocation in the code. This is a test bug. The root cause is a missing `@ForceInline` annotation that makes sure the `test10_helper` method is always inlined such that the allocation can be avoided. > > Best regards, > Tobias This pull request has now been integrated. Changeset: f1d50a1a Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/f1d50a1a Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8261633: [lworld] TestLWorld::test10 fails IR verification ------------- PR: https://git.openjdk.java.net/valhalla/pull/332 From thartmann at openjdk.java.net Fri Feb 12 10:20:57 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 10:20:57 GMT Subject: [lworld] Integrated: 8261631: [lworld] Fatal error in C1 compiled code due to unexpected klass In-Reply-To: References: Message-ID: On Fri, 12 Feb 2021 08:46:17 GMT, Tobias Hartmann wrote: > An assertion in C1 compiled profiling code triggers because the actual (exact) klass of a field is not as expected. The problem should have been solved by [JDK-8260225](https://bugs.openjdk.java.net/browse/JDK-8260225) but was only partially fixed due to a typo (`!=` vs. `==`). I've also noticed that we are profiling inline types for null, which should be avoided. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 4d953ffa Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/4d953ffa Stats: 11 lines in 3 files changed: 10 ins; 0 del; 1 mod 8261631: [lworld] Fatal error in C1 compiled code due to unexpected klass ------------- PR: https://git.openjdk.java.net/valhalla/pull/331 From thartmann at openjdk.java.net Fri Feb 12 10:38:00 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 10:38:00 GMT Subject: [lworld] RFR: 8261156: [lworld] Re-enable C1 testing after mainline issues are fixed Message-ID: Explicitly set `TieredStopAtLevel=4` in `TestLWorldProfiling` to avoid hitting mainline bug [JDK-8261225](https://bugs.openjdk.java.net/browse/JDK-8261225) and allow re-enabling C1 testing in the CI. I've also removed an unused flag from the framework. Best regards, Tobias ------------- Commit messages: - Workaround - 8261156: [lworld] Re-enable C1 testing after mainline issues are fixed Changes: https://git.openjdk.java.net/valhalla/pull/333/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=333&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261156 Stats: 13 lines in 2 files changed: 3 ins; 8 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/333.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/333/head:pull/333 PR: https://git.openjdk.java.net/valhalla/pull/333 From thartmann at openjdk.java.net Fri Feb 12 12:14:55 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 12 Feb 2021 12:14:55 GMT Subject: [lworld] Integrated: 8261156: [lworld] Re-enable C1 testing after mainline issues are fixed In-Reply-To: References: Message-ID: On Fri, 12 Feb 2021 10:33:13 GMT, Tobias Hartmann wrote: > Explicitly set `TieredStopAtLevel=4` in `TestLWorldProfiling` to avoid hitting mainline bug [JDK-8261225](https://bugs.openjdk.java.net/browse/JDK-8261225) and allow re-enabling C1 testing in the CI. I've also removed an unused flag from the framework. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 9e577c0e Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/9e577c0e Stats: 13 lines in 2 files changed: 3 ins; 8 del; 2 mod 8261156: [lworld] Re-enable C1 testing after mainline issues are fixed ------------- PR: https://git.openjdk.java.net/valhalla/pull/333 From sadayapalam at openjdk.java.net Mon Feb 15 07:40:29 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 15 Feb 2021 07:40:29 GMT Subject: [lworld] Integrated: 8261721: [lworld] Javac messages still refer to inline types Message-ID: Fix message keys and text; adjust sources and tests accordingly. ------------- Commit messages: - 8261721: [lworld] Javac messages still refer to inline types Changes: https://git.openjdk.java.net/valhalla/pull/334/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=334&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261721 Stats: 135 lines in 27 files changed: 10 ins; 10 del; 115 mod Patch: https://git.openjdk.java.net/valhalla/pull/334.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/334/head:pull/334 PR: https://git.openjdk.java.net/valhalla/pull/334 From sadayapalam at openjdk.java.net Mon Feb 15 07:40:30 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 15 Feb 2021 07:40:30 GMT Subject: [lworld] Integrated: 8261721: [lworld] Javac messages still refer to inline types In-Reply-To: References: Message-ID: On Mon, 15 Feb 2021 07:33:09 GMT, Srikanth Adayapalam wrote: > Fix message keys and text; adjust sources and tests accordingly. This pull request has now been integrated. Changeset: dad7d191 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/dad7d191 Stats: 135 lines in 27 files changed: 10 ins; 10 del; 115 mod 8261721: [lworld] Javac messages still refer to inline types ------------- PR: https://git.openjdk.java.net/valhalla/pull/334 From thartmann at openjdk.java.net Mon Feb 15 12:13:14 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 15 Feb 2021 12:13:14 GMT Subject: [lworld] RFR: 8261647: [lworld] Missing default initialization of non-flattened field of empty inline type Message-ID: After [JDK-8253893](https://bugs.openjdk.java.net/browse/JDK-8253893) has been fixed, I've re-enabled some compiler tests for empty inline types and noticed that they are failing. The problem is that both during slow path array access through `OptoRuntime::load_unknown_inline()` and when re-allocating during deoptimization, non-flattened fields of an empty inline type are not properly initialized with the default value. Best regards, Tobias ------------- Commit messages: - 8261647: [lworld] Missing default initialization of non-flattened field of empty inline type Changes: https://git.openjdk.java.net/valhalla/pull/335/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=335&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261647 Stats: 65 lines in 4 files changed: 24 ins; 28 del; 13 mod Patch: https://git.openjdk.java.net/valhalla/pull/335.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/335/head:pull/335 PR: https://git.openjdk.java.net/valhalla/pull/335 From thartmann at openjdk.java.net Mon Feb 15 12:26:48 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 15 Feb 2021 12:26:48 GMT Subject: [lworld] Integrated: 8261647: [lworld] Missing default initialization of non-flattened field of empty inline type In-Reply-To: References: Message-ID: On Mon, 15 Feb 2021 12:09:21 GMT, Tobias Hartmann wrote: > After [JDK-8253893](https://bugs.openjdk.java.net/browse/JDK-8253893) has been fixed, I've re-enabled some compiler tests for empty inline types and noticed that they are failing. The problem is that both during slow path array access through `OptoRuntime::load_unknown_inline()` and when re-allocating during deoptimization, non-flattened fields of an empty inline type are not properly initialized with the default value. > > Best regards, > Tobias This pull request has now been integrated. Changeset: d4ce0d4e Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/d4ce0d4e Stats: 65 lines in 4 files changed: 24 ins; 28 del; 13 mod 8261647: [lworld] Missing default initialization of non-flattened field of empty inline type ------------- PR: https://git.openjdk.java.net/valhalla/pull/335 From sadayapalam at openjdk.java.net Mon Feb 15 14:10:07 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 15 Feb 2021 14:10:07 GMT Subject: [lworld] Integrated: 8261751: [lworld] Fix lingering references to inline/value types Message-ID: Adopt new nomenclature from Primitive Objects JEP ------------- Commit messages: - 8261751: [lworld] Fix lingering references to inline/value types Changes: https://git.openjdk.java.net/valhalla/pull/336/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=336&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261751 Stats: 158 lines in 36 files changed: 0 ins; 0 del; 158 mod Patch: https://git.openjdk.java.net/valhalla/pull/336.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/336/head:pull/336 PR: https://git.openjdk.java.net/valhalla/pull/336 From sadayapalam at openjdk.java.net Mon Feb 15 14:10:07 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 15 Feb 2021 14:10:07 GMT Subject: [lworld] Integrated: 8261751: [lworld] Fix lingering references to inline/value types In-Reply-To: References: Message-ID: On Mon, 15 Feb 2021 14:05:01 GMT, Srikanth Adayapalam wrote: > Adopt new nomenclature from Primitive Objects JEP This pull request has now been integrated. Changeset: 9a601e0d Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/9a601e0d Stats: 158 lines in 36 files changed: 0 ins; 0 del; 158 mod 8261751: [lworld] Fix lingering references to inline/value types ------------- PR: https://git.openjdk.java.net/valhalla/pull/336 From thartmann at openjdk.java.net Tue Feb 16 10:34:21 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 16 Feb 2021 10:34:21 GMT Subject: [lworld] RFR: 8255045: [lworld] LoadNode::Value() use of markWord::prototype() may strip type bits Message-ID: `LoadNode::Value` detects mark word loads and replaces them by `markWord::prototype()` which would strip inline/flat/null-free property bits. We need to use the prototype header from the klass. When writing tests, I've found an independent problem (due to a typo) in `Parse::do_monitor_enter()`. Best regards, Tobias ------------- Commit messages: - 8255045: [lworld] LoadNode::Value() use of markWord::prototype() may strip type bits Changes: https://git.openjdk.java.net/valhalla/pull/337/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=337&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255045 Stats: 100 lines in 6 files changed: 96 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/337.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/337/head:pull/337 PR: https://git.openjdk.java.net/valhalla/pull/337 From thartmann at openjdk.java.net Tue Feb 16 11:55:00 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 16 Feb 2021 11:55:00 GMT Subject: [lworld] Integrated: 8255045: [lworld] LoadNode::Value() use of markWord::prototype() may strip type bits In-Reply-To: References: Message-ID: On Tue, 16 Feb 2021 10:29:29 GMT, Tobias Hartmann wrote: > `LoadNode::Value` detects mark word loads and replaces them by `markWord::prototype()` which would strip inline/flat/null-free property bits. We need to use the prototype header from the klass. When writing tests, I've found an independent problem (due to a typo) in `Parse::do_monitor_enter()`. > > Best regards, > Tobias This pull request has now been integrated. Changeset: b9d9ca46 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/b9d9ca46 Stats: 100 lines in 6 files changed: 96 ins; 0 del; 4 mod 8255045: [lworld] LoadNode::Value() use of markWord::prototype() may strip type bits ------------- PR: https://git.openjdk.java.net/valhalla/pull/337 From rriggs at openjdk.java.net Tue Feb 16 16:49:04 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 16 Feb 2021 16:49:04 GMT Subject: [lworld] RFR: 8261830: [lworld] [test] ArchiveRelocationTest compilation failure Message-ID: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> Restore a missed merge to fix a compilation failure in ArchiveRelationTest.java. ------------- Commit messages: - 8261830: [lworld] [test] ArchiveRelocationTest compilation failure Changes: https://git.openjdk.java.net/valhalla/pull/338/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=338&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261830 Stats: 8 lines in 1 file changed: 0 ins; 2 del; 6 mod Patch: https://git.openjdk.java.net/valhalla/pull/338.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/338/head:pull/338 PR: https://git.openjdk.java.net/valhalla/pull/338 From iklam at openjdk.java.net Tue Feb 16 17:14:45 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 16 Feb 2021 17:14:45 GMT Subject: [lworld] RFR: 8261830: [lworld] [test] ArchiveRelocationTest compilation failure In-Reply-To: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> References: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> Message-ID: On Tue, 16 Feb 2021 16:44:45 GMT, Roger Riggs wrote: > Restore a missed merge to fix a compilation failure in ArchiveRelationTest.java. LGTM ------------- Marked as reviewed by iklam (Committer). PR: https://git.openjdk.java.net/valhalla/pull/338 From rriggs at openjdk.java.net Tue Feb 16 17:23:18 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 16 Feb 2021 17:23:18 GMT Subject: [lworld] RFR: 8261830: [lworld] [test] ArchiveRelocationTest compilation failure [v2] In-Reply-To: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> References: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> Message-ID: > Restore a missed merge to fix a compilation failure in ArchiveRelationTest.java. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Removed unnecessary check in HelloDyanmicInlineClass ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/338/files - new: https://git.openjdk.java.net/valhalla/pull/338/files/582e4e2a..47a28c70 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=338&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=338&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/338.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/338/head:pull/338 PR: https://git.openjdk.java.net/valhalla/pull/338 From iklam at openjdk.java.net Tue Feb 16 17:26:58 2021 From: iklam at openjdk.java.net (Ioi Lam) Date: Tue, 16 Feb 2021 17:26:58 GMT Subject: [lworld] RFR: 8261830: [lworld] [test] ArchiveRelocationTest compilation failure [v2] In-Reply-To: References: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> Message-ID: On Tue, 16 Feb 2021 17:23:18 GMT, Roger Riggs wrote: >> Restore a missed merge to fix a compilation failure in ArchiveRelationTest.java. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Removed unnecessary check in HelloDyanmicInlineClass LGTM ------------- Marked as reviewed by iklam (Committer). PR: https://git.openjdk.java.net/valhalla/pull/338 From rriggs at openjdk.java.net Tue Feb 16 17:32:51 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 16 Feb 2021 17:32:51 GMT Subject: [lworld] Integrated: 8261830: [lworld] [test] ArchiveRelocationTest compilation failure In-Reply-To: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> References: <8eQgVPZZysZnZQS_pYTLkSigEfQRm1iFQKTT06IMVfE=.16887a25-a29a-4ac0-a25e-05713f6eb492@github.com> Message-ID: On Tue, 16 Feb 2021 16:44:45 GMT, Roger Riggs wrote: > Restore a missed merge to fix a compilation failure in ArchiveRelationTest.java. This pull request has now been integrated. Changeset: 3899e114 Author: Roger Riggs URL: https://git.openjdk.java.net/valhalla/commit/3899e114 Stats: 10 lines in 2 files changed: 0 ins; 3 del; 7 mod 8261830: [lworld] [test] ArchiveRelocationTest compilation failure Reviewed-by: iklam ------------- PR: https://git.openjdk.java.net/valhalla/pull/338 From nlisker at gmail.com Tue Feb 16 20:48:38 2021 From: nlisker at gmail.com (Nir Lisker) Date: Tue, 16 Feb 2021 22:48:38 +0200 Subject: Primitive values and void Message-ID: Hi, After reading the JEPs about primitive objects (.ref and .val) and the conversion of primitives, I was wondering what happens with void and Void. They are not interchangeable like primitives - a method returning void must have 'return;` while a method returning Void must 'return null;' - but they are the same semantically. Since Void mainly (only?) exists for generic types purposes, will void be valid as a generic type and make Void more or less useless? Will they have reference-value conversions like primitives, if that makes sense? - Nir From brian.goetz at oracle.com Tue Feb 16 21:15:40 2021 From: brian.goetz at oracle.com (Brian Goetz) Date: Tue, 16 Feb 2021 16:15:40 -0500 Subject: Primitive values and void In-Reply-To: References: Message-ID: It's an open question, but one we want to address.? Adjusting the language to understand that `void` and `Void` are related is not hard, allowing us to ignore the need to return a value. Turning `void` into a proper (unit) type is harder, but ultimately valuable; if you look at the explosion of functional interfaces we added in 8, one contributor was all the primitive specializations (IntPredicate could be Predicate which in turn could be Function), but another was the fact that `void` is not a type (Consumer could be Function).? Valhalla will surely collapse the first (hurrah), but it would be a shame not to collapse the second as well. There's a certain amount of accidental complexity that will have to be compounded to get there; for example, there are "statement lambdas" and "expression lambdas" but if void is a type, then a statement lambda could also be an expression lambda returning void.? I doubt any of these are blockers, but there's a certain amount of un-fun grinding here to clear out the underbrush. On 2/16/2021 3:48 PM, Nir Lisker wrote: > Hi, > > After reading the JEPs about primitive objects (.ref and .val) and the > conversion of primitives, I was wondering what happens with void and Void. > They are not interchangeable like primitives - a method returning void must > have 'return;` while a method returning Void must 'return null;' - but they > are the same semantically. Since Void mainly (only?) exists for generic > types purposes, will void be valid as a generic type and make Void more or > less useless? Will they have reference-value conversions like primitives, > if that makes sense? > > - Nir From nlisker at gmail.com Wed Feb 17 02:08:00 2021 From: nlisker at gmail.com (Nir Lisker) Date: Wed, 17 Feb 2021 04:08:00 +0200 Subject: Primitive values and void In-Reply-To: References: Message-ID: > > There's a certain amount of accidental complexity that will have to be > compounded to get there; for example, there are "statement lambdas" and > "expression lambdas" but if void is a type, then a statement lambda could > also be an expression lambda returning void. I doubt any of these are > blockers, but there's a certain amount of un-fun grinding here to clear out > the underbrush. This made me think of cases of the so-called "ternary expression" that doesn't work with `void`: boolean b = i == 3 ? boolean1() : boolean2(); ??? = i ==3 ? void1() : void2(); where the methods return `boolean` and `void`. While I understand that the point is assignment, and that assigning to `void` is meaningless, we can still assign to technically `Void`. Probably, the only reason to deal with this is if we accept the "ternary expression" as a full shortcut to if-else, and not only to if-else assignments. This is probably too far off the mark though. On Tue, Feb 16, 2021 at 11:15 PM Brian Goetz wrote: > It's an open question, but one we want to address. Adjusting the language > to understand that `void` and `Void` are related is not hard, allowing us > to ignore the need to return a value. > > Turning `void` into a proper (unit) type is harder, but ultimately > valuable; if you look at the explosion of functional interfaces we added in > 8, one contributor was all the primitive specializations (IntPredicate > could be Predicate which in turn could be Function), but > another was the fact that `void` is not a type (Consumer could be > Function). Valhalla will surely collapse the first (hurrah), but > it would be a shame not to collapse the second as well. > > There's a certain amount of accidental complexity that will have to be > compounded to get there; for example, there are "statement lambdas" and > "expression lambdas" but if void is a type, then a statement lambda could > also be an expression lambda returning void. I doubt any of these are > blockers, but there's a certain amount of un-fun grinding here to clear out > the underbrush. > > > > On 2/16/2021 3:48 PM, Nir Lisker wrote: > > Hi, > > After reading the JEPs about primitive objects (.ref and .val) and the > conversion of primitives, I was wondering what happens with void and Void. > They are not interchangeable like primitives - a method returning void must > have 'return;` while a method returning Void must 'return null;' - but they > are the same semantically. Since Void mainly (only?) exists for generic > types purposes, will void be valid as a generic type and make Void more or > less useless? Will they have reference-value conversions like primitives, > if that makes sense? > > - Nir > > > From brian.goetz at oracle.com Wed Feb 17 16:59:44 2021 From: brian.goetz at oracle.com (Brian Goetz) Date: Wed, 17 Feb 2021 11:59:44 -0500 Subject: [External] : Re: Primitive values and void In-Reply-To: References: Message-ID: On 2/16/2021 9:08 PM, Nir Lisker wrote: > > There's a certain amount of accidental complexity that will have > to be compounded to get there; for example, there are "statement > lambdas" and "expression lambdas" but if void is a type, then a > statement lambda could also be an expression lambda returning > void.? I doubt any of these are blockers, but there's a certain > amount of un-fun grinding here to clear out the underbrush. > > > This made me think of cases of the so-called "ternary expression" that > doesn't work with `void`: > > boolean b = i == 3 ? boolean1() : boolean2(); > ??? = i ==3 ? void1() : void2(); Indeed, this is the sort of accidental complexity that would have to either deal with `void` as a new type, or be adjusted to explicitly disallow void expressions in either of the arms.? None of this is likely to be impossible, just tedious. > where the methods return?`boolean` and `void`. While I understand that > the point is assignment, and that assigning to `void` is meaningless, > we can still assign to technically `Void`. Probably, the only reason > to deal with this is if we accept the "ternary expression" as a full > shortcut?to if-else, and not only to if-else assignments. This is > probably too far off the mark though. I think the logical way to look at this is to let the construct define how it handles void or not, and then treat Void as the box for void, just as we treat Integer as the box for int.? (Boxing conversions will get adjusted as part of Valhalla, but the concept will still be around.) From dsimms at openjdk.java.net Thu Feb 18 08:25:27 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 08:25:27 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-17+10' # Conflicts: # src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp # src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp # src/hotspot/share/memory/archiveBuilder.cpp # src/hotspot/share/oops/instanceKlass.hpp # src/hotspot/share/oops/typeArrayKlass.hpp # src/hotspot/share/runtime/sharedRuntime.cpp # test/hotspot/jtreg/ProblemList.txt ------------- Commit messages: - Merge tag 'jdk-17+10' into lworld_merge_jdk_17_10 - 8261711: Clhsdb "versioncheck true" throws NPE every time - 8261607: SA attach is exceeding JNI Local Refs capacity - 8241372: Several test failures due to javax.net.ssl.SSLException: Connection reset - 8260415: Remove unused class ReferenceProcessorMTProcMutator - 8248223: KeyAgreement spec update on multi-party key exchange support - 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 - 8261336: IGV: enhance default filters - 8261501: Shenandoah: reconsider heap statistics memory ordering - 8259668: Make SubTasksDone use-once - ... and 69 more: https://git.openjdk.java.net/valhalla/compare/3899e114...d2da4e1f The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=339&range=00.0 - jdk: https://webrevs.openjdk.java.net/?repo=valhalla&pr=339&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/339/files Stats: 9363 lines in 376 files changed: 4632 ins; 2645 del; 2086 mod Patch: https://git.openjdk.java.net/valhalla/pull/339.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/339/head:pull/339 PR: https://git.openjdk.java.net/valhalla/pull/339 From dsimms at openjdk.java.net Thu Feb 18 09:52:35 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 09:52:35 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Merge tag 'jdk-17+10' > # Conflicts: > # src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp > # src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp > # src/hotspot/share/memory/archiveBuilder.cpp > # src/hotspot/share/oops/instanceKlass.hpp > # src/hotspot/share/oops/typeArrayKlass.hpp > # src/hotspot/share/runtime/sharedRuntime.cpp > # test/hotspot/jtreg/ProblemList.txt David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 1101 commits: - Merge tag 'jdk-17+10' into lworld_merge_jdk_17_10 Added tag jdk-17+10 for changeset e7e20d4e # Conflicts: # src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp # src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp # src/hotspot/share/memory/archiveBuilder.cpp # src/hotspot/share/oops/instanceKlass.hpp # src/hotspot/share/oops/typeArrayKlass.hpp # src/hotspot/share/runtime/sharedRuntime.cpp # test/hotspot/jtreg/ProblemList.txt - 8261830: [lworld] [test] ArchiveRelocationTest compilation failure Reviewed-by: iklam - 8255045: [lworld] LoadNode::Value() use of markWord::prototype() may strip type bits - 8261751: [lworld] Fix lingering references to inline/value types - 8261647: [lworld] Missing default initialization of non-flattened field of empty inline type - 8261721: [lworld] Javac messages still refer to inline types - 8261156: [lworld] Re-enable C1 testing after mainline issues are fixed - 8261631: [lworld] Fatal error in C1 compiled code due to unexpected klass - 8261633: [lworld] TestLWorld::test10 fails IR verification - Merge jdk Merge tag 'jdk-17+9' - ... and 1091 more: https://git.openjdk.java.net/valhalla/compare/e7e20d4e...d2da4e1f ------------- Changes: https://git.openjdk.java.net/valhalla/pull/339/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=339&range=01 Stats: 144237 lines in 1307 files changed: 137613 ins; 2042 del; 4582 mod Patch: https://git.openjdk.java.net/valhalla/pull/339.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/339/head:pull/339 PR: https://git.openjdk.java.net/valhalla/pull/339 From dsimms at openjdk.java.net Thu Feb 18 09:52:37 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 09:52:37 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 08:20:33 GMT, David Simms wrote: > Merge tag 'jdk-17+10' > # Conflicts: > # src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp > # src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp > # src/hotspot/share/memory/archiveBuilder.cpp > # src/hotspot/share/oops/instanceKlass.hpp > # src/hotspot/share/oops/typeArrayKlass.hpp > # src/hotspot/share/runtime/sharedRuntime.cpp > # test/hotspot/jtreg/ProblemList.txt This pull request has now been integrated. Changeset: e31335fa Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/e31335fa Stats: 9363 lines in 376 files changed: 4632 ins; 2645 del; 2086 mod Merge jdk Merge tag 'jdk-17+10' ------------- PR: https://git.openjdk.java.net/valhalla/pull/339 From dsimms at openjdk.java.net Thu Feb 18 11:30:21 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 11:30:21 GMT Subject: RFR: Merge lworld Message-ID: Merge 'jdk-17+10' ------------- Commit messages: - More inline to primitive keyword changes - inline to primitive keyword changes - Merge branch 'lworld' into type-restrictions_merge_lworld_17_10 - Merge jdk - 8261711: Clhsdb "versioncheck true" throws NPE every time - 8261607: SA attach is exceeding JNI Local Refs capacity - 8241372: Several test failures due to javax.net.ssl.SSLException: Connection reset - 8260415: Remove unused class ReferenceProcessorMTProcMutator - 8248223: KeyAgreement spec update on multi-party key exchange support - 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 - ... and 183 more: https://git.openjdk.java.net/valhalla/compare/5f6ef0f4...ccfcad5d The webrevs contain the adjustments done while merging with regards to each parent branch: - type-restrictions: https://webrevs.openjdk.java.net/?repo=valhalla&pr=340&range=00.0 - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=340&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/340/files Stats: 33321 lines in 1324 files changed: 19153 ins; 8776 del; 5392 mod Patch: https://git.openjdk.java.net/valhalla/pull/340.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/340/head:pull/340 PR: https://git.openjdk.java.net/valhalla/pull/340 From dsimms at openjdk.java.net Thu Feb 18 12:14:22 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 12:14:22 GMT Subject: Integrated: Merge lworld In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 11:24:11 GMT, David Simms wrote: > Merge 'jdk-17+10' This pull request has now been integrated. Changeset: 803ebc43 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/803ebc43 Stats: 33321 lines in 1324 files changed: 19153 ins; 8776 del; 5392 mod Merge lworld Merge 'jdk-17+10' ------------- PR: https://git.openjdk.java.net/valhalla/pull/340 From dsimms at openjdk.java.net Thu Feb 18 12:14:18 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 12:14:18 GMT Subject: RFR: Merge lworld [v2] In-Reply-To: References: Message-ID: > Merge 'jdk-17+10' David Simms has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: - More inline to primitive keyword changes - inline to primitive keyword changes - Merge branch 'lworld' into type-restrictions_merge_lworld_17_10 # Conflicts: # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java - Merge lworld Merge lworld at jdk-17+8 - 8260870: [type-restrictions] Generate RestrictedMethod attributes - 8257600: [type-restrictions] Implement RestrictedField in C1 Reviewed-by: lfoltan, thartmann - Merge lworld Merge tag 'jdk-16+26' - 8257028: [type-restrictions] Assorted issues with generation of RestrictedField attributes from annotations - 8255856: Generate RestrictedField attributes from annotations - Merge lworld Merge jdk-16+25 - ... and 10 more: https://git.openjdk.java.net/valhalla/compare/e31335fa...ccfcad5d ------------- Changes: https://git.openjdk.java.net/valhalla/pull/340/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=340&range=01 Stats: 1919 lines in 56 files changed: 1851 ins; 11 del; 57 mod Patch: https://git.openjdk.java.net/valhalla/pull/340.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/340/head:pull/340 PR: https://git.openjdk.java.net/valhalla/pull/340 From fparain at openjdk.java.net Thu Feb 18 14:31:09 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Thu, 18 Feb 2021 14:31:09 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter Message-ID: Please review these changes adding support for RestrictedMethod in the interpreter. Types restrictions are enforced in the following bytecodes: - invokevirtual - invokestatic - invokespecial - invokeinterface The changeset also includes a small fix to prevent previous type restrictions related tests to fail. Thank you, Fred ------------- Commit messages: - Add test for restricted method, fix other tests - Fix type restriction check on return value - Code simplification and add invokeinterface support - Simple type restriction support for invokevirtual/invokestatic Changes: https://git.openjdk.java.net/valhalla/pull/341/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=341&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261956 Stats: 474 lines in 14 files changed: 451 ins; 1 del; 22 mod Patch: https://git.openjdk.java.net/valhalla/pull/341.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/341/head:pull/341 PR: https://git.openjdk.java.net/valhalla/pull/341 From thartmann at openjdk.java.net Thu Feb 18 15:19:05 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Thu, 18 Feb 2021 15:19:05 GMT Subject: [lworld] RFR: 8261874: [lworld] Non-flattened array blocks scalarization of inline type Message-ID: We hit an assert because an inline type is not scalarized in the debug info of a safepoint. The problem is that the inline type is stored in a non-flattened array which blocks scalarization. Once the non-flattened array is scalarized itself, the inline type could be scalarized as well but we don't keep track of its field values long enough (we remove the `InlineTypePtrNode` before macro expansion). The solution is to keep `InlineTypePtrNodes` until after macro expansion. I've also converted scalarization in safepoints into an ideal transformation, refactored related code and added the corresponding IR verification tests. Best regards, Tobias ------------- Commit messages: - 8261874: [lworld] Non-flattened array blocks scalarization of inline type Changes: https://git.openjdk.java.net/valhalla/pull/342/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=342&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261874 Stats: 176 lines in 7 files changed: 127 ins; 25 del; 24 mod Patch: https://git.openjdk.java.net/valhalla/pull/342.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/342/head:pull/342 PR: https://git.openjdk.java.net/valhalla/pull/342 From dsimms at openjdk.java.net Thu Feb 18 17:13:48 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 18 Feb 2021 17:13:48 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 14:26:29 GMT, Frederic Parain wrote: > Please review these changes adding support for RestrictedMethod in the interpreter. > Types restrictions are enforced in the following bytecodes: > - invokevirtual > - invokestatic > - invokespecial > - invokeinterface > > The changeset also includes a small fix to prevent previous type restrictions related tests to fail. > > Thank you, > > Fred Looks good ------------- Marked as reviewed by dsimms (Committer). PR: https://git.openjdk.java.net/valhalla/pull/341 From hseigel at openjdk.java.net Thu Feb 18 20:02:02 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Thu, 18 Feb 2021 20:02:02 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter In-Reply-To: References: Message-ID: <0ZgfAoR6lQtb0IJma3pN00iRUjYG8hImySpfnD8SNH8=.684a568f-a6d4-4323-a939-bd6f73e5c0ea@github.com> On Thu, 18 Feb 2021 14:26:29 GMT, Frederic Parain wrote: > Please review these changes adding support for RestrictedMethod in the interpreter. > Types restrictions are enforced in the following bytecodes: > - invokevirtual > - invokestatic > - invokespecial > - invokeinterface > > The changeset also includes a small fix to prevent previous type restrictions related tests to fail. > > Thank you, > > Fred Hi Fred, Maybe move the classFileParser.cpp code, that checks for the restricted_method attribute, inside of an "if (_major_version >= JAVA_17_VERSION)" conditional? Thanks, Harold ------------- PR: https://git.openjdk.java.net/valhalla/pull/341 From fparain at openjdk.java.net Thu Feb 18 22:13:28 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Thu, 18 Feb 2021 22:13:28 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter [v2] In-Reply-To: References: Message-ID: > Please review these changes adding support for RestrictedMethod in the interpreter. > Types restrictions are enforced in the following bytecodes: > - invokevirtual > - invokestatic > - invokespecial > - invokeinterface > > The changeset also includes a small fix to prevent previous type restrictions related tests to fail. > > Thank you, > > Fred Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: Check class file version for RestrictedMethod attribute ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/341/files - new: https://git.openjdk.java.net/valhalla/pull/341/files/6b0face9..912eee2c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=341&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=341&range=00-01 Stats: 28 lines in 1 file changed: 16 ins; 12 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/341.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/341/head:pull/341 PR: https://git.openjdk.java.net/valhalla/pull/341 From fparain at openjdk.java.net Thu Feb 18 22:13:30 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Thu, 18 Feb 2021 22:13:30 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter [v2] In-Reply-To: <0ZgfAoR6lQtb0IJma3pN00iRUjYG8hImySpfnD8SNH8=.684a568f-a6d4-4323-a939-bd6f73e5c0ea@github.com> References: <0ZgfAoR6lQtb0IJma3pN00iRUjYG8hImySpfnD8SNH8=.684a568f-a6d4-4323-a939-bd6f73e5c0ea@github.com> Message-ID: On Thu, 18 Feb 2021 19:58:58 GMT, Harold Seigel wrote: >> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: >> >> Check class file version for RestrictedMethod attribute > > Hi Fred, > Maybe move the classFileParser.cpp code, that checks for the restricted_method attribute, inside of an "if (_major_version >= JAVA_17_VERSION)" conditional? > > Thanks, Harold Harold, Following your suggestion, a class file version check has been added for the RestrictedMethod attribute. Fred ------------- PR: https://git.openjdk.java.net/valhalla/pull/341 From thartmann at openjdk.java.net Fri Feb 19 08:29:06 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 19 Feb 2021 08:29:06 GMT Subject: [lworld] Integrated: 8261874: [lworld] Non-flattened array blocks scalarization of inline type In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 15:14:26 GMT, Tobias Hartmann wrote: > We hit an assert because an inline type is not scalarized in the debug info of a safepoint. The problem is that the inline type is stored in a non-flattened array which blocks scalarization. Once the non-flattened array is scalarized itself, the inline type could be scalarized as well but we don't keep track of its field values long enough (we remove the `InlineTypePtrNode` before macro expansion). The solution is to keep `InlineTypePtrNodes` until after macro expansion. I've also converted scalarization in safepoints into an ideal transformation, refactored related code and added the corresponding IR verification tests. > > Best regards, > Tobias This pull request has now been integrated. Changeset: e88ff83c Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/e88ff83c Stats: 176 lines in 7 files changed: 127 ins; 25 del; 24 mod 8261874: [lworld] Non-flattened array blocks scalarization of inline type ------------- PR: https://git.openjdk.java.net/valhalla/pull/342 From thartmann at openjdk.java.net Fri Feb 19 13:02:26 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 19 Feb 2021 13:02:26 GMT Subject: [lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type Message-ID: I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that. Best regards, Tobias ------------- Commit messages: - 8262025: [lworld] C2 should optimize acmp of the same inline type Changes: https://git.openjdk.java.net/valhalla/pull/343/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=343&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262025 Stats: 72 lines in 2 files changed: 72 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/343.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/343/head:pull/343 PR: https://git.openjdk.java.net/valhalla/pull/343 From thartmann at openjdk.java.net Fri Feb 19 14:11:08 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 19 Feb 2021 14:11:08 GMT Subject: [lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type [v2] In-Reply-To: References: Message-ID: > I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that. > > Best regards, > Tobias Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: Fixed test bug ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/343/files - new: https://git.openjdk.java.net/valhalla/pull/343/files/6b9dc63d..e0ccb503 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=343&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=343&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/343.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/343/head:pull/343 PR: https://git.openjdk.java.net/valhalla/pull/343 From thartmann at openjdk.java.net Fri Feb 19 14:13:16 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 19 Feb 2021 14:13:16 GMT Subject: [lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type In-Reply-To: References: Message-ID: On Fri, 19 Feb 2021 12:57:21 GMT, Tobias Hartmann wrote: > I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that. > > Best regards, > Tobias I've noticed that with the fix, the `Ifacmp.java` test started to time out due to an endless loop in the `testAlot` method. It seems that this is due to C2 now being able to fully remove the loop (because it can prove that `a == b`) and therefore also the safepoint that would trigger a GC. I've added a call to `System.gc`. @MrSimms does that seem reasonable to you? ------------- PR: https://git.openjdk.java.net/valhalla/pull/343 From sadayapalam at openjdk.java.net Mon Feb 22 06:46:33 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 22 Feb 2021 06:46:33 GMT Subject: [lworld] Integrated: 8261782: [lworld] Add support for PrimitiveObject interface Message-ID: - Compiler support for PrimitiveObject top type ------------- Commit messages: - 8261782: [lworld] Add support for PrimitiveObject interface Changes: https://git.openjdk.java.net/valhalla/pull/344/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=344&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261782 Stats: 162 lines in 8 files changed: 150 ins; 1 del; 11 mod Patch: https://git.openjdk.java.net/valhalla/pull/344.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/344/head:pull/344 PR: https://git.openjdk.java.net/valhalla/pull/344 From sadayapalam at openjdk.java.net Mon Feb 22 06:46:36 2021 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 22 Feb 2021 06:46:36 GMT Subject: [lworld] Integrated: 8261782: [lworld] Add support for PrimitiveObject interface In-Reply-To: References: Message-ID: On Mon, 22 Feb 2021 06:39:48 GMT, Srikanth Adayapalam wrote: > - Compiler support for PrimitiveObject top type This pull request has now been integrated. Changeset: f421b939 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/f421b939 Stats: 162 lines in 8 files changed: 150 ins; 1 del; 11 mod 8261782: [lworld] Add support for PrimitiveObject interface ------------- PR: https://git.openjdk.java.net/valhalla/pull/344 From dsimms at openjdk.java.net Mon Feb 22 09:25:00 2021 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 22 Feb 2021 09:25:00 GMT Subject: [lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type [v2] In-Reply-To: References: Message-ID: On Fri, 19 Feb 2021 14:11:08 GMT, Tobias Hartmann wrote: >> I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that. >> >> Best regards, >> Tobias > > Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: > > Fixed test bug Runtime bits look good. ------------- Marked as reviewed by dsimms (Committer). PR: https://git.openjdk.java.net/valhalla/pull/343 From thartmann at openjdk.java.net Mon Feb 22 09:29:01 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 09:29:01 GMT Subject: [lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type [v2] In-Reply-To: References: Message-ID: <5deiSgXkU8kYzM2zuvQSOh76F5vD36E75zj2X8b2PaY=.d39f93c6-34d9-420d-8925-af6c90bb7816@github.com> On Mon, 22 Feb 2021 09:22:08 GMT, David Simms wrote: >> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed test bug > > Runtime bits look good. Thanks for the review! ------------- PR: https://git.openjdk.java.net/valhalla/pull/343 From thartmann at openjdk.java.net Mon Feb 22 09:29:02 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 09:29:02 GMT Subject: [lworld] Integrated: 8262025: [lworld] C2 should optimize acmp of the same inline type In-Reply-To: References: Message-ID: On Fri, 19 Feb 2021 12:57:21 GMT, Tobias Hartmann wrote: > I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 11cda281 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/11cda281 Stats: 73 lines in 3 files changed: 73 ins; 0 del; 0 mod 8262025: [lworld] C2 should optimize acmp of the same inline type Reviewed-by: dsimms ------------- PR: https://git.openjdk.java.net/valhalla/pull/343 From thartmann at openjdk.java.net Mon Feb 22 14:11:24 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 14:11:24 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses Message-ID: C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. Best regards, Tobias ------------- Commit messages: - 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses Changes: https://git.openjdk.java.net/valhalla/pull/345/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=345&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262128 Stats: 44 lines in 4 files changed: 35 ins; 2 del; 7 mod Patch: https://git.openjdk.java.net/valhalla/pull/345.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/345/head:pull/345 PR: https://git.openjdk.java.net/valhalla/pull/345 From thartmann at openjdk.java.net Mon Feb 22 15:04:16 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 15:04:16 GMT Subject: [lworld] RFR: 8262129: [lworld] C2 compilation fails with assert 'can not use dead node' Message-ID: We hit an assert with `-XX:++VerifyIterativeGVN` because the hook nodes created by `PhaseMacroExpand::expand_mh_intrinsic_return` are dead. Similar to the mainline fix for [https://bugs.openjdk.java.net/browse/JDK-8238756](JDK-8238756), we have to add an input to these nodes. Best regards, Tobias ------------- Commit messages: - 8262129: [lworld] C2 compilation fails with assert 'can not use dead node' Changes: https://git.openjdk.java.net/valhalla/pull/346/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=346&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262129 Stats: 9 lines in 1 file changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/valhalla/pull/346.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/346/head:pull/346 PR: https://git.openjdk.java.net/valhalla/pull/346 From thartmann at openjdk.java.net Mon Feb 22 15:09:00 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 15:09:00 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses In-Reply-To: <3V0_UgdjCYm5UKM4t49sdXBxzQRDhmkRSlYFbb_1Sfk=.fe3df927-2a8d-492e-8486-89babc955fec@github.com> References: <3V0_UgdjCYm5UKM4t49sdXBxzQRDhmkRSlYFbb_1Sfk=.fe3df927-2a8d-492e-8486-89babc955fec@github.com> Message-ID: <0xdFqSKW5tNe6PbPnsdDYRKVxnH1xMIegTbSd37V-OU=.7bc68071-dbac-42ca-8e13-3ef2f69d46dc@github.com> On Mon, 22 Feb 2021 15:03:53 GMT, Frederic Parain wrote: >> C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. >> >> Best regards, >> Tobias > > Hi Tobias, > > Thank you for fixing this. > However, the fix seems to have an issue. The hash_inline_access() method encapsulates the additional offset from the delayed access into a hash value, this encapsulation prevents the is_equal(Value v) method (from the the HASHING macro) to see all individual arguments of the hash function and could cause the method return an incorrect result. > > Fred Hi Fred, thanks for looking at this, you are right. Best regards, Tobias ------------- PR: https://git.openjdk.java.net/valhalla/pull/345 From fparain at openjdk.java.net Mon Feb 22 15:08:59 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Mon, 22 Feb 2021 15:08:59 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses In-Reply-To: References: Message-ID: <3V0_UgdjCYm5UKM4t49sdXBxzQRDhmkRSlYFbb_1Sfk=.fe3df927-2a8d-492e-8486-89babc955fec@github.com> On Mon, 22 Feb 2021 14:06:35 GMT, Tobias Hartmann wrote: > C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. > > Best regards, > Tobias Hi Tobias, Thank you for fixing this. However, the fix seems to have an issue. The hash_inline_access() method encapsulates the additional offset from the delayed access into a hash value, this encapsulation prevents the is_equal(Value v) method (from the the HASHING macro) to see all individual arguments of the hash function and could cause the method return an incorrect result. Fred ------------- PR: https://git.openjdk.java.net/valhalla/pull/345 From thartmann at openjdk.java.net Mon Feb 22 15:41:12 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 15:41:12 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses [v2] In-Reply-To: References: Message-ID: <2U7hpJsiRl7ghdFwPEMu31yRPCb0vjS5rUYdJvRTKSQ=.87444a50-f547-455f-8a05-30f81e626ce0@github.com> > C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. > > Best regards, > Tobias Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: Disable ValueNumbering for now ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/345/files - new: https://git.openjdk.java.net/valhalla/pull/345/files/3363401b..f17af09f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=345&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=345&range=00-01 Stats: 11 lines in 2 files changed: 0 ins; 10 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/345.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/345/head:pull/345 PR: https://git.openjdk.java.net/valhalla/pull/345 From thartmann at openjdk.java.net Mon Feb 22 15:41:12 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 22 Feb 2021 15:41:12 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses In-Reply-To: <0xdFqSKW5tNe6PbPnsdDYRKVxnH1xMIegTbSd37V-OU=.7bc68071-dbac-42ca-8e13-3ef2f69d46dc@github.com> References: <3V0_UgdjCYm5UKM4t49sdXBxzQRDhmkRSlYFbb_1Sfk=.fe3df927-2a8d-492e-8486-89babc955fec@github.com> <0xdFqSKW5tNe6PbPnsdDYRKVxnH1xMIegTbSd37V-OU=.7bc68071-dbac-42ca-8e13-3ef2f69d46dc@github.com> Message-ID: On Mon, 22 Feb 2021 15:05:43 GMT, Tobias Hartmann wrote: >> Hi Tobias, >> >> Thank you for fixing this. >> However, the fix seems to have an issue. The hash_inline_access() method encapsulates the additional offset from the delayed access into a hash value, this encapsulation prevents the is_equal(Value v) method (from the the HASHING macro) to see all individual arguments of the hash function and could cause the method return an incorrect result. >> >> Fred > > Hi Fred, > > thanks for looking at this, you are right. > > Best regards, > Tobias As we've discussed offline, I've disabled ValueNumbering for delayed accesses for now and filed [https://bugs.openjdk.java.net/browse/JDK-8262136](JDK-8262136]) to re-enable it later. ------------- PR: https://git.openjdk.java.net/valhalla/pull/345 From fparain at openjdk.java.net Mon Feb 22 16:07:08 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Mon, 22 Feb 2021 16:07:08 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses [v2] In-Reply-To: <2U7hpJsiRl7ghdFwPEMu31yRPCb0vjS5rUYdJvRTKSQ=.87444a50-f547-455f-8a05-30f81e626ce0@github.com> References: <2U7hpJsiRl7ghdFwPEMu31yRPCb0vjS5rUYdJvRTKSQ=.87444a50-f547-455f-8a05-30f81e626ce0@github.com> Message-ID: On Mon, 22 Feb 2021 15:41:12 GMT, Tobias Hartmann wrote: >> C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. >> >> Best regards, >> Tobias > > Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: > > Disable ValueNumbering for now Looks good to me. Fred ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.java.net/valhalla/pull/345 From hseigel at openjdk.java.net Mon Feb 22 16:27:56 2021 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 22 Feb 2021 16:27:56 GMT Subject: RFR: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter [v2] In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 22:13:28 GMT, Frederic Parain wrote: >> Please review these changes adding support for RestrictedMethod in the interpreter. >> Types restrictions are enforced in the following bytecodes: >> - invokevirtual >> - invokestatic >> - invokespecial >> - invokeinterface >> >> The changeset also includes a small fix to prevent previous type restrictions related tests to fail. >> >> Thank you, >> >> Fred > > Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: > > Check class file version for RestrictedMethod attribute The classFileParser.cpp change looks good. Thanks for changing it. Harold ------------- Marked as reviewed by hseigel (Committer). PR: https://git.openjdk.java.net/valhalla/pull/341 From fparain at openjdk.java.net Mon Feb 22 16:31:56 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Mon, 22 Feb 2021 16:31:56 GMT Subject: Integrated: 8261956: [type-restrictions] Support RestrictedMethod in the interpreter In-Reply-To: References: Message-ID: On Thu, 18 Feb 2021 14:26:29 GMT, Frederic Parain wrote: > Please review these changes adding support for RestrictedMethod in the interpreter. > Types restrictions are enforced in the following bytecodes: > - invokevirtual > - invokestatic > - invokespecial > - invokeinterface > > The changeset also includes a small fix to prevent previous type restrictions related tests to fail. > > Thank you, > > Fred This pull request has now been integrated. Changeset: 9c991d9b Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/9c991d9b Stats: 502 lines in 14 files changed: 467 ins; 13 del; 22 mod 8261956: [type-restrictions] Support RestrictedMethod in the interpreter Reviewed-by: dsimms, hseigel ------------- PR: https://git.openjdk.java.net/valhalla/pull/341 From thartmann at openjdk.java.net Tue Feb 23 06:58:52 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 06:58:52 GMT Subject: [lworld] RFR: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses [v2] In-Reply-To: References: <2U7hpJsiRl7ghdFwPEMu31yRPCb0vjS5rUYdJvRTKSQ=.87444a50-f547-455f-8a05-30f81e626ce0@github.com> Message-ID: On Mon, 22 Feb 2021 16:04:01 GMT, Frederic Parain wrote: >> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: >> >> Disable ValueNumbering for now > > Looks good to me. > > Fred Thanks, Fred! ------------- PR: https://git.openjdk.java.net/valhalla/pull/345 From thartmann at openjdk.java.net Tue Feb 23 06:58:53 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 06:58:53 GMT Subject: [lworld] Integrated: 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses In-Reply-To: References: Message-ID: <0kXLkn82Sy7AGHeajtzWvDGtd1JBawKmW92SoAVIP2k=.4a41bdf8-fe40-473e-800e-e2e3a6c25110@github.com> On Mon, 22 Feb 2021 14:06:35 GMT, Tobias Hartmann wrote: > C1's ValueNumbering optimization replaces an array+field load `array[0].intArray` by another non-equivalent array+field load `array[0].floatArray` because it does not handle delayed accesses. The hash value of `LoadIndexed` needs to take delayed accesses into account. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 1c9a7a9a Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/1c9a7a9a Stats: 34 lines in 3 files changed: 25 ins; 2 del; 7 mod 8262128: [lworld] C1's ValueNumbering optimization does not correctly handle delayed accesses Reviewed-by: fparain ------------- PR: https://git.openjdk.java.net/valhalla/pull/345 From thartmann at openjdk.java.net Tue Feb 23 07:01:01 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 07:01:01 GMT Subject: [lworld] Integrated: 8262129: [lworld] C2 compilation fails with assert "can not use dead node" In-Reply-To: References: Message-ID: On Mon, 22 Feb 2021 15:00:03 GMT, Tobias Hartmann wrote: > We hit an assert with `-XX:++VerifyIterativeGVN` because the hook nodes created by `PhaseMacroExpand::expand_mh_intrinsic_return` are dead. Similar to the mainline fix for [https://bugs.openjdk.java.net/browse/JDK-8238756](JDK-8238756), we have to add an input to these nodes. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 5ac8ba0f Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/5ac8ba0f Stats: 9 lines in 1 file changed: 2 ins; 0 del; 7 mod 8262129: [lworld] C2 compilation fails with assert "can not use dead node" ------------- PR: https://git.openjdk.java.net/valhalla/pull/346 From fparain at openjdk.java.net Tue Feb 23 13:44:09 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 23 Feb 2021 13:44:09 GMT Subject: Integrated: 8262202: [type-restrictions] RestrictedMethodTest failed to compile Message-ID: Fix syntax in test ------------- Commit messages: - Fix test with new syntax Changes: https://git.openjdk.java.net/valhalla/pull/347/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=347&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262202 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/347.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/347/head:pull/347 PR: https://git.openjdk.java.net/valhalla/pull/347 From fparain at openjdk.java.net Tue Feb 23 13:44:10 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 23 Feb 2021 13:44:10 GMT Subject: Integrated: 8262202: [type-restrictions] RestrictedMethodTest failed to compile In-Reply-To: References: Message-ID: On Tue, 23 Feb 2021 13:37:07 GMT, Frederic Parain wrote: > Fix syntax in test This pull request has now been integrated. Changeset: 75d27907 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/75d27907 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8262202: [type-restrictions] RestrictedMethodTest failed to compile ------------- PR: https://git.openjdk.java.net/valhalla/pull/347 From thartmann at openjdk.java.net Tue Feb 23 17:15:19 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 17:15:19 GMT Subject: [lworld] RFR: 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" Message-ID: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> When running with `-XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`, we hit an assert because the unsafe access intrinsic adds an exception to the `GraphKit` state but then bails out and therefore does not transfer that exception into the `JVMState`. In general, we should only modify the graph once we are sure we won't bail out from intrinsification. I've added an assert that catches this even without any VM flags and fixed all affected intrinsics. Best regards, Tobias ------------- Commit messages: - Simplified assert - 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" Changes: https://git.openjdk.java.net/valhalla/pull/348/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=348&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262231 Stats: 59 lines in 1 file changed: 21 ins; 27 del; 11 mod Patch: https://git.openjdk.java.net/valhalla/pull/348.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/348/head:pull/348 PR: https://git.openjdk.java.net/valhalla/pull/348 From thartmann at openjdk.java.net Tue Feb 23 18:02:28 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 18:02:28 GMT Subject: [lworld] RFR: 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" [v2] In-Reply-To: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> References: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> Message-ID: > When running with `-XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`, we hit an assert because the unsafe access intrinsic adds an exception to the `GraphKit` state but then bails out and therefore does not transfer that exception into the `JVMState`. In general, we should only modify the graph once we are sure we won't bail out from intrinsification. I've added an assert that catches this even without any VM flags and fixed all affected intrinsics. > > Best regards, > Tobias Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: Completely removed assert because it triggers bugs in mainline code ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/348/files - new: https://git.openjdk.java.net/valhalla/pull/348/files/2a0facae..bca88c7a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=348&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=348&range=00-01 Stats: 5 lines in 1 file changed: 1 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/348.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/348/head:pull/348 PR: https://git.openjdk.java.net/valhalla/pull/348 From thartmann at openjdk.java.net Tue Feb 23 18:02:29 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 23 Feb 2021 18:02:29 GMT Subject: [lworld] RFR: 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" In-Reply-To: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> References: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> Message-ID: <-PQ-9T2sWuHJLfeXRhkzG0jFdiJX6EAHrVAea0aXu7g=.7e881783-4458-4f40-8230-cf3e9845a33c@github.com> On Tue, 23 Feb 2021 17:11:05 GMT, Tobias Hartmann wrote: > When running with `-XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`, we hit an assert because the unsafe access intrinsic adds an exception to the `GraphKit` state but then bails out and therefore does not transfer that exception into the `JVMState`. In general, we should only modify the graph once we are sure we won't bail out from intrinsification. I've added an assert that catches this even without any VM flags and fixed all affected intrinsics. > > Best regards, > Tobias I've removed the assert because it triggers issues in mainline code. Will add the assert back into mainline after fixing issues there. ------------- PR: https://git.openjdk.java.net/valhalla/pull/348 From john.r.rose at oracle.com Tue Feb 23 18:20:28 2021 From: john.r.rose at oracle.com (John Rose) Date: Tue, 23 Feb 2021 10:20:28 -0800 Subject: [External] : Re: Primitive values and void In-Reply-To: References: Message-ID: <9B602613-A54D-46BB-A30E-9E88FB16994C@oracle.com> On Feb 17, 2021, at 8:59 AM, Brian Goetz wrote: > On 2/16/2021 9:08 PM, Nir Lisker wrote: >> >> There's a certain amount of accidental complexity that will have >> to be compounded to get there; for example, there are "statement >> lambdas" and "expression lambdas" but if void is a type, then a >> statement lambda could also be an expression lambda returning >> void. I doubt any of these are blockers, but there's a certain >> amount of un-fun grinding here to clear out the underbrush. >> >> >> This made me think of cases of the so-called "ternary expression" that doesn't work with `void`: >> >> boolean b = i == 3 ? boolean1() : boolean2(); >> ??? = i ==3 ? void1() : void2(); > > Indeed, this is the sort of accidental complexity that would have to either deal with `void` as a new type, or be adjusted to explicitly disallow void expressions in either of the arms. None of this is likely to be impossible, just tedious. > >> where the methods return `boolean` and `void`. While I understand that the point is assignment, and that assigning to `void` is meaningless, we can still assign to technically `Void`. Probably, the only reason to deal with this is if we accept the "ternary expression" as a full shortcut to if-else, and not only to if-else assignments. This is probably too far off the mark though. > > I think the logical way to look at this is to let the construct define how it handles void or not, and then treat Void as the box for void, just as we treat Integer as the box for int. (Boxing conversions will get adjusted as part of Valhalla, but the concept will still be around.) If Void were a regular reference-box for a primitive value void, then the range of the type Void contains two values, reference null and the single value of the (unit type) void. But, unlike, other wrappers, there is nothing *other than* the remainder value null in Void. This is an irregularity when trying to make Void be a wrapper for (unit type) void. It?s not a deal-killer, but more annoying un-fun underbrush to cut away. Do we keep the irregularity, or add a second primitive void value? Or we could say (by ad hoc fiat) that (Void)null interconverts to the void value (not otherwise denotable as a reference). That?s the approach that method handle conversions takes (in explicitCastArguments). Just saying? ? John P.S. One more thing: Void also *acts like* a nullable reference-box type for a primitive type with *zero* value points, also known as an ?empty type? or ?impossible type?. That hypothetical primitive type (call it ?Unreached??) denotes: - the return type of a method which must never return normally - parameter type of a method which must never be called - the field type of an class/species which must never be instantiated - a local variable in a declaration which must never complete normally Of course if you adjoin null to that empty type you get a one-point reference type containing only null, just like Void. (I?m *not* saying that Void is a candidate name for ?Unreached?.) From thartmann at openjdk.java.net Wed Feb 24 06:46:03 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Wed, 24 Feb 2021 06:46:03 GMT Subject: [lworld] Integrated: 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" In-Reply-To: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> References: <69_7K0rIYSIJaH0SKg96kRIxR9yU5znOdR9qO_nUQAE=.33ef3822-a598-44f5-871f-73c28ef24497@github.com> Message-ID: On Tue, 23 Feb 2021 17:11:05 GMT, Tobias Hartmann wrote: > When running with `-XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`, we hit an assert because the unsafe access intrinsic adds an exception to the `GraphKit` state but then bails out and therefore does not transfer that exception into the `JVMState`. In general, we should only modify the graph once we are sure we won't bail out from intrinsification. I've added an assert that catches this even without any VM flags and fixed all affected intrinsics. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 1816db37 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/1816db37 Stats: 54 lines in 1 file changed: 18 ins; 26 del; 10 mod 8262231: [lworld] C2 compilation fails with assert "user must call transfer_exceptions_into_jvms" ------------- PR: https://git.openjdk.java.net/valhalla/pull/348 From dsimms at openjdk.java.net Wed Feb 24 15:23:32 2021 From: dsimms at openjdk.java.net (David Simms) Date: Wed, 24 Feb 2021 15:23:32 GMT Subject: [lworld] RFR: 8262104: [lworld] Runtime should automagically have primitive classes implement PrimitiveObject Message-ID: Follows in the footsteps of JDK-8245216: [lworld] The JVM should inject the IdentityObject interface to types which need it Also includes a similar footprint tweak to JDK-8245646: [lworld] LW3 Reduce impact of IdentityObject on metaspace ------------- Commit messages: - 8262104: [lworld] Runtime should automagically have primitive classes implement PrimitiveObject Changes: https://git.openjdk.java.net/valhalla/pull/349/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=349&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262104 Stats: 406 lines in 20 files changed: 382 ins; 10 del; 14 mod Patch: https://git.openjdk.java.net/valhalla/pull/349.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/349/head:pull/349 PR: https://git.openjdk.java.net/valhalla/pull/349 From fparain at openjdk.java.net Wed Feb 24 19:37:56 2021 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 24 Feb 2021 19:37:56 GMT Subject: [lworld] RFR: 8262104: [lworld] Runtime should automagically have primitive classes implement PrimitiveObject In-Reply-To: References: Message-ID: On Wed, 24 Feb 2021 15:18:24 GMT, David Simms wrote: > Follows in the footsteps of JDK-8245216: [lworld] The JVM should inject the IdentityObject interface to types which need it > Also includes a similar footprint tweak to JDK-8245646: [lworld] LW3 Reduce impact of IdentityObject on metaspace Looks good to me. Fred ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.java.net/valhalla/pull/349 From dsimms at openjdk.java.net Thu Feb 25 05:37:55 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 05:37:55 GMT Subject: [lworld] Integrated: 8262104: [lworld] Runtime should automagically have primitive classes implement PrimitiveObject In-Reply-To: References: Message-ID: On Wed, 24 Feb 2021 15:18:24 GMT, David Simms wrote: > Follows in the footsteps of JDK-8245216: [lworld] The JVM should inject the IdentityObject interface to types which need it > Also includes a similar footprint tweak to JDK-8245646: [lworld] LW3 Reduce impact of IdentityObject on metaspace This pull request has now been integrated. Changeset: b5bf7a90 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/b5bf7a90 Stats: 406 lines in 20 files changed: 382 ins; 10 del; 14 mod 8262104: [lworld] Runtime should automagically have primitive classes implement PrimitiveObject Reviewed-by: fparain ------------- PR: https://git.openjdk.java.net/valhalla/pull/349 From dsimms at openjdk.java.net Thu Feb 25 06:49:15 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 06:49:15 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge tag 'jdk-17+11' # Conflicts: # src/hotspot/share/runtime/vmOperations.hpp # src/java.base/share/classes/java/lang/Object.java ------------- Commit messages: - Merge tag 'jdk-17+11' into lworld_merge_jdk_17_11 - 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection - 8262315: missing ';' in generated entities - 8258855: Two tests sun/security/krb5/auto/ReplayCacheTestProc.java and ReplayCacheTestProcWithMD5.java failed on OL8.3 - 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" - 8261920: [AIX] jshell command throws java.io.IOError on non English locales - 8262259: Remove unused variable in MethodLiveness::BasicBlock::compute_gen_kill_single - 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool - 8256438: AArch64: Implement match rules with ROR shift register value - 8262269: javadoc test TestGeneratedClasses.java fails on Windows - ... and 99 more: https://git.openjdk.java.net/valhalla/compare/b5bf7a90...f96697b7 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=350&range=00.0 - jdk: https://webrevs.openjdk.java.net/?repo=valhalla&pr=350&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/350/files Stats: 15675 lines in 391 files changed: 10831 ins; 2560 del; 2284 mod Patch: https://git.openjdk.java.net/valhalla/pull/350.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/350/head:pull/350 PR: https://git.openjdk.java.net/valhalla/pull/350 From dsimms at openjdk.java.net Thu Feb 25 07:20:55 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 07:20:55 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: <-t4PwLw7UVy-3A7_7oqCG7zil2S5-tbmgr6ZhOm6oPY=.84f6503b-080b-4b53-9b98-fc1da7488805@github.com> On Thu, 25 Feb 2021 06:44:31 GMT, David Simms wrote: > Merge tag 'jdk-17+11' > > # Conflicts: > # src/hotspot/share/runtime/vmOperations.hpp > # src/java.base/share/classes/java/lang/Object.java This pull request has now been integrated. Changeset: ab51b601 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/ab51b601 Stats: 15675 lines in 391 files changed: 10831 ins; 2560 del; 2284 mod Merge jdk Merge tag 'jdk-17+11' ------------- PR: https://git.openjdk.java.net/valhalla/pull/350 From thartmann at openjdk.java.net Thu Feb 25 07:36:07 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Thu, 25 Feb 2021 07:36:07 GMT Subject: [lworld] RFR: 8262308: [lworld] Various small C2 fixes for bugs found by stress testing Message-ID: <_PzETwlIuvPzRlBimJJMW5JQaMemHcDhMwVwwGh50cY=.26eec163-07f6-4316-822e-e4ade2da2ad7@github.com> More testing with stress flags enabled revealed the following bugs: - We should not call `remove_dead_node` from `InlineTypeBaseNode::Ideal`. Instead, we should just make sure the dead node is on the IGVN worklist to be removed. I've also removed the `VerifyVM` option from the framework. Such flags can be added manually or via the CI job definitions. - `PhaseMacroExpand::process_users_of_allocation` needs to handle `InlineTypePtrNodes` because we now keep them until after macro expansion. - `GraphKit::type_check_receiver` should create a `InlineTypePtrNode` instead of a `InlineTypeNode` because it operates on pointers. I have a job definition file with all these stress flags enabled that I will integrate separately soon. Best regards, Tobias ------------- Commit messages: - More fixes - 8262308: [lworld] VerifyIterativeGVN fails with "can not use dead node" Changes: https://git.openjdk.java.net/valhalla/pull/351/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=351&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262308 Stats: 21 lines in 4 files changed: 11 ins; 7 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/351.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/351/head:pull/351 PR: https://git.openjdk.java.net/valhalla/pull/351 From dsimms at openjdk.java.net Thu Feb 25 08:23:17 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 08:23:17 GMT Subject: RFR: Merge lworld Message-ID: Merge tag 'jdk-17+11' # Conflicts: # src/hotspot/share/classfile/classFileParser.cpp # src/hotspot/share/classfile/classFileParser.hpp # src/hotspot/share/oops/instanceKlass.hpp # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java ------------- Commit messages: - Merge branch 'lworld' into type-restrictions_merge_lworld_17_11 - Merge jdk - 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection - 8262315: missing ';' in generated entities - 8258855: Two tests sun/security/krb5/auto/ReplayCacheTestProc.java and ReplayCacheTestProcWithMD5.java failed on OL8.3 - 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" - 8261920: [AIX] jshell command throws java.io.IOError on non English locales - 8262259: Remove unused variable in MethodLiveness::BasicBlock::compute_gen_kill_single - 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool - 8256438: AArch64: Implement match rules with ROR shift register value - ... and 107 more: https://git.openjdk.java.net/valhalla/compare/75d27907...94ce3695 The webrevs contain the adjustments done while merging with regards to each parent branch: - type-restrictions: https://webrevs.openjdk.java.net/?repo=valhalla&pr=352&range=00.0 - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=352&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/352/files Stats: 16586 lines in 429 files changed: 11608 ins; 2624 del; 2354 mod Patch: https://git.openjdk.java.net/valhalla/pull/352.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/352/head:pull/352 PR: https://git.openjdk.java.net/valhalla/pull/352 From dsimms at openjdk.java.net Thu Feb 25 09:31:28 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 09:31:28 GMT Subject: RFR: Merge lworld [v2] In-Reply-To: References: Message-ID: > Merge tag 'jdk-17+11' > > # Conflicts: > # src/hotspot/share/classfile/classFileParser.cpp > # src/hotspot/share/classfile/classFileParser.hpp > # src/hotspot/share/oops/instanceKlass.hpp > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.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 21 commits: - Merge branch 'lworld' into type-restrictions_merge_lworld_17_11 # Conflicts: # src/hotspot/share/classfile/classFileParser.cpp # src/hotspot/share/classfile/classFileParser.hpp # src/hotspot/share/oops/instanceKlass.hpp # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java - 8262202: [type-restrictions] RestrictedMethodTest failed to compile - 8261956: [type-restrictions] Support RestrictedMethod in the interpreter Reviewed-by: dsimms, hseigel - Merge lworld Merge 'jdk-17+10' - Merge lworld Merge lworld at jdk-17+8 - 8260870: [type-restrictions] Generate RestrictedMethod attributes - 8257600: [type-restrictions] Implement RestrictedField in C1 Reviewed-by: lfoltan, thartmann - Merge lworld Merge tag 'jdk-16+26' - 8257028: [type-restrictions] Assorted issues with generation of RestrictedField attributes from annotations - 8255856: Generate RestrictedField attributes from annotations - ... and 11 more: https://git.openjdk.java.net/valhalla/compare/ab51b601...94ce3695 ------------- Changes: https://git.openjdk.java.net/valhalla/pull/352/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=352&range=01 Stats: 2395 lines in 62 files changed: 2306 ins; 12 del; 77 mod Patch: https://git.openjdk.java.net/valhalla/pull/352.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/352/head:pull/352 PR: https://git.openjdk.java.net/valhalla/pull/352 From dsimms at openjdk.java.net Thu Feb 25 09:31:29 2021 From: dsimms at openjdk.java.net (David Simms) Date: Thu, 25 Feb 2021 09:31:29 GMT Subject: Integrated: Merge lworld In-Reply-To: References: Message-ID: On Thu, 25 Feb 2021 08:18:14 GMT, David Simms wrote: > Merge tag 'jdk-17+11' > > # Conflicts: > # src/hotspot/share/classfile/classFileParser.cpp > # src/hotspot/share/classfile/classFileParser.hpp > # src/hotspot/share/oops/instanceKlass.hpp > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java This pull request has now been integrated. Changeset: 0a26489c Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/0a26489c Stats: 16586 lines in 429 files changed: 11608 ins; 2624 del; 2354 mod Merge lworld Merge tag 'jdk-17+11' ------------- PR: https://git.openjdk.java.net/valhalla/pull/352 From nick.gasson at arm.com Thu Feb 25 10:03:51 2021 From: nick.gasson at arm.com (Nick Gasson) Date: Thu, 25 Feb 2021 18:03:51 +0800 Subject: Status of AArch64 lworld port In-Reply-To: <1853542c-80f4-db40-97ae-f3b3b74f91d6@oracle.com> References: <85a6sidhyi.fsf@nicgas01-pc.shanghai.arm.com> <1853542c-80f4-db40-97ae-f3b3b74f91d6@oracle.com> Message-ID: <85a6rslb08.fsf@arm.com> On 02/05/21 17:17 pm, Tobias Hartmann wrote: > > yes, the AArch64 port misses significant changes and is currently not tested on our (Oracle) side. > > Dmitriy Samersoff worked on this in the past but I'm not sure what his current plans are. In any > case, contributions are very welcome and I'm happy to answer questions about the JIT related changes. > Hi Tobias, OK I started working on this. I've put my in-progress changes as draft pull request here: https://github.com/openjdk/valhalla/pull/353 It's not ready for review yet but simple test cases are passing. For the time being I'm building without C2 and focusing on getting C1/interpreter to work. I had to make one change/hack to the shared code in LIRGenerator::get_and_load_element_address(): https://github.com/openjdk/valhalla/pull/353/files#diff-cc27fc51caa691478ce875140a75940aea610cb6b3a67976852867b05672e56c The problem is LIR_Address on AArch64 cannot have both an index and a displacement. I thought it should be possible to call LIRGenerator::generate_address() instead of explicitly constructing a new LIR_Address() because generate_address() handles the necessary adjustments in the AArch64-specific code. However that fails with the error below and I haven't worked out why yet. Error: live_in set of first block must be empty (when this fails, virtual registers are used before they are defined) affected registers: 344 353 360 416 440 456 * vreg 344 (HIR instruction 0) used in block B0 ... -- Thanks, Nick From thartmann at openjdk.java.net Thu Feb 25 11:04:56 2021 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Thu, 25 Feb 2021 11:04:56 GMT Subject: [lworld] Integrated: 8262308: [lworld] Various small C2 fixes for bugs found by stress testing In-Reply-To: <_PzETwlIuvPzRlBimJJMW5JQaMemHcDhMwVwwGh50cY=.26eec163-07f6-4316-822e-e4ade2da2ad7@github.com> References: <_PzETwlIuvPzRlBimJJMW5JQaMemHcDhMwVwwGh50cY=.26eec163-07f6-4316-822e-e4ade2da2ad7@github.com> Message-ID: <-1EQ90G8UytrW1o6K2xDzXYVH05GlkUrXwk5DyAjHFQ=.cc2cb8b8-91e7-4909-8f91-43d024016663@github.com> On Thu, 25 Feb 2021 07:31:27 GMT, Tobias Hartmann wrote: > More testing with stress flags enabled revealed the following bugs: > - We should not call `remove_dead_node` from `InlineTypeBaseNode::Ideal`. Instead, we should just make sure the dead node is on the IGVN worklist to be removed. I've also removed the `VerifyVM` option from the framework. Such flags can be added manually or via the CI job definitions. > - `PhaseMacroExpand::process_users_of_allocation` needs to handle `InlineTypePtrNodes` because we now keep them until after macro expansion. > - `GraphKit::type_check_receiver` should create a `InlineTypePtrNode` instead of a `InlineTypeNode` because it operates on pointers. > > I have a job definition file with all these stress flags enabled that I will integrate separately soon. > > Best regards, > Tobias This pull request has now been integrated. Changeset: 0dfcc948 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/0dfcc948 Stats: 21 lines in 4 files changed: 11 ins; 7 del; 3 mod 8262308: [lworld] Various small C2 fixes for bugs found by stress testing ------------- PR: https://git.openjdk.java.net/valhalla/pull/351