From jlahoda at openjdk.org Wed May 1 11:24:20 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 1 May 2024 11:24:20 GMT Subject: RFR: 8331027: JDK's ct.sym file packs corrupted module-info classes Message-ID: When writing the `ModuleMainClass` attribute, `CreateSymbols` uses an UTF8 entry (incorrect), instead of a Class_info (correct). This patch fixes that. ------------- Commit messages: - 8331027: JDK's ct.sym file packs corrupted module-info classes Changes: https://git.openjdk.org/jdk/pull/19031/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19031&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331027 Stats: 240 lines in 4 files changed: 208 ins; 10 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/19031.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19031/head:pull/19031 PR: https://git.openjdk.org/jdk/pull/19031 From syan at openjdk.org Wed May 1 14:46:14 2024 From: syan at openjdk.org (SendaoYan) Date: Wed, 1 May 2024 14:46:14 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: > Hi, > > In doc/testing.md file, it says: > > As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. > > The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 > > $ make -n test-tier1 &> test-tier1.log > $ grep "Running test " test-tier1.log > Running test 'jtreg:test/hotspot/jtreg:tier1' > Running test 'jtreg:test/jdk:tier1' > Running test 'jtreg:test/langtools:tier1' > Running test 'jtreg:test/jaxp:tier1' > Running test 'jtreg:test/lib-test:tier1' > > Only change the document, no risk. SendaoYan has updated the pull request incrementally with one additional commit since the last revision: deliberately making it shorter and ading ... show that this is not am exhaustive list ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19002/files - new: https://git.openjdk.org/jdk/pull/19002/files/154b0de1..b0277b9e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19002&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19002&range=00-01 Stats: 8 lines in 2 files changed: 1 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/19002.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19002/head:pull/19002 PR: https://git.openjdk.org/jdk/pull/19002 From syan at openjdk.org Wed May 1 14:50:52 2024 From: syan at openjdk.org (SendaoYan) Date: Wed, 1 May 2024 14:50:52 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Tue, 30 Apr 2024 06:25:46 GMT, David Holmes wrote: > Perhaps we should rephrase this so it is not an exhaustive list that has to be updated if the test groupings change. Suggestion: > > ``` > As an example, :tier1 will expand to include all subcomponent test directories that define `tier1`, for example: > jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 .... > ``` Thanks for the review and advice. The doc files has been updated by the advice. @erikj79 @dholmes-ora @magicus ------------- PR Comment: https://git.openjdk.org/jdk/pull/19002#issuecomment-2088574021 From syan at openjdk.org Wed May 1 14:50:53 2024 From: syan at openjdk.org (SendaoYan) Date: Wed, 1 May 2024 14:50:53 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:46:14 GMT, SendaoYan wrote: >> Hi, >> >> In doc/testing.md file, it says: >> >> As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. >> >> The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 >> >> $ make -n test-tier1 &> test-tier1.log >> $ grep "Running test " test-tier1.log >> Running test 'jtreg:test/hotspot/jtreg:tier1' >> Running test 'jtreg:test/jdk:tier1' >> Running test 'jtreg:test/langtools:tier1' >> Running test 'jtreg:test/jaxp:tier1' >> Running test 'jtreg:test/lib-test:tier1' >> >> Only change the document, no risk. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > deliberately making it shorter and ading ... show that this is not am exhaustive list The GHA runner shows that ------------- PR Comment: https://git.openjdk.org/jdk/pull/19002#issuecomment-2088575306 From jjg at openjdk.org Wed May 1 20:14:41 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 1 May 2024 20:14:41 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v63] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: address review feedback, to improve testing of changes to Elements ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16388/files - new: https://git.openjdk.org/jdk/pull/16388/files/6576d024..fe94ab8e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=62 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=61-62 Stats: 111 lines in 3 files changed: 87 ins; 14 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From jjg at openjdk.org Wed May 1 20:26:30 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 1 May 2024 20:26:30 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v64] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 88 commits: - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - address review feedback, to improve testing of changes to Elements - update copyright years - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - update commonmark-java from 0.21.0 to 0.22.0 - Remove links to `jdk.javadoc` module from `java.compiler` module` - Suppress warnings building tests - Merge with upstream/master - address review feedback for updates to Elements and friends - address review feedback for updates to Elements and friends - ... and 78 more: https://git.openjdk.org/jdk/compare/0a24daec...e42632a9 ------------- Changes: https://git.openjdk.org/jdk/pull/16388/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=63 Stats: 26434 lines in 242 files changed: 25748 ins; 263 del; 423 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From jjg at openjdk.org Wed May 1 20:43:07 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 1 May 2024 20:43:07 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v56] In-Reply-To: <5BLnTYx2hjFyOvw3_RQWLDcPwvREkTII1AaLhdQUB7I=.84043d72-429a-4b9a-a119-57f45d239950@github.com> References: <5BLnTYx2hjFyOvw3_RQWLDcPwvREkTII1AaLhdQUB7I=.84043d72-429a-4b9a-a119-57f45d239950@github.com> Message-ID: On Fri, 12 Apr 2024 17:39:11 GMT, Joe Darcy wrote: > There should be some quick testing of the new default method on Elements using the VacuousElements implementation; see `test/langtools/tools/javac/processing/model/util/elements` for some examples. @jddarcy I've reorganized the tests in this area a bit, and moved the testing for `DocCommentKind` to a new test, which includes testing the default method, using `VacuousElements` (nice trick, that, by the way.). Although now renamed, the older `TestGetDocComments` is now closer to the original form, with the testing for `getDocCommentKind` being moved to a new test class. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2089096959 From dholmes at openjdk.org Wed May 1 22:23:53 2024 From: dholmes at openjdk.org (David Holmes) Date: Wed, 1 May 2024 22:23:53 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:46:14 GMT, SendaoYan wrote: >> Hi, >> >> In doc/testing.md file, it says: >> >> As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. >> >> The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 >> >> $ make -n test-tier1 &> test-tier1.log >> $ grep "Running test " test-tier1.log >> Running test 'jtreg:test/hotspot/jtreg:tier1' >> Running test 'jtreg:test/jdk:tier1' >> Running test 'jtreg:test/langtools:tier1' >> Running test 'jtreg:test/jaxp:tier1' >> Running test 'jtreg:test/lib-test:tier1' >> >> Only change the document, no risk. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > deliberately making it shorter and ading ... show that this is not am exhaustive list LGTM. Thanks ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19002#pullrequestreview-2034554883 From asotona at openjdk.org Thu May 2 07:05:54 2024 From: asotona at openjdk.org (Adam Sotona) Date: Thu, 2 May 2024 07:05:54 GMT Subject: RFR: 8331027: JDK's ct.sym file packs corrupted module-info classes In-Reply-To: References: Message-ID: On Wed, 1 May 2024 11:18:36 GMT, Jan Lahoda wrote: > When writing the `ModuleMainClass` attribute, `CreateSymbols` uses an UTF8 entry (incorrect), instead of a Class_info (correct). This patch fixes that. Looks good to me. test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java line 1104: > 1102: CreateSymbols.EXTENSION = ".class"; > 1103: > 1104: deleteRecursively(ctSym); Is double deletion needed for some kind of race condition safety? ------------- Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19031#pullrequestreview-2034978645 PR Review Comment: https://git.openjdk.org/jdk/pull/19031#discussion_r1587160139 From jkern at openjdk.org Thu May 2 09:59:01 2024 From: jkern at openjdk.org (Joachim Kern) Date: Thu, 2 May 2024 09:59:01 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX Message-ID: We need to find a better way to handle alloca on AIX. See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: Let me summarize the choices we have and ask for your vote. Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of #if defined(_AIX) #include #endif in globalDefinitions_gcc.hpp. We have four possible solutions 1. Reintroduce #if defined(_AIX) #include #endif in globalDefinitions_gcc.hpp. 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. 3. Add #if defined(_AIX) #include #endif to the sources using alloca(). These are /hotspot/share/runtime/os.cpp /hotspot/share/runtime/javaThread.cpp /hotspot/share/utilities/vmError.cpp Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. I will implement the solution with the most likes and having no dislike. ------------- Commit messages: - JDK-8330539 Changes: https://git.openjdk.org/jdk/pull/19053/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19053&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330539 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19053.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19053/head:pull/19053 PR: https://git.openjdk.org/jdk/pull/19053 From ihse at openjdk.org Thu May 2 11:06:53 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 2 May 2024 11:06:53 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:46:14 GMT, SendaoYan wrote: >> Hi, >> >> In doc/testing.md file, it says: >> >> As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. >> >> The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 >> >> $ make -n test-tier1 &> test-tier1.log >> $ grep "Running test " test-tier1.log >> Running test 'jtreg:test/hotspot/jtreg:tier1' >> Running test 'jtreg:test/jdk:tier1' >> Running test 'jtreg:test/langtools:tier1' >> Running test 'jtreg:test/jaxp:tier1' >> Running test 'jtreg:test/lib-test:tier1' >> >> Only change the document, no risk. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > deliberately making it shorter and ading ... show that this is not am exhaustive list Thanks! ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19002#pullrequestreview-2035444214 From ihse at openjdk.org Thu May 2 11:08:25 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 2 May 2024 11:08:25 GMT Subject: RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v70] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Wed, 3 Apr 2024 02:38:21 GMT, Julian Waters wrote: >> Bumping > >> @TheShermanTanker I tried to help you get this done. I added fixes to a copy of your branch on my personal fork, but then it turned out I could not push them to your branch. :-( >> >> It ended up with me creating a new PR, #18584. As a bonus, I think it might be easier to review with a fresh start. This PR has grown quite heavy with lots of comments and commits. >> >> I hope you don't feel like I'm stealing this away from you. You have done a great job, and shown a lot of patience of carrying this all the way here. But I also got the impression that you would appreciate my assistance in getting the last pieces in place so we can integrate this. > > Not at all, I don't feel like you're stealing this from me. In fact, I should be the one apologising for giving you extra work! Thanks for taking this up, I once again apologise for making you do this instead, I've been very busy since Thursday (working on OpenJDK while in lectures at times), and during my breaks I've been too drained to continue, so i really appreciate your help :) > > I will keep this open until the other Pull Request has been integrated, in case this might still be needed @TheShermanTanker You can close this PR. The bug was fixed with https://github.com/openjdk/jdk/pull/18584 instead. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-2090226777 From erikj at openjdk.org Thu May 2 12:21:55 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 2 May 2024 12:21:55 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:46:14 GMT, SendaoYan wrote: >> Hi, >> >> In doc/testing.md file, it says: >> >> As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. >> >> The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 >> >> $ make -n test-tier1 &> test-tier1.log >> $ grep "Running test " test-tier1.log >> Running test 'jtreg:test/hotspot/jtreg:tier1' >> Running test 'jtreg:test/jdk:tier1' >> Running test 'jtreg:test/langtools:tier1' >> Running test 'jtreg:test/jaxp:tier1' >> Running test 'jtreg:test/lib-test:tier1' >> >> Only change the document, no risk. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > deliberately making it shorter and ading ... show that this is not am exhaustive list Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19002#pullrequestreview-2035587789 From jwaters at openjdk.org Thu May 2 13:38:53 2024 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 2 May 2024 13:38:53 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: <63kULaCivYNoomWQiTEK0n_p4p2K1-Me3b-R9ofBhHM=.34129f5f-3cae-47d7-a709-876b8a0ecdc3@github.com> On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. I'd put alloca.h down below the Standard Headers, next to stuff like pthread.h and dlfcn.h, and have the AIX ifdef check so it's clearer that only AIX needs it, but otherwise no objections Compilation Failures are all unrelated to the actual change itself ------------- Marked as reviewed by jwaters (Committer). PR Review: https://git.openjdk.org/jdk/pull/19053#pullrequestreview-2035766825 PR Comment: https://git.openjdk.org/jdk/pull/19053#issuecomment-2090522085 From mdoerr at openjdk.org Thu May 2 13:48:54 2024 From: mdoerr at openjdk.org (Martin Doerr) Date: Thu, 2 May 2024 13:48:54 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. LGTM. This is my preferred solution. GHA failures are there because this PR is based on the code before https://github.com/openjdk/jdk/commit/286cbf831c2eb76e31bd69b4a93cd5ae9a821493 . ------------- Marked as reviewed by mdoerr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19053#pullrequestreview-2035796660 From jlahoda at openjdk.org Thu May 2 14:24:08 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 2 May 2024 14:24:08 GMT Subject: RFR: 8331027: JDK's ct.sym file packs corrupted module-info classes [v2] In-Reply-To: References: Message-ID: > When writing the `ModuleMainClass` attribute, `CreateSymbols` uses an UTF8 entry (incorrect), instead of a Class_info (correct). This patch fixes that. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Removing unnecessary directory cleanup. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19031/files - new: https://git.openjdk.org/jdk/pull/19031/files/bde7257c..369f0bf0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19031&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19031&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19031.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19031/head:pull/19031 PR: https://git.openjdk.org/jdk/pull/19031 From jlahoda at openjdk.org Thu May 2 14:24:08 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 2 May 2024 14:24:08 GMT Subject: RFR: 8331027: JDK's ct.sym file packs corrupted module-info classes [v2] In-Reply-To: References: Message-ID: <_VcrQuRh1sLyS73fkLR5N29rApinn86gvd-LlC2zB8Q=.a2a9935c-42c5-4920-963f-81ed8732cb60@github.com> On Thu, 2 May 2024 07:03:20 GMT, Adam Sotona wrote: >> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: >> >> Removing unnecessary directory cleanup. > > test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java line 1104: > >> 1102: CreateSymbols.EXTENSION = ".class"; >> 1103: >> 1104: deleteRecursively(ctSym); > > Is double deletion needed for some kind of race condition safety? I don't think this is needed. Thanks for noticing, removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19031#discussion_r1587724055 From mdoerr at openjdk.org Thu May 2 14:30:03 2024 From: mdoerr at openjdk.org (Martin Doerr) Date: Thu, 2 May 2024 14:30:03 GMT Subject: RFR: 8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc [v3] In-Reply-To: <1EgO9Z2UdqtUYN2oNClYl_evpBDw1asCxQRWPk0w_6E=.db209d00-845d-44bc-9ca1-e5c533087638@github.com> References: <-XeYeJ0OEmauTYsEoSXxzRmQXSKMOLw87GSpqDnEmug=.5cb7e71f-fea6-4a84-8260-5f515d3d3810@github.com> <18WjPZeDIWkxGIB0BJgyDg5VipCtY4EOlWmIGPWZGCw=.b50cf4a9-61a4-421e-97eb-3dbac94c14f9@github.com> <_xcaF7UUDHA11loD89Dz871vAQgRqMzCdPkahFDfKv8=.a2c6dcbe-5942-4fb7-9d8b-4239ea048e56@github.com> <76P7uKTuqo7IKYr5yBP4Vx1SS0AcEXC_6vDAU6LfIzo=.d939556f-6fab-4009-820b-821376bfdb7c@github.com> <6aR5nvKhz28A1CkxtaAD9CwTjILBjwZrrRwP3988oEc=.72203104-2ae5-40ff-bd87-168b684446e6@ github.com> <1EgO9Z2UdqtUYN2oNClYl_evpBDw1asCxQRWPk0w_6E=.db209d00-845d-44bc-9ca1-e5c533087638@github.com> Message-ID: On Tue, 30 Apr 2024 16:36:52 GMT, Kim Barrett wrote: >> I will do after labor day and create a PR with this suggested solution in your JDK-8330539. > > I think I still prefer just unconditionally including in globalDefinitions_gcc.hpp. For gcc/clang we are using `-std=c++14` + `-D_GNU_SOURCE` instead of `-std=gnu++14`. I forget exactly why. I don't really want > to be messing with `__STRICT_ANSI__`. https://github.com/openjdk/jdk/pull/19053 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1587736142 From jlahoda at openjdk.org Thu May 2 14:34:59 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 2 May 2024 14:34:59 GMT Subject: Integrated: 8331027: JDK's ct.sym file packs corrupted module-info classes In-Reply-To: References: Message-ID: On Wed, 1 May 2024 11:18:36 GMT, Jan Lahoda wrote: > When writing the `ModuleMainClass` attribute, `CreateSymbols` uses an UTF8 entry (incorrect), instead of a Class_info (correct). This patch fixes that. This pull request has now been integrated. Changeset: 8771015d Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/8771015d7e3c4349ad58b58150a49217b1ffb902 Stats: 238 lines in 4 files changed: 206 ins; 10 del; 22 mod 8331027: JDK's ct.sym file packs corrupted module-info classes Reviewed-by: asotona ------------- PR: https://git.openjdk.org/jdk/pull/19031 From kbarrett at openjdk.org Thu May 2 15:11:53 2024 From: kbarrett at openjdk.org (Kim Barrett) Date: Thu, 2 May 2024 15:11:53 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. Looks good. ------------- Marked as reviewed by kbarrett (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19053#pullrequestreview-2036034561 From ihse at openjdk.org Thu May 2 21:21:57 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 2 May 2024 21:21:57 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. Marked as reviewed by ihse (Reviewer). Looks good to me too. ------------- PR Review: https://git.openjdk.org/jdk/pull/19053#pullrequestreview-2036941518 PR Comment: https://git.openjdk.org/jdk/pull/19053#issuecomment-2091668231 From syan at openjdk.org Thu May 2 21:22:00 2024 From: syan at openjdk.org (SendaoYan) Date: Thu, 2 May 2024 21:22:00 GMT Subject: Integrated: 8331331: :tier1 target explanation in doc/testing.md is incorrect In-Reply-To: References: Message-ID: <5l5H7rzYJpzq4rhVRl63dkIZpu1R-6oZxPVXJsa5n6w=.b04fea6c-61dc-4c0d-9544-3f0885226306@github.com> On Mon, 29 Apr 2024 16:14:45 GMT, SendaoYan wrote: > Hi, > > In doc/testing.md file, it says: > > As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. > > The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 > > $ make -n test-tier1 &> test-tier1.log > $ grep "Running test " test-tier1.log > Running test 'jtreg:test/hotspot/jtreg:tier1' > Running test 'jtreg:test/jdk:tier1' > Running test 'jtreg:test/langtools:tier1' > Running test 'jtreg:test/jaxp:tier1' > Running test 'jtreg:test/lib-test:tier1' > > Only change the document, no risk. This pull request has now been integrated. Changeset: 04271dfe Author: SendaoYan Committer: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/04271dfe7a262379944e2a2cf83a98a3a1b78a74 Stats: 8 lines in 2 files changed: 1 ins; 0 del; 7 mod 8331331: :tier1 target explanation in doc/testing.md is incorrect Reviewed-by: erikj, dholmes, ihse ------------- PR: https://git.openjdk.org/jdk/pull/19002 From jwaters at openjdk.org Fri May 3 00:40:52 2024 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 3 May 2024 00:40:52 GMT Subject: RFR: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. I stand corrected, it seems that MinGW distributions don't have alloca.h in their headers. No worries, the Windows/gcc Port will handle this downstream ------------- PR Comment: https://git.openjdk.org/jdk/pull/19053#issuecomment-2091958780 From jlahoda at openjdk.org Fri May 3 07:21:27 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Fri, 3 May 2024 07:21:27 GMT Subject: RFR: 8327476: Upgrade JLine to 3.25.1 [v5] In-Reply-To: References: Message-ID: > This is a patch that: > a) upgrades the JLine inside the JDK to 3.25.1 > b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend > > Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: > - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 > - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily > > There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: > https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal > the patch is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff > > I've also cleaned the patch a little removing most of the changes for the rename. The result is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 30 commits: - Fixing test. - Cleanup. - Upgrade to 3.26.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1 - Merge remote-tracking branch 'origin/native-access-modules1' into native-access-modules1 - Apply suggestions from code review Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com> - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1 - ... and 20 more: https://git.openjdk.org/jdk/compare/130f71ca...01f95c42 ------------- Changes: https://git.openjdk.org/jdk/pull/18142/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18142&range=04 Stats: 13181 lines in 144 files changed: 5785 ins; 5349 del; 2047 mod Patch: https://git.openjdk.org/jdk/pull/18142.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18142/head:pull/18142 PR: https://git.openjdk.org/jdk/pull/18142 From jlahoda at openjdk.org Fri May 3 07:27:09 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Fri, 3 May 2024 07:27:09 GMT Subject: RFR: 8327476: Upgrade JLine to 3.26.1 [v6] In-Reply-To: References: Message-ID: > This is a patch that: > a) upgrades the JLine inside the JDK to 3.25.1 > b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend > > Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: > - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 > - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily > > There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: > https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal > the patch is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff > > I've also cleaned the patch a little removing most of the changes for the rename. The result is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Removing trailing whitespace. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18142/files - new: https://git.openjdk.org/jdk/pull/18142/files/01f95c42..9f6509a9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18142&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18142&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18142.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18142/head:pull/18142 PR: https://git.openjdk.org/jdk/pull/18142 From jlahoda at openjdk.org Fri May 3 07:27:12 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Fri, 3 May 2024 07:27:12 GMT Subject: RFR: 8327476: Upgrade JLine to 3.26.1 [v5] In-Reply-To: References: Message-ID: On Fri, 3 May 2024 07:21:27 GMT, Jan Lahoda wrote: >> This is a patch that: >> a) upgrades the JLine inside the JDK to 3.25.1 >> b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend >> >> Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: >> - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 >> - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily >> >> There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal >> the patch is here: >> https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff >> >> I've also cleaned the patch a little removing most of the changes for the rename. The result is here: >> https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff > > Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 30 commits: > > - Fixing test. > - Cleanup. > - Upgrade to 3.26.1 > - Merge branch 'master' into jline-upgrade-3.25.1 > - Merge branch 'master' into jline-upgrade-3.25.1 > - Merge branch 'master' into jline-upgrade-3.25.1 > - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1 > - Merge remote-tracking branch 'origin/native-access-modules1' into native-access-modules1 > - Apply suggestions from code review > > Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com> > Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com> > - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1 > - ... and 20 more: https://git.openjdk.org/jdk/compare/130f71ca...01f95c42 Update: since JLine 3.26.1 was release, I tried to upgrade to that directly. I made a diff of the relevant files between JLine 3.25.1 and 3.26.1, and applied that diff to our code. Some additional cleanup was done as well, as suggested by Magnus. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18142#issuecomment-2092453108 From jkern at openjdk.org Fri May 3 08:34:57 2024 From: jkern at openjdk.org (Joachim Kern) Date: Fri, 3 May 2024 08:34:57 GMT Subject: Integrated: 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX In-Reply-To: References: Message-ID: On Thu, 2 May 2024 09:54:14 GMT, Joachim Kern wrote: > We need to find a better way to handle alloca on AIX. > > See the discussion in the PR for https://bugs.openjdk.org/browse/JDK-8329257, e.g. https://github.com/openjdk/jdk/pull/18536#discussion_r1568650313 in which three alternatives are suggested. Quoting: > > Let me summarize the choices we have and ask for your vote. > Magnus dislikes the -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 I introduced to get rid of > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > We have four possible solutions > > 1. Reintroduce > > #if defined(_AIX) > #include > #endif > > in globalDefinitions_gcc.hpp. > > 2. Unconditionally introduce only #include in globalDefinitions_gcc.hpp. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it. > > 3. Add > > #if defined(_AIX) > #include > #endif > > to the sources using alloca(). These are > /hotspot/share/runtime/os.cpp > /hotspot/share/runtime/javaThread.cpp > /hotspot/share/utilities/vmError.cpp > Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails. > > 4. Replace -Dalloca'(size)'=__builtin_alloca'(size)' in flags-cflags.m4 by -U__STRICT_ANSI__ at the same place. Explanation can also found in https://github.com/openjdk/jdk/pull/18536#discussion_r1583360569 and following. > > I will implement the solution with the most likes and having no dislike. This pull request has now been integrated. Changeset: a10845b5 Author: Joachim Kern Committer: Martin Doerr URL: https://git.openjdk.org/jdk/commit/a10845b553fc6fe7e06a0f37ce73fe5f704dc7c4 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod 8330539: Use #include instead of -Dalloca'(size)'=__builtin_alloca'(size)' for AIX Reviewed-by: jwaters, mdoerr, kbarrett, ihse ------------- PR: https://git.openjdk.org/jdk/pull/19053 From ihse at openjdk.org Fri May 3 15:02:54 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 3 May 2024 15:02:54 GMT Subject: RFR: 8327476: Upgrade JLine to 3.26.1 [v6] In-Reply-To: References: Message-ID: On Fri, 3 May 2024 07:27:09 GMT, Jan Lahoda wrote: >> This is a patch that: >> a) upgrades the JLine inside the JDK to 3.25.1 >> b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend >> >> Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: >> - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 >> - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily >> >> There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm >> https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal >> the patch is here: >> https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff >> >> I've also cleaned the patch a little removing most of the changes for the rename. The result is here: >> https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Removing trailing whitespace. Marked as reviewed by ihse (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/18142#pullrequestreview-2038354269 From syan at openjdk.org Fri May 3 16:07:57 2024 From: syan at openjdk.org (SendaoYan) Date: Fri, 3 May 2024 16:07:57 GMT Subject: RFR: 8331331: :tier1 target explanation in doc/testing.md is incorrect [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:46:14 GMT, SendaoYan wrote: >> Hi, >> >> In doc/testing.md file, it says: >> >> As an example, :tier1 will expand to jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. >> >> The actual situation is :tier1 doesn't contains test/nashorn:tier1, and the document missed test/lib-test:tier1 >> >> $ make -n test-tier1 &> test-tier1.log >> $ grep "Running test " test-tier1.log >> Running test 'jtreg:test/hotspot/jtreg:tier1' >> Running test 'jtreg:test/jdk:tier1' >> Running test 'jtreg:test/langtools:tier1' >> Running test 'jtreg:test/jaxp:tier1' >> Running test 'jtreg:test/lib-test:tier1' >> >> Only change the document, no risk. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > deliberately making it shorter and ading ... show that this is not am exhaustive list > /sponsor @magicus Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19002#issuecomment-2093305986 From Suchismith.Roy at ibm.com Mon May 6 09:57:52 2024 From: Suchismith.Roy at ibm.com (Suchismith Roy) Date: Mon, 6 May 2024 09:57:52 +0000 Subject: JDK-8170635 Message-ID: I wanted to discuss regarding https://bugs.openjdk.org/browse/JDK-8170635. Do you have any pointers on moving dladdr() for AIX according to the current JDK23 structure. I think you had suggested one proposition according to JDK11 ? Could we get some more pointers on this proposition ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.stuefe at gmail.com Mon May 6 14:36:28 2024 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Mon, 6 May 2024 16:36:28 +0200 Subject: JDK-8170635 In-Reply-To: References: Message-ID: Not sure if you meant to address this mail to a specific person. I assume with proposal you mean this: https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? If yes, my proposal was to move dladdr out of the OpenJDK code base into an independent library that would be maintained by IBM, hopefully, and would be a prerequisite for building the JDK. If no, whose proposal did you mean? On Mon, May 6, 2024 at 11:58?AM Suchismith Roy wrote: > I wanted to discuss regarding https://bugs.openjdk.org/browse/JDK-8170635. > > Do you have any pointers on moving dladdr() for AIX according to the > current JDK23 structure. > I think you had suggested one proposition according to JDK11 ? > Could we get some more pointers on this proposition ? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.stuefe at gmail.com Mon May 6 16:26:50 2024 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Mon, 6 May 2024 18:26:50 +0200 Subject: How do I reliably prevent CDS archive generation during builds? Message-ID: Hi, is there a way to reliably prevent the jvm from being called with -Xshare:dump during build? Often, when I tinker with metaspace or compressed klass pointers, CDS gets broken. During development, that is fine; it is a temporary state. However, if -Xshare:dump is invoked, it may crash the JVM and break the build. I specified --disable-cds-archives and --disable-jvm-feature-link-time-opt. But still, link time optimization step runs and calls the build JVM with -Xshare:dump. Is that a bug? Thanks, Thomas P.S. Also, how is this handled for crossbuilds, where generating shared archives on the build machine makes little sense? -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.joelsson at oracle.com Mon May 6 17:21:53 2024 From: erik.joelsson at oracle.com (erik.joelsson at oracle.com) Date: Mon, 6 May 2024 10:21:53 -0700 Subject: How do I reliably prevent CDS archive generation during builds? In-Reply-To: References: Message-ID: <787abd8a-0719-4a68-a3e7-db5ec07d5384@oracle.com> On 5/6/24 09:26, Thomas St?fe wrote: > Hi, > > is there a way to reliably prevent the jvm from being called with > -Xshare:dump during build? > > Often, when I tinker with metaspace or compressed klass pointers, CDS > gets broken. During development, that is fine; it is a temporary state. > > However, if -Xshare:dump is invoked, it may crash the JVM and break > the build. > > I specified --disable-cds-archives and > --disable-jvm-feature-link-time-opt. But still, link time optimization > step runs and calls the build JVM with -Xshare:dump. Is that a bug? > I think if you add --disable-generate-classlist to that list of configure arguments, this particular invocation with -Xshare:dump will go away. /Erik > Thanks, Thomas > > P.S. Also, how is this handled for crossbuilds, where generating > shared archives on the build machine makes little sense? > > > From jjg at openjdk.org Mon May 6 17:25:26 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 6 May 2024 17:25:26 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v65] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: Update javadoc.1 troff man page ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16388/files - new: https://git.openjdk.org/jdk/pull/16388/files/e42632a9..9ad5c398 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=64 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=63-64 Stats: 23 lines in 1 file changed: 10 ins; 3 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From vladimir.petko at canonical.com Mon May 6 19:57:16 2024 From: vladimir.petko at canonical.com (Vladimir Petko) Date: Tue, 7 May 2024 07:57:16 +1200 Subject: undefined symbols in libjvm.so Message-ID: Hi, I have recently encountered bugs caused by undefined symbols in libjvm.so[1][2]. The root cause of those issues is the expression in make/autoconf/flags-ldflags.m4: --- if test "x$TOOLCHAIN_TYPE" = xgcc; then EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined" ... -- OpenJDK master builds fine after fixing[1] on the following architectures: amd64, i386, armhf, arm64, s390, ppc64el and riscv64. Would it be possible to consider removing -Wl,--allow-shlib-undefined from the build flags? Best Regards, Vladimir. [1] https://bugs.openjdk.org/browse/JDK-8331541 [2] https://bugs.openjdk.org/browse/JDK-8329983 From jjg at openjdk.org Mon May 6 21:01:41 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 6 May 2024 21:01:41 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v66] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: Remove `--no-fonts` from `MISSING_IN_MAN_PAGE` ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16388/files - new: https://git.openjdk.org/jdk/pull/16388/files/9ad5c398..e48ebb53 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=65 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=64-65 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From duke at openjdk.org Mon May 6 22:47:23 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Mon, 6 May 2024 22:47:23 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v6] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: Use AffinePoint to exit Montgomery domain Style notes: Affine.equals() - Mismatched fields only appear to be used from testing, perhaps should be moved there instead Affine.getX(boolean)|getY(boolean) - "Passing flag is bad design" - cleanest/performant alternative to several instanceof checks - needed to convert Affine to Projective (need to stay in montgomery domain) ECOperations.PointMultiplier - changes could probably be restored to original (since ProjectivePoint handling no longer required) - consider these changes an improvement? (fewer nested classes) - was an inner-class but not using inner-class features (i.e. ecOps variable should be converted) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/a1984501..8ff243a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=04-05 Stats: 268 lines in 7 files changed: 89 ins; 147 del; 32 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From tanksherman27 at gmail.com Tue May 7 00:57:37 2024 From: tanksherman27 at gmail.com (Julian Waters) Date: Tue, 7 May 2024 08:57:37 +0800 Subject: How do I reliably prevent CDS archive generation during builds? Message-ID: Hi Thomas, --disable-jvm-feature-link-time-opt is for disabling Link Time Optimization when compiling the JVM itself, as in, requesting LTO from the linker that is linking the JVM. It doesn't have anything to do with what arguments the newly compiled JVM is called with and isn't related to the link optimization pass of the Java classfiles (I am not very familiar with that process), and it is also off by default for most platforms best regards, Julian From jianglizhou at google.com Tue May 7 04:04:56 2024 From: jianglizhou at google.com (Jiangli Zhou) Date: Mon, 6 May 2024 21:04:56 -0700 Subject: Hermetic Java project meeting In-Reply-To: <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> Message-ID: On Tue, Apr 30, 2024 at 5:42?AM Magnus Ihse Bursie wrote: > > > On 2024-04-26 03:15, Jiangli Zhou wrote: > > On Thu, Apr 25, 2024 at 9:28?AM Magnus Ihse Bursie > > wrote: > >> > >> Just to be more clear, that's with using `objcopy` to localize non-exported symbols for all JDK static libraries and libjvm.a, not just libjvm.a right? > >> > >> Yes. > >> > >> > >> Can you please include the compiler or linker errors on linux/clang? > >> > >> It is a bit tricky. The problem arises at the partial linking step. The problem seem to arise out of how clang converts a request to link into an actual call to ld. I enabled debug code (printing the command line, and running clang with `-v` to get it to print the actual command line used to run ld) and ran it on GHA, where it worked fine. This is how it looks there: > >> > >> WILL_RUN: /usr/bin/clang -v -m64 -r -o /home/runner/work/jdk/jdk/build/linux-x64/support/native/java.rmi/librmi/static/librmi_relocatable.o /home/runner/work/jdk/jdk/build/linux-x64/support/native/java.rmi/librmi/static/GC.o > >> Ubuntu clang version 14.0.0-1ubuntu1.1 > >> Target: x86_64-pc-linux-gnu > >> Thread model: posix > >> InstalledDir: /usr/bin > >> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10 > >> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 > >> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12 > >> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13 > >> Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9 > >> Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13 > >> Candidate multilib: .;@m64 > >> Selected multilib: .;@m64 > >> "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/runner/work/jdk/jdk/build/linux-x64/support/native/java.rmi/librmi/static/librmi_relocatable.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/13 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/llvm-14/bin/../lib -L/lib -L/usr/lib -r /home/runner/work/jdk/jdk/build/linux-x64/support/native/java.rmi/librmi/static/GC.o > >> > >> In contrast, on my machine it looks like this: > >> > >> WILL_RUN: /usr/local/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04/bin/clang -v -m64 -r -o /localhome/git/jdk-ALT/build/clangherm/support/native/java.rmi/librmi/static/librmi_relocatable.o /localhome/git/jdk-ALT/build/clangherm/support/native/java.rmi/librmi/static/GC.o > >> clang version 13.0.1 > >> Target: x86_64-unknown-linux-gnu > >> Thread model: posix > >> InstalledDir: /usr/local/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04/bin > >> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 > >> Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 > >> Candidate multilib: .;@m64 > >> Candidate multilib: 32;@m32 > >> Candidate multilib: x32;@mx32 > >> Selected multilib: .;@m64 > >> "/usr/bin/ld" --hash-style=both --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /localhome/git/jdk-ALT/build/clangherm/support/native/java.rmi/librmi/static/librmi_relocatable.o /lib/x86_64-linux-gnu/crt1.o /lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/local/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04/bin/../lib -L/lib -L/usr/lib -r /localhome/git/jdk-ALT/build/clangherm/support/native/java.rmi/librmi/static/GC.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o /lib/x86_64-linux-gnu/crtn.o > >> /usr/bin/ld: cannot find -lgcc_s > >> /usr/bin/ld: cannot find -lgcc_s > >> clang-13: error: linker command failed with exit code 1 (use -v to see invocation) > >> > >> I don't understand what makes clang think it should include "-lgcc --as-needed -lgcc_s" and the crt*.o files when doing a partial link. In fact, the entire process on how clang (and gcc) builds up the linker command line is bordering on black magic to me. I think it can be affected by variables set at compile time (at least this was the case for gcc, last I checked), or maybe it picks up some kind of script from the environment. That's why I believe my machine could just be messed up. > >> > >> I could get a bit further by passing "-nodefaultlibs" (or whatever it was), but then the generated .o file were messed up wrt to library symbols and it failed dramatically when trying to do the final link of the static java launcher. > >> > >> > > Looks like you are using /usr/bin/ld and not lld. I haven't run into > > this type of issue. Have you tried -fuse-ld=lld? > > I am not sure why clang insisted on picking up ld and not lld. I remeber > trying with -fuse-ld=lld, and that it did not work either. > Unfortunately, I don't remember exactly what the problems were. > > I started reinstalling my Linux workstation yesterday, but something > went wrong, and it failed so hard that it got semi-bricked by the new > installation, so I need to redo everything from scratch. :-( After that > is done, I'll re-test. Hopefully this was just my old installation that > was too broken. > > > > > >>> > >>> I have also tried to extract all the changes (and only the changes) > >>> related to static build from the hermetic-java-runtime branch (ignoring > >>> the JavaHome/resource loading changes), to see if I could get something > >>> like StaticLink.gmk in mainline. I thought I was doing quite fine, but > >>> after a while I realized my testing was botched since the launcher had > >>> actually loaded the libraries dynamically instead, even though they were > >>> statically linked. :-( I am currently trying to bisect my way thought my > >>> repo to understand where things went wrong. > >> > >> Did you run with `bin/javastatic`? The system automatically detects if the binary contains statically linked native libraries and avoids loading the dynamic libraries. Can you please share which test(s) ran into the library loading issue? I'll see if I can reproduce the problem that you are running into. > >> > >> It was in fact not a problem. I was fooled by an error message. To be sure I was not loading any dynamically linked libraries, I removed the jdk/lib directory. Now the launcher failed, saying something like: > >> > >> "Error: Cannot locate dynamic library libjava.dylib". > >> > >> which was a bit of a jump scare. > >> > >> However, it turned out that it actually tried to load lib/jvm.cfg, and failed in loading this (since I had removed the entire lib directory), and this failure caused the above error message to be printed. When I restored lib/jvm.cfg (but not any dynamic libraries), the launcher worked. > >> > > Sounds like you are running into problems immediately during startup. > > Does the problem occur with just running bin/javastatic using a simple > > HelloWorld? Can you please send me your command line for reproducing? > > Maybe I was not clear enough: I did resolve the problem. > > > For the static Java support, I changed CreateExecutionEnvironment to > > return immediately if it executes statically. jvm.cfg is not loaded. > > Please see https://github.com/openjdk/leyden/blob/c1c5fc686c1452550e1b3663a320fba652248505/src/java.base/unix/native/libjli/java_md.c#L296. > > Sounds like the JLI_IsStaticJDK() check is not working properly in > > your case. > > I've been trying to extract from your port a minimal set of patches that > is needed to get static build to work. In that process, JavaHome and > JLI_IsStaticJDK have been removed. It might be that this issue arised > only in my slimmed-down branch, and not on your leyden branch (at this > point I don't recall exactly). But, we need to fix this separately, > since we must be able to build a static launcher without the hermetic > changes. The JDK and VM code has pre-existing assumptions about the JDK directories and dynamic linking (e.g. the .so). JLI_IsStaticJDK|JLI_SetStaticJDK|JVM_IsStaticJDK|JVM_SetStaticJDK is needed for static JDK support to handle those cases correctly. CreateExecutionEnvironment that I mentioned earlier is one of the examples. I'm quite certain the issue that you are running into is due to the incorrect static check/handling in CreateExecutionEnvironment. > > In my branch, I am only using compile-time #ifdef checks for static vs > dynamic. In the long run, the runtime checks that you have done are a > good thing, but at the moment they are just adding intrusive changes > without providing any benefit -- if we can't reuse .o files between > dynamic and static compilation, there is no point in introducing a > runtime check when we already have a working compile-time check. I haven't seen your branch/code. I'd suggest not going with the #ifdef checks as that's the opposite direction of what we want to achieve. It doesn't seem to be worth your effort to add more #ifdef checks in order to do static linking build work, even those are for temporary testing reasons. > > I did think I correctly changed every dynamic check that you had added > to a compile-time check, so it bewilders me somewhat when you say that > jvm.cfg is not needed in your branch. > > Can you verify and confirm that the static launcher actually works in > your branch, if there is no "lib/jvm.cfg" present? In my /leyden/build/linux-x86_64-server-slowdebug/images/jdk directory: $ mv lib/jvm.cfg lib/jvm.cfg.no_used $ find . | grep jvm.cfg ./lib/jvm.cfg.no_used $ bin/javastatic -cp HelloWorld HelloWorld Thanks! Jiangli > > /Magnus > > > > > > Best, > > Jiangli > > > >> There are several bugs lurking here. For once, the error message is incorrect and should be corrected. Secondly, a statically linked launcher has just a single JVM included and should not have to look for the lib/jvm.cfg file at all. > >> > >> After looking around a bit in the launcher/jli code, my conclusion is that this code will need some additional care and loving attention to make it properly adjusted to function as a static launcher. We can't have a static launcher that tries to load a jvm.cfg file it does not need, and when it fails, complains that it is missing a dynamic library that it should not load. > >> > >> I'll try to get this fixed as part of my efforts to get the static launcher into mainline. > >>> This was done haphazardly in StaticLink.gmk in the hermetic-java-runtime > >>> branch, where an arbitrary subset of external libraries were hard-coded. > >>> Before integration in mainline can be possible, this information needs > >>> to be collected correctly and automatically for all included JDK > >>> libraries. Fortunately, it is not likely to be too hard. I basically > >>> just need to store the information from the LIBS provided to the > >>> NativeCompilation, and pick that up for all static libraries we include > >>> in the static launcher. (A complication is that we need to de-duplicate > >>> the list, and that some libraries are specified using two words, like > >>> "-framework Application" on macos, so it will take some care getting it > >>> right.) > >> > >> Right, currently the hermetic-java-runtime branch specifies a list of hard-coded dependency libraries for linking. One of the goals of the hermetic prototype was avoiding/reducing refactoring/restructuring the existing code whenever possible. The reason is to reduce merge overhead when integrating with new changes from the mainline. We can do the proper refactoring and cleanups when getting the changes into the mainline. > >> > >> That is basically what I am doing right now. I am looking at your prototype and trying to reimplement this functionality properly so that it can be merged into mainline. The first step on that way was to actually get your prototype running. > >> > >> Now I have managed to get a version of your prototype that only includes the minimal set of changes needed to support the static launcher, and that works on mac and linux/gcc. Since your prototype is based on 586396cbb55a31 from March, I am trying to merge the patch with the latest master. This worked fine for macOS, but I hit some unexpected snag on Linux which I'm currently investigating. > >> > >> We have only briefly touched on the spec change topic (for the naming of native libraries) during the zoom meetings. I also agree that we should get that part started now. It's unclear to me if there's any existing blocker for that. > >> > >> I don't think there is. It's just that someone needs to step up and do it. > >> > >> /Magnus From thomas.stuefe at gmail.com Tue May 7 04:08:00 2024 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Tue, 7 May 2024 06:08:00 +0200 Subject: How do I reliably prevent CDS archive generation during builds? In-Reply-To: References: Message-ID: Hi Julian, Yes, that confused me too. See here: https://github.com/openjdk/jdk/blob/f308e107ce8b993641ee3d0a0d5d52bf5cd3b94e/make/GenerateLinkOptData.gmk#L76 Cheers, Thomas On Tue, May 7, 2024 at 2:58?AM Julian Waters wrote: > Hi Thomas, > > --disable-jvm-feature-link-time-opt is for disabling Link Time > Optimization when compiling the JVM itself, as in, requesting LTO from > the linker that is linking the JVM. It doesn't have anything to do > with what arguments the newly compiled JVM is called with and isn't > related to the link optimization pass of the Java classfiles (I am not > very familiar with that process), and it is also off by default for > most platforms > > best regards, > Julian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.stuefe at gmail.com Tue May 7 04:31:28 2024 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Tue, 7 May 2024 06:31:28 +0200 Subject: How do I reliably prevent CDS archive generation during builds? In-Reply-To: <787abd8a-0719-4a68-a3e7-db5ec07d5384@oracle.com> References: <787abd8a-0719-4a68-a3e7-db5ec07d5384@oracle.com> Message-ID: Thank you, Eric! On Mon, May 6, 2024 at 7:21?PM wrote: > On 5/6/24 09:26, Thomas St?fe wrote: > > Hi, > > > > is there a way to reliably prevent the jvm from being called with > > -Xshare:dump during build? > > > > Often, when I tinker with metaspace or compressed klass pointers, CDS > > gets broken. During development, that is fine; it is a temporary state. > > > > However, if -Xshare:dump is invoked, it may crash the JVM and break > > the build. > > > > I specified --disable-cds-archives and > > --disable-jvm-feature-link-time-opt. But still, link time optimization > > step runs and calls the build JVM with -Xshare:dump. Is that a bug? > > > I think if you add --disable-generate-classlist to that list of > configure arguments, this particular invocation with -Xshare:dump will > go away. > > /Erik > > > Thanks, Thomas > > > > P.S. Also, how is this handled for crossbuilds, where generating > > shared archives on the build machine makes little sense? > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Suchismith.Roy at ibm.com Tue May 7 08:04:39 2024 From: Suchismith.Roy at ibm.com (Suchismith Roy) Date: Tue, 7 May 2024 08:04:39 +0000 Subject: JDK-8170635 In-Reply-To: References: Message-ID: Hi Thomas Thank you for the reply. I want to reach out to Erik who was working on this issue. @erik.joelsson at oracle.com Do you also propose the same solution as mentioned by Thomas ? I haven?t worked with resolving build dependencies before, so could I get some guidance on this. May be some old issue that got closed and I can refer the code ? Thanks Suchismith Roy From: Thomas St?fe Date: Monday, 6 May 2024 at 8:06?PM To: Suchismith Roy Cc: build-dev at openjdk.org Subject: [EXTERNAL] Re: JDK-8170635 Not sure if you meant to address this mail to a specific person. I assume with proposal you mean this: https:?//mail.?openjdk.?org/pipermail/build-dev/2016-September/017746.?html ? If yes, my proposal was to move dladdr out of the OpenJDK code ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. Report Suspicious ZjQcmQRYFpfptBannerEnd Not sure if you meant to address this mail to a specific person. I assume with proposal you mean this: https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? If yes, my proposal was to move dladdr out of the OpenJDK code base into an independent library that would be maintained by IBM, hopefully, and would be a prerequisite for building the JDK. If no, whose proposal did you mean? On Mon, May 6, 2024 at 11:58?AM Suchismith Roy > wrote: I wanted to discuss regarding https://bugs.openjdk.org/browse/JDK-8170635. Do you have any pointers on moving dladdr() for AIX according to the current JDK23 structure. I think you had suggested one proposition according to JDK11 ? Could we get some more pointers on this proposition ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlahoda at openjdk.org Tue May 7 09:19:15 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Tue, 7 May 2024 09:19:15 GMT Subject: RFR: 8327476: Upgrade JLine to 3.26.1 [v7] In-Reply-To: References: Message-ID: > This is a patch that: > a) upgrades the JLine inside the JDK to 3.25.1 > b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend > > Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: > - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 > - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily > > There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: > https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal > the patch is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff > > I've also cleaned the patch a little removing most of the changes for the rename. The result is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 32 commits: - Merge branch 'master' into jline-upgrade-3.25.1 - Removing trailing whitespace. - Fixing test. - Cleanup. - Upgrade to 3.26.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'master' into jline-upgrade-3.25.1 - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1 - Merge remote-tracking branch 'origin/native-access-modules1' into native-access-modules1 - ... and 22 more: https://git.openjdk.org/jdk/compare/23a72a1f...5d900a6e ------------- Changes: https://git.openjdk.org/jdk/pull/18142/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18142&range=06 Stats: 13181 lines in 144 files changed: 5784 ins; 5349 del; 2048 mod Patch: https://git.openjdk.org/jdk/pull/18142.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18142/head:pull/18142 PR: https://git.openjdk.org/jdk/pull/18142 From magnus.ihse.bursie at oracle.com Tue May 7 10:36:17 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Tue, 7 May 2024 12:36:17 +0200 Subject: undefined symbols in libjvm.so In-Reply-To: References: Message-ID: <64b3b8a6-1047-4f3d-a90c-3d2cfd097bff@oracle.com> Undefined symbols in libjvm.so is no good, and it should not be allowed. However, I am unsure about your analysis. This flag only affect linking of executables, not shared libraries. We do set "-Wl,-z,defs" when linking shared libraries, and this should complain about undefined symbols. /Magnus On 2024-05-06 21:57, Vladimir Petko wrote: > Hi, > > I have recently encountered bugs caused by undefined symbols in > libjvm.so[1][2]. The root cause of those issues is the expression in > make/autoconf/flags-ldflags.m4: > > --- > if test "x$TOOLCHAIN_TYPE" = xgcc; then > EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined" > ... > -- > > OpenJDK master builds fine after fixing[1] on the following > architectures: amd64, i386, armhf, arm64, s390, ppc64el and riscv64. > > Would it be possible to consider removing -Wl,--allow-shlib-undefined > from the build flags? > > Best Regards, > Vladimir. > > [1] https://bugs.openjdk.org/browse/JDK-8331541 > [2] https://bugs.openjdk.org/browse/JDK-8329983 From ihse at openjdk.org Tue May 7 10:41:52 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 7 May 2024 10:41:52 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra I'm not sure why we have `--allow-shlib-undefined`, but changing this should not affect libjvm building. Do you really see a difference in build success/failure depending on that line? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19048#issuecomment-2098040712 From magnus.ihse.bursie at oracle.com Tue May 7 12:26:37 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Tue, 7 May 2024 14:26:37 +0200 Subject: Hermetic Java project meeting In-Reply-To: References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> Message-ID: <6090f2aa-1480-4706-9281-035579a933af@oracle.com> On 2024-05-07 06:04, Jiangli Zhou wrote: > On Tue, Apr 30, 2024 at 5:42?AM Magnus Ihse Bursie > wrote: >> I am not sure why clang insisted on picking up ld and not lld. I remeber >> trying with -fuse-ld=lld, and that it did not work either. >> Unfortunately, I don't remember exactly what the problems were. >> >> I started reinstalling my Linux workstation yesterday, but something >> went wrong, and it failed so hard that it got semi-bricked by the new >> installation, so I need to redo everything from scratch. :-( After that >> is done, I'll re-test. Hopefully this was just my old installation that >> was too broken. I decided to spend the time to reinstall my machine. Now linking with clang works. Kind of. For some reason, it still picks up binutils ld and not lld, and then -l:libc++.a does not work, but when I replaced it with -l:libstdc++.a it worked just fine. I guess we need to either forcefully add -fuse-ld=lld to our clang compilation lines, or figure out if clang is going to call the binutils or llvm ld, and select the right option. I still find the logic for how clang and gcc locates the default linker to be mostly magic. I guess I need to make a deep dive in understanding this to be able to resolve this properly. > The JDK and VM code has pre-existing assumptions about the JDK > directories and dynamic linking (e.g. the .so). > JLI_IsStaticJDK|JLI_SetStaticJDK|JVM_IsStaticJDK|JVM_SetStaticJDK is > needed for static JDK support to handle those cases correctly. > CreateExecutionEnvironment that I mentioned earlier is one of the > examples. > > I'm quite certain the issue that you are running into is due to the > incorrect static check/handling in CreateExecutionEnvironment. I'll have a look at that, thanks for the pointer. >> In my branch, I am only using compile-time #ifdef checks for static vs >> dynamic. In the long run, the runtime checks that you have done are a >> good thing, but at the moment they are just adding intrusive changes >> without providing any benefit -- if we can't reuse .o files between >> dynamic and static compilation, there is no point in introducing a >> runtime check when we already have a working compile-time check. > I haven't seen your branch/code. I'd suggest not going with the #ifdef > checks as that's the opposite direction of what we want to achieve. It > doesn't seem to be worth your effort to add more #ifdef checks in > order to do static linking build work, even those are for temporary > testing reasons. Okaaaaay... My understanding was that you wanted to push for the quickest possible integration of building a static java launcher into mainline. To do that as fast as possible, we need to use the existing framework for separating statically and dynamically linked libraries, which means doing compile time checks using #ifdefs. Are you saying now that the priorities has changed, and that you want to start by introducing your framework for the runtime lookup if we are static or dynamic? To be honest, I think your prototype is rather hacky in how you implement this, and I reckon that it will require quite a lot of work to be accepted into mainline. I also think you need a CSR for changing the Hotspot/JDK behavior wrt this, which further adds to the process. If you want to go that route instead, then I'll put my work on hold until you have gotten a working solution for the runtime lookup in mainline. I gather this means that there is no real stress for me anymore. /Magnus -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.joelsson at oracle.com Tue May 7 12:41:49 2024 From: erik.joelsson at oracle.com (erik.joelsson at oracle.com) Date: Tue, 7 May 2024 05:41:49 -0700 Subject: [External] : RE: JDK-8170635 In-Reply-To: References: Message-ID: <345f7d5e-693a-4661-8fdf-2b804c59b005@oracle.com> On 5/7/24 01:04, Suchismith Roy wrote: > > Hi Thomas > Thank you for the reply. I want to reach out to Erik who was working > on this issue. > @erik.joelsson at oracle.com Do you > also propose the same solution as mentioned by Thomas ? > This is an almost 8 year old email thread, so I definitely do not remember this discussion. From what I can see I only responded to Volker's counter proposal and added some details on how to solve it that way, and giving it my blessing as a concept. As I'm not affected by how this is solved, I don't have a strong opinion on how to do it, but if I was, I would certainly prefer Volker's solution, with the code still in the JDK repository, to having to deal with a new 3rd party dependency. /Erik > I haven?t worked with resolving build dependencies before, so could I > get some guidance on this. May be some old issue that got closed and I > can refer the code ? > > Thanks > Suchismith Roy > > *From: *Thomas St?fe > *Date: *Monday, 6 May 2024 at 8:06?PM > *To: *Suchismith Roy > *Cc: *build-dev at openjdk.org > *Subject: *[EXTERNAL] Re: JDK-8170635 > > Not sure if you meant to address this mail to a specific person. I > assume with proposal you mean this: > https:?//mail.?openjdk.?org/pipermail/build-dev/2016-September/017746.?html > ? If yes, my proposal was to move dladdr out of the OpenJDK code > > ZjQcmQRYFpfptBannerStart > > *This Message Is From an External Sender * > > This message came from outside your organization. > > > > Report?Suspicious > > ZjQcmQRYFpfptBannerEnd > > Not sure if you meant to address this mail to a specific person. I > assume with proposal you mean this: > https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? > > If yes, my proposal was to move dladdr out of the OpenJDK code base > into an independent library that would be maintained by IBM, > hopefully, and would be a prerequisite for building the JDK. > > If no, whose proposal did you mean? > > On Mon, May 6, 2024 at 11:58?AM Suchismith Roy > wrote: > > I wanted to discuss regarding > https://bugs.openjdk.org/browse/JDK-8170635 > . > Do you have any pointers on moving dladdr() for AIX according to > the current JDK23 structure. > I think you had suggested one proposition according to JDK11 ? > Could we get some more pointers on this proposition ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus.ihse.bursie at oracle.com Tue May 7 12:48:08 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Tue, 7 May 2024 14:48:08 +0200 Subject: JDK-8170635 -- adding a base library to java In-Reply-To: References: Message-ID: <7b083ada-a538-406e-aac0-bd5e0dad5353@oracle.com> On 2024-05-06 16:36, Thomas St?fe wrote: > Not sure if you meant to address this mail to a specific person. I > assume with proposal you mean this: > https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? > > If yes, my proposal was to move dladdr out of the OpenJDK code base > into an independent library that would be maintained by IBM, > hopefully, and would be a prerequisite for building the JDK. > If no, whose proposal did you mean? Oh, this is an old bug you're picking up Suchismith! I read through the discussion from 2016. It seems that the suggestion to make an external 3rd party library was only supported by Thomas, and that the general agreement among the other participants was that we should have a general, base-level "OSAL" (OS abstraction library) in the JDK, that could be used by both Hotspot and libjli, as well as other JDK libraries. Creating such a library would be a much larger effort than just adding a AIX implementation of dladdr to it, if it existed. The current structure of the JDK does not readily lend itself to such a library, neither in terms of source code layout nor build system. With that said, I do think it would be good if we had such a library. There are more cases than the AIX dladdr issue that is duplicated, like jio_snprintf() and friends. This has actually caused some headaches when doing static builds, since duplication of these functions are not allowed when creating a single linked instance. (The current duplication in dynamic libraries is just ugly and bad programming, not a compilation error.) But it is a much larger question than just fixing an AIX issue. /Magnus From sgehwolf at openjdk.org Tue May 7 16:52:12 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Tue, 7 May 2024 16:52:12 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v26] In-Reply-To: References: Message-ID: > Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app b eing modularized). > > The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. > > Basic usage example: > > $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) > $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) > $ ls ../linux-x86_64-server-release/images/jdk/jmods > java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod > java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod > java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod > java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.internal.vm.compiler.manage... Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 105 commits: - Generate the runtime image link diff at jlink time But only do that once the plugin-pipeline has run. The generation is enabled with the hidden option '--generate-linkable-runtime' and the resource pools available at jlink time are being used to generate the diff. - Merge branch 'master' into jdk-8311302-jmodless-link - Use shorter name for the build tool - Review feedback from Erik J. - Remove dependency on CDS which isn't needed anymore - Fix coment - Fix comment - Fix typo - Revert some now unneded build changes - Follow build tools naming convention - ... and 95 more: https://git.openjdk.org/jdk/compare/23a72a1f...67aea4ca ------------- Changes: https://git.openjdk.org/jdk/pull/14787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14787&range=25 Stats: 3424 lines in 36 files changed: 3272 ins; 110 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/14787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14787/head:pull/14787 PR: https://git.openjdk.org/jdk/pull/14787 From sgehwolf at openjdk.org Tue May 7 16:55:08 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Tue, 7 May 2024 16:55:08 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23] In-Reply-To: References: <_sbNFJXG7ghwsfNfxaGvvoDQ7-UtWpnhGnygKsFTsgQ=.623700db-7306-4b34-9e05-ca9059797e39@github.com> Message-ID: On Tue, 16 Apr 2024 13:54:53 GMT, Alan Bateman wrote: >>> > @mlchung @AlanBateman Any thoughts on this latest version? Is this going into the direction you had envisioned? Any more blockers? The CSR should be up-to-date and is open for review as well. If no more blockers I'll go over this patch once more and clean it up to prepare for integration. Thanks! >>> >>> Thanks for all the efforts on this. >> >> Thanks for looking at this, Alan! >> >>> I've looked through the latest version. I'm a little bit comfortable with LinkDeltaProducer. One reason it's build tool that is tied tied to code in the jdk.jlink module, and secondly is that it copies runtime-image-link.delta into the run-time image. Our long standing position is that the run-time image is created by jlink rather than a combination of jlink and extra stuff copied in by the build. >>> >>> The part that I like with the current proposal is lib/runtime-image-link.delta as it's less complicated that previous iterations that added a resource into the jimage container. >>> >>> What would you (and @mlchung) think of having jlink generate lib/runtime-image-link.delta as a step between the pipeline and image generation? >> >> If I understand you correctly, this would be no longer a build-time only approach to produce the "linkable runtime"? It would be some-kind of jlink-option driven approach (as it would run some code that should only run when producing a linkable runtime is requested)? Other than that, it should be fine as the previous iteration basically did that but at a different phase. Also note that the previous iteration used a build-only jlink plugin so as to satisfy the build-time only approach, yet it ran as part of the plugin-pipeline which wasn't desired either. But it was something similar to what you seem to be describing now. Did I get something wrong? > >> If I understand you correctly, this would be no longer a build-time only approach to produce the "linkable runtime"? It would be some-kind of jlink-option driven approach (as it would run some code that should only run when producing a linkable runtime is requested)? Other than that, it should be fine as the previous iteration basically did that but at a different phase. Also note that the previous iteration used a build-only jlink plugin so as to satisfy the build-time only approach, yet it ran as part of the plugin-pipeline which wasn't desired either. But it was something similar to what you seem to be describing now. Did I get something wrong? > > I think it continues to build time, it's just using some hidden jlink option. So yes, it similar to a previous iteration except that it doesn't run as a plugin the pipeline and the delta goes to the lib directory. > > Let's see what @mlchung says. You've put a lot of work into this so let's see if we can converge to avoid too many more rounds. @AlanBateman @mlchung The latest update now uses the `jlink` build time option `--generate-linkable-runtime` to add needed resources to the `jimage` when a runtime linkable JDK image is being asked for using the configure option. This now runs outside the plugin-pipeline. I think this is what you meant. Sorry it took longer to get back to this... ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2098895722 From jjg at openjdk.org Tue May 7 17:31:29 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 7 May 2024 17:31:29 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v67] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - Remove `--no-fonts` from `MISSING_IN_MAN_PAGE` - Update javadoc.1 troff man page - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - address review feedback, to improve testing of changes to Elements - update copyright years - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - update commonmark-java from 0.21.0 to 0.22.0 - Remove links to `jdk.javadoc` module from `java.compiler` module` - Suppress warnings building tests - ... and 81 more: https://git.openjdk.org/jdk/compare/524aaad9...cc12140a ------------- Changes: https://git.openjdk.org/jdk/pull/16388/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=66 Stats: 26446 lines in 243 files changed: 25749 ins; 257 del; 440 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From vpetko at openjdk.org Tue May 7 20:05:52 2024 From: vpetko at openjdk.org (Vladimir Petko) Date: Tue, 7 May 2024 20:05:52 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Tue, 7 May 2024 10:39:31 GMT, Magnus Ihse Bursie wrote: > I'm not sure why we have `--allow-shlib-undefined`, but changing this should not affect libjvm building. Do you really see a difference in build success/failure depending on that line? Hi, Thank you for looking at the issue!!! Removing the setting should just prevent typos like this from getting into code base. Maybe there was some historical issue that was addressed by it. I did a rebuild on all arches I had access to validate that master does not have any more undefined symbols. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19048#issuecomment-2099206184 From vladimir.petko at canonical.com Tue May 7 20:55:22 2024 From: vladimir.petko at canonical.com (Vladimir Petko) Date: Wed, 8 May 2024 08:55:22 +1200 Subject: undefined symbols in libjvm.so In-Reply-To: <64b3b8a6-1047-4f3d-a90c-3d2cfd097bff@oracle.com> References: <64b3b8a6-1047-4f3d-a90c-3d2cfd097bff@oracle.com> Message-ID: Hi, This is probably an edge-case with assembly-defined symbols. -Wl,z,defs prevents linking a shared library with undefined imports, but does nothing about symbols exported by the library itself that are undefined. -Wl,--allow-shlib-undefined allows linking executable against such library as long as it does not use any of the undefined symbols. I have made a small sample[1] to illustrate the point. Best Regards, Vladimir. [1] https://github.com/vpa1977/linksample On Tue, May 7, 2024 at 10:36?PM Magnus Ihse Bursie wrote: > > Undefined symbols in libjvm.so is no good, and it should not be allowed. > However, I am unsure about your analysis. This flag only affect linking > of executables, not shared libraries. We do set "-Wl,-z,defs" when > linking shared libraries, and this should complain about undefined symbols. > > /Magnus > > On 2024-05-06 21:57, Vladimir Petko wrote: > > Hi, > > > > I have recently encountered bugs caused by undefined symbols in > > libjvm.so[1][2]. The root cause of those issues is the expression in > > make/autoconf/flags-ldflags.m4: > > > > --- > > if test "x$TOOLCHAIN_TYPE" = xgcc; then > > EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined" > > ... > > -- > > > > OpenJDK master builds fine after fixing[1] on the following > > architectures: amd64, i386, armhf, arm64, s390, ppc64el and riscv64. > > > > Would it be possible to consider removing -Wl,--allow-shlib-undefined > > from the build flags? > > > > Best Regards, > > Vladimir. > > > > [1] https://bugs.openjdk.org/browse/JDK-8331541 > > [2] https://bugs.openjdk.org/browse/JDK-8329983 From darcy at openjdk.org Tue May 7 21:18:10 2024 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 7 May 2024 21:18:10 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v56] In-Reply-To: References: <5BLnTYx2hjFyOvw3_RQWLDcPwvREkTII1AaLhdQUB7I=.84043d72-429a-4b9a-a119-57f45d239950@github.com> Message-ID: <2yZ6XIyYiWxsxC0IEVoIxGh69F39u1bNKfQFYlGrUkc=.85ec054c-1714-4438-9999-c58527f7d509@github.com> On Wed, 1 May 2024 20:40:00 GMT, Jonathan Gibbons wrote: > > There should be some quick testing of the new default method on Elements using the VacuousElements implementation; see `test/langtools/tools/javac/processing/model/util/elements` for some examples. > > @jddarcy I've reorganized the tests in this area a bit, and moved the testing for `DocCommentKind` to a new test, which includes testing the default method, using `VacuousElements` (nice trick, that, by the way.). Although now renamed, the older `TestGetDocComments` is now closer to the original form, with the testing for `getDocCommentKind` being moved to a new test class. Creating one VacuousElements was preferable to creating one each time a new default method was added :-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2099322156 From darcy at openjdk.org Tue May 7 21:35:06 2024 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 7 May 2024 21:35:06 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v67] In-Reply-To: References: Message-ID: On Tue, 7 May 2024 17:31:29 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: > > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - Remove `--no-fonts` from `MISSING_IN_MAN_PAGE` > - Update javadoc.1 troff man page > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - address review feedback, to improve testing of changes to Elements > - update copyright years > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - update commonmark-java from 0.21.0 to 0.22.0 > - Remove links to `jdk.javadoc` module from `java.compiler` module` > - Suppress warnings building tests > - ... and 81 more: https://git.openjdk.org/jdk/compare/524aaad9...cc12140a The `javax.lang.model` portions look good; the reminder needs review by others. ------------- Marked as reviewed by darcy (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16388#pullrequestreview-2044237602 From erikj at openjdk.org Wed May 8 01:07:23 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 8 May 2024 01:07:23 GMT Subject: RFR: 8331886: Allow markdown src file overrides Message-ID: For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. ------------- Commit messages: - JDK-8331886 Changes: https://git.openjdk.org/jdk/pull/19132/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19132&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331886 Stats: 77 lines in 2 files changed: 16 ins; 11 del; 50 mod Patch: https://git.openjdk.org/jdk/pull/19132.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19132/head:pull/19132 PR: https://git.openjdk.org/jdk/pull/19132 From djelinski at openjdk.org Wed May 8 06:40:53 2024 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 8 May 2024 06:40:53 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: <_JH_hctBPUlUt3puwBIoDzippE90OCMViJDiPV44u4w=.43bb386b-53ed-4f79-9b0f-f24c4dae39f5@github.com> On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra Looks good to me. Mach5 and GHA agree that we don't need explicit `allow-shlib-undefined` anymore. On a side note, our use of `.type` appears to serve no purpose other than introducing errors. Perhaps we could remove all the useless `.type` lines in a follow up PR. ------------- Marked as reviewed by djelinski (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19048#pullrequestreview-2044752790 From sgehwolf at openjdk.org Wed May 8 09:32:05 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 8 May 2024 09:32:05 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v26] In-Reply-To: References: Message-ID: On Tue, 7 May 2024 16:52:12 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app being modularized). >> >> The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. >> >> Basic usage example: >> >> $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) >> $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) >> $ ls ../linux-x86_64-server-release/images/jdk/jmods >> java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod >> java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod >> java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod >> java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.i... > > Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 105 commits: > > - Generate the runtime image link diff at jlink time > > But only do that once the plugin-pipeline has run. The generation is > enabled with the hidden option '--generate-linkable-runtime' and > the resource pools available at jlink time are being used to generate > the diff. > - Merge branch 'master' into jdk-8311302-jmodless-link > - Use shorter name for the build tool > - Review feedback from Erik J. > - Remove dependency on CDS which isn't needed anymore > - Fix coment > - Fix comment > - Fix typo > - Revert some now unneded build changes > - Follow build tools naming convention > - ... and 95 more: https://git.openjdk.org/jdk/compare/23a72a1f...67aea4ca GHA test failures [gc/shenandoah/oom/TestThreadFailure](https://github.com/jerboaa/jdk/actions/runs/8989206765#user-content-gc_shenandoah_oom_testthreadfailure) on Mac x86_64 and [java/util/zip/ZipFile/ZipSourceCache](https://github.com/jerboaa/jdk/actions/runs/8989206765#user-content-java_util_zip_zipfile_zipsourcecache) on Windows x86_64 seem unrelated to this patch. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2100159861 From ihse at openjdk.org Wed May 8 10:12:52 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 10:12:52 GMT Subject: RFR: 8331886: Allow markdown src file overrides In-Reply-To: References: Message-ID: On Wed, 8 May 2024 01:02:41 GMT, Erik Joelsson wrote: > For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. > > This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. > > The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. > > The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. make/common/ProcessMarkdown.gmk line 43: > 41: # Only continue if this target file hasn't been processed already. This lets > 42: # the first found source file override any other with the same name. > 43: $$(call PrintVar, $1_$2_INPUT_FILE) Left-over debug code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19132#discussion_r1593782745 From ihse at openjdk.org Wed May 8 10:15:55 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 10:15:55 GMT Subject: RFR: 8331886: Allow markdown src file overrides In-Reply-To: References: Message-ID: On Wed, 8 May 2024 01:02:41 GMT, Erik Joelsson wrote: > For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. > > This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. > > The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. > > The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. Looks good (apart from the PrintVar) This was particularly hard to review, since neither Github nor Webrev could make any sense of this. For other reviewers, I can add that the only substantial change in ProcessMarkdown.gmk is wrapping the entire function body in a `ifeq ($$($1_$2_OUTPUT_FILE_PROCESSED), )` check (and updating this variable upon entry). ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19132#pullrequestreview-2045243623 PR Comment: https://git.openjdk.org/jdk/pull/19132#issuecomment-2100237486 From ihse at openjdk.org Wed May 8 11:05:54 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 11:05:54 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra Ok, I think I'm understanding this better now. The error occurs since the `.type`, `.globl` and `.hidden` directives do not match -- we define the global symbol to be `SafeFetch32_impl` but then we set the type of the non-existing symbol `_SafeFetch32_impl`. Somehow this tricks the linker into accepting this as an undefined symbol. The `.type` directive is not without purpose -- it sets the type of the symbol to be a function. If omitted, the type will be `NOTYPE`. Apparently this does not break the program but there is no reason to remove the `.type` directives. Instead, we should have a common macro, something like this: #define DECLARE_FUNC(func) \ .globl func ; \ .hidden func ; \ .type func, at function ; \ func: in a shared file, and include and use it for all symbols in our hotspot assembly files. I was thinking somewhat along those lines last time I was poking around there (when introducing .hidden for the removal of the hotspot map files), but never really got around to it. This bug really shows why we should do that. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19048#issuecomment-2100322142 From ihse at openjdk.org Wed May 8 11:10:52 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 11:10:52 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra So, after sleeping on this, here is my analysis/verdict: 1) The fix on renaming the `.type` directive looks good. This is the actual bug fix. 2) We can remove `--allow-shlib-undefined`. That just overrides `--no-allow-shlib- undefined`, which has been the default for years and years, and there is no good reason to have it. It is not strictly related to the bug fix per se, but we can do that in this PR as well to keep things simpler. 3) The reason this could happen was since we used assembler code. A similar problem in C++ code would not have been allowed by the compiler. 4) If we introduce a common macro as I suggest, we can avoid this ever happening again. So while the linker cannot guarantee the consistency when linking libjvm.so (which I really would have liked), by using a stricter scheme when defining symbols in assembly code, we can make sure to avoid it. ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19048#pullrequestreview-2045354117 From ihse at openjdk.org Wed May 8 11:37:52 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 11:37:52 GMT Subject: RFR: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra I created https://bugs.openjdk.org/browse/JDK-8331921 to track setting up proper assembly functions consistently. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19048#issuecomment-2100375665 From erikj at openjdk.org Wed May 8 14:09:16 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 8 May 2024 14:09:16 GMT Subject: RFR: 8331939: Add custom hook for TestImage Message-ID: We need a custom hook in TestImage.gmk to modify behavior when building with custom source. ------------- Commit messages: - JDK-8331939 Changes: https://git.openjdk.org/jdk/pull/19139/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19139&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331939 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19139.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19139/head:pull/19139 PR: https://git.openjdk.org/jdk/pull/19139 From erikj at openjdk.org Wed May 8 14:29:18 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 8 May 2024 14:29:18 GMT Subject: RFR: 8331886: Allow markdown src file overrides [v2] In-Reply-To: References: Message-ID: > For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. > > This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. > > The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. > > The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. Erik Joelsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Remove debug printing - Merge branch 'master' into JDK-8331886-override-markdown - JDK-8331886 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19132/files - new: https://git.openjdk.org/jdk/pull/19132/files/0bc0a668..17fee013 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19132&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19132&range=00-01 Stats: 15 lines in 2 files changed: 11 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/19132.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19132/head:pull/19132 PR: https://git.openjdk.org/jdk/pull/19132 From ihse at openjdk.org Wed May 8 14:57:16 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 14:57:16 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions Message-ID: As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. ------------- Commit messages: - Fix copyright headers - Fix building on macos/aarch64 - Use % instead of @ due to arm assembler - 8331921: Hotspot assembler files should use common logic to setup exported functions Changes: https://git.openjdk.org/jdk/pull/19138/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19138&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331921 Stats: 604 lines in 22 files changed: 124 ins; 347 del; 133 mod Patch: https://git.openjdk.org/jdk/pull/19138.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19138/head:pull/19138 PR: https://git.openjdk.org/jdk/pull/19138 From ihse at openjdk.org Wed May 8 14:57:16 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 14:57:16 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions In-Reply-To: References: Message-ID: <6-pc1tNFv2LheyrQM4QcQyF0BveywaPWGihMx5lAswA=.001ce14c-bd15-4a36-a77f-3e6bad762658@github.com> On Wed, 8 May 2024 13:30:59 GMT, Magnus Ihse Bursie wrote: > As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. > > We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. When making a build comparison, the build result was identical on Windows (of course), and macOS. On linux/x64 and linux/aarch64, there was a slight difference, in that a few functions did not properly set `.type`, so they appeared as `NOTYPE` instead of `FUNC` in the symbol table. I have not done comparison builds for other linux platforms, but I assume that GHA passing is good enough. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19138#issuecomment-2100776636 From ihse at openjdk.org Wed May 8 14:57:56 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 14:57:56 GMT Subject: RFR: 8331886: Allow markdown src file overrides [v2] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 14:29:18 GMT, Erik Joelsson wrote: >> For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. >> >> This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. >> >> The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. >> >> The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. > > Erik Joelsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - Remove debug printing > - Merge branch 'master' into JDK-8331886-override-markdown > - JDK-8331886 Marked as reviewed by ihse (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19132#pullrequestreview-2045917930 From ihse at openjdk.org Wed May 8 15:01:07 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 15:01:07 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v26] In-Reply-To: References: Message-ID: On Tue, 7 May 2024 16:52:12 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app being modularized). >> >> The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. >> >> Basic usage example: >> >> $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) >> $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) >> $ ls ../linux-x86_64-server-release/images/jdk/jmods >> java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod >> java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod >> java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod >> java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.i... > > Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 105 commits: > > - Generate the runtime image link diff at jlink time > > But only do that once the plugin-pipeline has run. The generation is > enabled with the hidden option '--generate-linkable-runtime' and > the resource pools available at jlink time are being used to generate > the diff. > - Merge branch 'master' into jdk-8311302-jmodless-link > - Use shorter name for the build tool > - Review feedback from Erik J. > - Remove dependency on CDS which isn't needed anymore > - Fix coment > - Fix comment > - Fix typo > - Revert some now unneded build changes > - Follow build tools naming convention > - ... and 95 more: https://git.openjdk.org/jdk/compare/23a72a1f...67aea4ca The new build changes look extremely trivial. From a pure build PoV, this is a much simpler solution. ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14787#pullrequestreview-2045924409 From stuefe at openjdk.org Wed May 8 16:10:05 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Wed, 8 May 2024 16:10:05 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default Message-ID: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). I tested this patch on: - x64 Linux - x64 Linux, crossbuilding to aarch64 - building natively on aarch64 Linux ------------- Commit messages: - aarch64-should-default-to-64k-alignment-for-cds-regions Changes: https://git.openjdk.org/jdk/pull/19142/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19142&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331942 Stats: 12 lines in 1 file changed: 11 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19142.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19142/head:pull/19142 PR: https://git.openjdk.org/jdk/pull/19142 From sgehwolf at openjdk.org Wed May 8 16:55:02 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 8 May 2024 16:55:02 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> Message-ID: On Thu, 4 Apr 2024 20:56:55 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request incrementally with three additional commits since the last revision: >> >> - Use shorter name for the build tool >> - Review feedback from Erik J. >> - Remove dependency on CDS which isn't needed anymore > > Overall, I think the build system changes in the current revision of the patch look good, but please let me know for a deeper review when things have stabilized. Thanks for the review, @magicus! ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2101006001 From aph at openjdk.org Wed May 8 17:03:53 2024 From: aph at openjdk.org (Andrew Haley) Date: Wed, 8 May 2024 17:03:53 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: <3_HS3C3-Z0JDz4yt42FX0Y3fhdcETCz0lHGAJBOh6ZI=.48fc9fc2-8ffe-4cf5-a46d-61882ab408bd@github.com> On Wed, 8 May 2024 15:14:16 GMT, Thomas Stuefe wrote: > On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. > > Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). > > I tested this patch on: > - x64 Linux > - x64 Linux, crossbuilding to aarch64 > - building natively on aarch64 Linux This is obviously correct. Otherwise, the CDS archive will only work if the JDK happens to have been built on a machine with greater or equal page size. Does the default `compatible-cds-alignment=false` make any sense anywhere on other platforms, though? We might simply make compatibility the default. ------------- Marked as reviewed by aph (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19142#pullrequestreview-2046199994 From mli at openjdk.org Wed May 8 17:20:11 2024 From: mli at openjdk.org (Hamlin Li) Date: Wed, 8 May 2024 17:20:11 GMT Subject: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5] In-Reply-To: <0cUurmXlMJ_B66Wy1umd2n4r9ve7_Q4WOU0ffMd8s5Y=.bbc93b65-382c-4139-aaec-cb835d94a06e@github.com> References: <0cUurmXlMJ_B66Wy1umd2n4r9ve7_Q4WOU0ffMd8s5Y=.bbc93b65-382c-4139-aaec-cb835d94a06e@github.com> Message-ID: > Hi, > Can you help to review the patch? > This pr is based on previous work and discussion in [pr 16234](https://github.com/openjdk/jdk/pull/16234), [pr 18294](https://github.com/openjdk/jdk/pull/18294). > > Compared with previous prs, the major change in this pr is to integrate the source of sleef (for the steps, please check `src/jdk.incubator.vector/linux/native/libvectormath/README`), rather than depends on external sleef things (header or lib) at build or run time. > Besides of this change, also modify the previous changes accordingly, e.g. remove some uncessary files or changes especially in make dir of jdk. > > Besides of the code changes, one important task is to handle the legal process. > > Thanks! > > ## Performance > NOTE: > * `Src` means implementation in this pr, i.e. without depenency on external sleef. > * `Disabled` means disable intrinsics by `-XX:-UseVectorStubs` > * `system_sleef` means implementation in [previous pr 18294](https://github.com/openjdk/jdk/pull/18294), i.e. build and run jdk with depenency on external sleef. > > Basically, the perf data below shows that > * this implementation has better performance than previous version in [pr 18294](https://github.com/openjdk/jdk/pull/18294), > * and both sleef versions has much better performance compared with non-sleef version. > > |Benchmark |(size)|Src |Units|system_sleef|(system_sleef-Src)/Src|Diabled |(Disable-Src)/Src| > |------------------------------|------|---------|-----|------------|----------------------|---------|-----------------| > |3472:Double128Vector.ACOS |1024 |8546.842 |ns/op|8516.007 |-0.004 |16799.273|0.966 | > |3473:Double128Vector.ASIN |1024 |6864.656 |ns/op|6987.328 |0.018 |16602.442|1.419 | > |3474:Double128Vector.ATAN |1024 |11489.255|ns/op|12261.800 |0.067 |26329.320|1.292 | > |3475:Double128Vector.ATAN2 |1024 |16661.170|ns/op|17234.472 |0.034 |42084.100|1.526 | > |3476:Double128Vector.CBRT |1024 |18999.387|ns/op|20298.458 |0.068 |35998.688|0.895 | > |3477:Double128Vector.COS |1024 |14081.857|ns/op|14846.117 |0.054 |24420.692|0.734 | > |3478:Double128Vector.COSH |1024 |12202.306|ns/op|12237.772 |0.003 |21343.863|0.749 | > |3479:Double128Vector.EXP |1024 |4553.108 |ns/op|4777.638 |0.049 |20155.903|3.427 | > |3480:D... Hamlin Li has updated the pull request incrementally with one additional commit since the last revision: add inline header file for riscv64 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18605/files - new: https://git.openjdk.org/jdk/pull/18605/files/cbcd4634..bd9c0931 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18605&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18605&range=03-04 Stats: 7073 lines in 1 file changed: 7073 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18605.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18605/head:pull/18605 PR: https://git.openjdk.org/jdk/pull/18605 From mli at openjdk.org Wed May 8 17:25:59 2024 From: mli at openjdk.org (Hamlin Li) Date: Wed, 8 May 2024 17:25:59 GMT Subject: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2] In-Reply-To: References: <0cUurmXlMJ_B66Wy1umd2n4r9ve7_Q4WOU0ffMd8s5Y=.bbc93b65-382c-4139-aaec-cb835d94a06e@github.com> Message-ID: On Tue, 9 Apr 2024 20:10:36 GMT, Mikael Vidstedt wrote: >> Hamlin Li has updated the pull request incrementally with two additional commits since the last revision: >> >> - disable unused-function warnings; add log msg >> - minor > > Thank you for the update and for working on this in general. > > I've started working on JDK-8329816, preparing the change for the SLEEF specific part of the change. Specifically, I'm currently planning on including the three SLEEF header files, the README and a legal/sleef.md file in that change. Let me know if you have any thoughts/concerns. > > Also, just for my understanding, would love to understand your thoughts on the future here (I apologize if this was already discussed elsewhere): > > It seem like SLEEF is (sort of) limited to linux at this point (the SLEEF README mentions that "Due to limited test capacities, SLEEF is currently only officially supported on Linux with gcc or llvm/clang." ). That same README does, however, indicate good test coverage on several architectures in addition to aarch64 (including x86_64, PPC, RISC-V). With that in mind, it looks like we could potentially use SLEEF for other architectures on linux in the future? And potentially additional operating systems as well? Hey @vidmik , I just added inline header file for riscv64, hope to help avoid go through the legal process for arm and riscv header files separately. For implementation on riscv64, I will put it in another pr. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18605#issuecomment-2101055673 From mli at openjdk.org Wed May 8 17:41:23 2024 From: mli at openjdk.org (Hamlin Li) Date: Wed, 8 May 2024 17:41:23 GMT Subject: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6] In-Reply-To: <0cUurmXlMJ_B66Wy1umd2n4r9ve7_Q4WOU0ffMd8s5Y=.bbc93b65-382c-4139-aaec-cb835d94a06e@github.com> References: <0cUurmXlMJ_B66Wy1umd2n4r9ve7_Q4WOU0ffMd8s5Y=.bbc93b65-382c-4139-aaec-cb835d94a06e@github.com> Message-ID: <2VxBcA-0qxX3N35u5vnKyT920nTH5llf2k5_sKQcqT8=.23823400-536f-458e-baf7-53f99547abc4@github.com> > Hi, > Can you help to review the patch? > This pr is based on previous work and discussion in [pr 16234](https://github.com/openjdk/jdk/pull/16234), [pr 18294](https://github.com/openjdk/jdk/pull/18294). > > Compared with previous prs, the major change in this pr is to integrate the source of sleef (for the steps, please check `src/jdk.incubator.vector/linux/native/libvectormath/README`), rather than depends on external sleef things (header or lib) at build or run time. > Besides of this change, also modify the previous changes accordingly, e.g. remove some uncessary files or changes especially in make dir of jdk. > > Besides of the code changes, one important task is to handle the legal process. > > Thanks! > > ## Performance > NOTE: > * `Src` means implementation in this pr, i.e. without depenency on external sleef. > * `Disabled` means disable intrinsics by `-XX:-UseVectorStubs` > * `system_sleef` means implementation in [previous pr 18294](https://github.com/openjdk/jdk/pull/18294), i.e. build and run jdk with depenency on external sleef. > > Basically, the perf data below shows that > * this implementation has better performance than previous version in [pr 18294](https://github.com/openjdk/jdk/pull/18294), > * and both sleef versions has much better performance compared with non-sleef version. > > |Benchmark |(size)|Src |Units|system_sleef|(system_sleef-Src)/Src|Diabled |(Disable-Src)/Src| > |------------------------------|------|---------|-----|------------|----------------------|---------|-----------------| > |3472:Double128Vector.ACOS |1024 |8546.842 |ns/op|8516.007 |-0.004 |16799.273|0.966 | > |3473:Double128Vector.ASIN |1024 |6864.656 |ns/op|6987.328 |0.018 |16602.442|1.419 | > |3474:Double128Vector.ATAN |1024 |11489.255|ns/op|12261.800 |0.067 |26329.320|1.292 | > |3475:Double128Vector.ATAN2 |1024 |16661.170|ns/op|17234.472 |0.034 |42084.100|1.526 | > |3476:Double128Vector.CBRT |1024 |18999.387|ns/op|20298.458 |0.068 |35998.688|0.895 | > |3477:Double128Vector.COS |1024 |14081.857|ns/op|14846.117 |0.054 |24420.692|0.734 | > |3478:Double128Vector.COSH |1024 |12202.306|ns/op|12237.772 |0.003 |21343.863|0.749 | > |3479:Double128Vector.EXP |1024 |4553.108 |ns/op|4777.638 |0.049 |20155.903|3.427 | > |3480:D... Hamlin Li has updated the pull request incrementally with one additional commit since the last revision: update header files for arm ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18605/files - new: https://git.openjdk.org/jdk/pull/18605/files/bd9c0931..36415c34 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18605&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18605&range=04-05 Stats: 20 lines in 2 files changed: 14 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/18605.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18605/head:pull/18605 PR: https://git.openjdk.org/jdk/pull/18605 From mikael at openjdk.org Wed May 8 18:06:51 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Wed, 8 May 2024 18:06:51 GMT Subject: RFR: 8331939: Add custom hook for TestImage In-Reply-To: References: Message-ID: <3JORgqNqm_4oofeWc7K_h6jwR3M734DoDd1Iq86fhGs=.c8034f5f-5560-4f26-baf4-e4e39a7f509f@github.com> On Wed, 8 May 2024 14:03:48 GMT, Erik Joelsson wrote: > We need a custom hook in TestImage.gmk to modify behavior when building with custom source. Marked as reviewed by mikael (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19139#pullrequestreview-2046326105 From stuefe at openjdk.org Wed May 8 18:12:52 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Wed, 8 May 2024 18:12:52 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <3_HS3C3-Z0JDz4yt42FX0Y3fhdcETCz0lHGAJBOh6ZI=.48fc9fc2-8ffe-4cf5-a46d-61882ab408bd@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> <3_HS3C3-Z0JDz4yt42FX0Y3fhdcETCz0lHGAJBOh6ZI=.48fc9fc2-8ffe-4cf5-a46d-61882ab408bd@github.com> Message-ID: On Wed, 8 May 2024 17:01:26 GMT, Andrew Haley wrote: > This is obviously correct. Otherwise, the CDS archive will only work if the JDK happens to have been built on a machine with greater or equal page size. > > Does the default `compatible-cds-alignment=false` make any sense anywhere on other platforms, though? We might simply make compatibility the default. The configure option is also evaluated for MacOS x64 to enforce an alignment of 16K, to be able to run on MacOS aarch64 in Rosetta. Seeing how MacOS x64 is not really important anymore, and losses due to 16K alignment are small, I'd be fine with setting the default to compatible. It would be a simpler patch, certainly. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19142#issuecomment-2101138971 From Suchismith.Roy at ibm.com Wed May 8 18:16:28 2024 From: Suchismith.Roy at ibm.com (Suchismith Roy) Date: Wed, 8 May 2024 18:16:28 +0000 Subject: JDK-8170635 -- adding a base library to java In-Reply-To: <7b083ada-a538-406e-aac0-bd5e0dad5353@oracle.com> References: <7b083ada-a538-406e-aac0-bd5e0dad5353@oracle.com> Message-ID: Thanks for the reply @Magnus Ihse Bursie Is there any example of PRs which create such libraries that I can refer to ? Is OSAL similar to how os.cpp is defined and respective platforms implement them ? From: Magnus Ihse Bursie Date: Tuesday, 7 May 2024 at 6:18?PM To: Thomas St?fe , Suchismith Roy Cc: build-dev at openjdk.org Subject: [EXTERNAL] Re: JDK-8170635 -- adding a base library to java On 2024-05-06 16:36, Thomas St?fe wrote: > Not sure if you meant to address this mail to a specific person. I > assume with proposal you mean this: > https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? > > If yes, my proposal was to move dladdr out of the OpenJDK code base > into an independent library that would be maintained by IBM, > hopefully, and would be a prerequisite for building the JDK. > If no, whose proposal did you mean? Oh, this is an old bug you're picking up Suchismith! I read through the discussion from 2016. It seems that the suggestion to make an external 3rd party library was only supported by Thomas, and that the general agreement among the other participants was that we should have a general, base-level "OSAL" (OS abstraction library) in the JDK, that could be used by both Hotspot and libjli, as well as other JDK libraries. Creating such a library would be a much larger effort than just adding a AIX implementation of dladdr to it, if it existed. The current structure of the JDK does not readily lend itself to such a library, neither in terms of source code layout nor build system. With that said, I do think it would be good if we had such a library. There are more cases than the AIX dladdr issue that is duplicated, like jio_snprintf() and friends. This has actually caused some headaches when doing static builds, since duplication of these functions are not allowed when creating a single linked instance. (The current duplication in dynamic libraries is just ugly and bad programming, not a compilation error.) But it is a much larger question than just fixing an AIX issue. /Magnus -------------- next part -------------- An HTML attachment was scrubbed... URL: From erikj at openjdk.org Wed May 8 22:00:57 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 8 May 2024 22:00:57 GMT Subject: Integrated: 8331939: Add custom hook for TestImage In-Reply-To: References: Message-ID: On Wed, 8 May 2024 14:03:48 GMT, Erik Joelsson wrote: > We need a custom hook in TestImage.gmk to modify behavior when building with custom source. This pull request has now been integrated. Changeset: 0d1216c7 Author: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/0d1216c7a1dc215550ac769afc21dea91c638215 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8331939: Add custom hook for TestImage Reviewed-by: mikael ------------- PR: https://git.openjdk.org/jdk/pull/19139 From erikj at openjdk.org Wed May 8 22:00:57 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 8 May 2024 22:00:57 GMT Subject: Integrated: 8331886: Allow markdown src file overrides In-Reply-To: References: Message-ID: On Wed, 8 May 2024 01:02:41 GMT, Erik Joelsson wrote: > For c, c++ and java source files, we have a built in system for letting more specific files override if there are multiple files with the same name found, by letting the first found file with a given name override any later found files with that name. This is typically used for OS specific variants or when needing to override a source file with a file from a custom source set. We would like to make it possible to do the same for markdown files used to generate man pages. > > This will not have an immediate use i OpenJDK, but is needed for a custom override in proprietary code. > > The change in Docs.gmk removes unnecessary extra loops so that SetupProcessMarkdown is called only once per module. This is necessary for the override mechanism to kick in for each module src set. > > The logic in ProcessMarkdown.gmk is more or less copied from SetupNativeCompilation. This pull request has now been integrated. Changeset: 588e314e Author: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/588e314e4b96f2a48d46ab8a088a7b8d26be318d Stats: 75 lines in 2 files changed: 14 ins; 11 del; 50 mod 8331886: Allow markdown src file overrides Reviewed-by: ihse ------------- PR: https://git.openjdk.org/jdk/pull/19132 From vpetko at openjdk.org Wed May 8 22:38:56 2024 From: vpetko at openjdk.org (Vladimir Petko) Date: Wed, 8 May 2024 22:38:56 GMT Subject: Integrated: 8331541: [i386] linking with libjvm.so fails after JDK-8283326 In-Reply-To: References: Message-ID: On Thu, 2 May 2024 08:23:38 GMT, Vladimir Petko wrote: > Hi, > > The `.type _SafeFetch32_impl, at function` symbol declaration contains a spurious underscore causing an undefined symbol in libjvm.so. > > I am not sure about change in default flags. I have removed the flag that allows linking with undefined symbols > because having the flag on might cause bugs like this one or https://bugs.openjdk.org/browse/JDK-8329983 as the build succeeds even if some symbols are not defined. > Openjdk builds successfully without it on amd64, i386, armhf, arm64, s390, ppc64el and riscv64 with this change[1]. riscv64 build was done locally inside vm: > > Finished building target 'images' in configuration 'linux-riscv64-server-release' > ubuntu at ubuntu:~/jdk$ > > Unfortunately I do not know why it was introduced, so I might be missing something. > I am happy to drop it from this one or move it to a separate issue/pr. > > [1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/16076564/+listing-archive-extra This pull request has now been integrated. Changeset: 2d622152 Author: Vladimir Petko Committer: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/2d622152b07bba0aba8fd5b1e24293e28d6e69f5 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod 8331541: [i386] linking with libjvm.so fails after JDK-8283326 Reviewed-by: djelinski, ihse ------------- PR: https://git.openjdk.org/jdk/pull/19048 From ihse at openjdk.org Wed May 8 22:40:12 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 8 May 2024 22:40:12 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v26] In-Reply-To: References: Message-ID: <7GEk4PVZYWDSKt8bWCVSHD4f8zFmmJNWwJojxrFgwC4=.10d95786-32d8-40e8-bb21-1647da3ee39c@github.com> On Tue, 7 May 2024 16:52:12 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app being modularized). >> >> The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. >> >> Basic usage example: >> >> $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) >> $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) >> $ ls ../linux-x86_64-server-release/images/jdk/jmods >> java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod >> java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod >> java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod >> java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.i... > > Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 105 commits: > > - Generate the runtime image link diff at jlink time > > But only do that once the plugin-pipeline has run. The generation is > enabled with the hidden option '--generate-linkable-runtime' and > the resource pools available at jlink time are being used to generate > the diff. > - Merge branch 'master' into jdk-8311302-jmodless-link > - Use shorter name for the build tool > - Review feedback from Erik J. > - Remove dependency on CDS which isn't needed anymore > - Fix coment > - Fix comment > - Fix typo > - Revert some now unneded build changes > - Follow build tools naming convention > - ... and 95 more: https://git.openjdk.org/jdk/compare/23a72a1f...67aea4ca make/Images.gmk line 100: > 98: > 99: ifeq ($(JLINK_PRODUCE_RUNTIME_LINK_JDK), true) > 100: JLINK_JDK_EXTRA_OPTS := $(JLINK_JDK_EXTRA_OPTS) --generate-linkable-runtime I just noticed this slight improvement: Suggestion: JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1594774220 From duke at openjdk.org Thu May 9 01:12:17 2024 From: duke at openjdk.org (xiaotaonan) Date: Thu, 9 May 2024 01:12:17 GMT Subject: RFR: 8331952: --enable-compatible-cds-alignment should be enabled by default Message-ID: --enable-compatible-cds-alignment should be enabled by default ------------- Commit messages: - --enable-compatible-cds-alignment should be enabled by default Changes: https://git.openjdk.org/jdk/pull/19150/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19150&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331952 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19150.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19150/head:pull/19150 PR: https://git.openjdk.org/jdk/pull/19150 From duke at openjdk.org Thu May 9 04:02:07 2024 From: duke at openjdk.org (duke) Date: Thu, 9 May 2024 04:02:07 GMT Subject: Withdrawn: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking In-Reply-To: References: Message-ID: On Wed, 17 Jan 2024 00:14:58 GMT, Jiangli Zhou wrote: > Please review this PR with a simple solution for resolving duplicate `Thread` symbol issue. In https://github.com/openjdk/jdk/pull/14808 comments, there was an alternative suggestion to redefine the symbol at build time, such as using`-DThread=HotSpotThread`. That would not address issues when symbol were references as string literals. https://github.com/openjdk/jdk/pull/14808 also discussed using namespace for hotspot code, which can have multiple benefits/motivations. We could explore further using namespace with more consensus on that approach. > > Contributed by Chuck Rasbold and @jianglizhou. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/17456 From stuefe at openjdk.org Thu May 9 05:07:56 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Thu, 9 May 2024 05:07:56 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: On Wed, 8 May 2024 15:14:16 GMT, Thomas Stuefe wrote: > On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. > > Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). > > I tested this patch on: > - x64 Linux > - x64 Linux, crossbuilding to aarch64 > - building natively on aarch64 Linux Does anyone else have an opinion on this matter? The question is: "Should we enable cds-compatible alignment in the configure options by default generally, not only for Linux aarch64" ? This would, in addition to the proposed change affecting Linux on aarch64, also affect MacOS x64. JVMs built there would be able to run, by default, in Rosetta. At the price of sligthly increased archive size of a dozen KB or so. If nobody objects, I will do that since I like the simplicity of it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19142#issuecomment-2101941697 From jwaters at openjdk.org Thu May 9 07:50:00 2024 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 9 May 2024 07:50:00 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis [v2] In-Reply-To: References: Message-ID: > WIP > > This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Add check for compiler in configure - 8330988: Implementation of 8288293: Windows/gcc Port for hsdis ------------- Changes: https://git.openjdk.org/jdk/pull/18915/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18915&range=01 Stats: 334 lines in 19 files changed: 154 ins; 25 del; 155 mod Patch: https://git.openjdk.org/jdk/pull/18915.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18915/head:pull/18915 PR: https://git.openjdk.org/jdk/pull/18915 From jwaters at openjdk.org Thu May 9 07:50:01 2024 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 9 May 2024 07:50:01 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis In-Reply-To: References: Message-ID: On Wed, 24 Apr 2024 09:15:21 GMT, Magnus Ihse Bursie wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Please mark the PR as draft it is not intended for review. @magicus I think I might need some help here. Currently all the Cygwin stuff is gated behind ifeq ($(TOOLCHAIN_TYPE), microsoft) checks... should they be behind isBuildOsEnv cygwin checks instead? I don't know how to add support for Cygwin gcc for most of hsdis, since it is quite different from the more modern gcc distributions that are found in places like MSYS2 and MINGW64. But most of the existing logic seems to accomodate more for the Microsoft compiler than it is concerned about the OS environment being used, and for this reason I can't tell which of the 2 checks to use for the existing hack that switches from microsoft to gcc. Also, gcc doesn't require FIXPATH, but Microsoft does, but I don't want to check for microsoft inside TOOLCHAIN_FIND_COMPILER, what should I do instead to ensure gcc doesn't get FIXPATH while Microsoft does? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2097196121 From jwaters at openjdk.org Thu May 9 07:56:51 2024 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 9 May 2024 07:56:51 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis In-Reply-To: References: Message-ID: <77xRfJh_yNfE406Tl9KCpkdlOvGQGzayTUe3fuej-QQ=.3d33f404-3a20-4836-91aa-00469a46018f@github.com> On Wed, 24 Apr 2024 09:15:21 GMT, Magnus Ihse Bursie wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Please mark the PR as draft it is not intended for review. Also @magicus, what is the typical path passed to --with-binutils like on Windows? Something like --with-binutils=/c/Users/vertig0/Downloads/binutils-2.42 doesn't work correctly, since the include path to dis-asm.h would then become `#include "/c/Users/vertig0/Downloads/binutils-2.42/include/dis-asm.h"` Which causes a configure check to fail on the compile stage since gcc cannot recognise the MINGW-esque /c/ as a drive, and then causes configure to erroneously report binutils as using the Old API when it's in fact using the New API. --with-binutils=C:/Users/vertig0/Downloads/binutils-2.42 on the other hand works as expected. Should there be a fixup for the path there so gcc can recognise it properly? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2102146604 From adinn at openjdk.org Thu May 9 08:31:54 2024 From: adinn at openjdk.org (Andrew Dinn) Date: Thu, 9 May 2024 08:31:54 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: On Thu, 9 May 2024 05:04:47 GMT, Thomas Stuefe wrote: >> On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. >> >> Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). >> >> I tested this patch on: >> - x64 Linux >> - x64 Linux, crossbuilding to aarch64 >> - building natively on aarch64 Linux > > Does anyone else have an opinion on this matter? The question is: > > "Should we enable cds-compatible alignment in the configure options by default generally, not only for Linux aarch64" ? > > This would, in addition to the proposed change affecting Linux on aarch64, also affect MacOS x64. JVMs built there would be able to run, by default, in Rosetta. At the price of sligthly increased archive size of a dozen KB or so. > > If nobody objects, I will do that since I like the simplicity of it. @tstuefe We already have an issue to reset the default to true (raised by @iklam) https://bugs.openjdk.org/browse/JDK-8331952 ------------- PR Comment: https://git.openjdk.org/jdk/pull/19142#issuecomment-2102202184 From stuefe at openjdk.org Thu May 9 09:57:52 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Thu, 9 May 2024 09:57:52 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: On Thu, 9 May 2024 05:04:47 GMT, Thomas Stuefe wrote: >> On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. >> >> Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). >> >> I tested this patch on: >> - x64 Linux >> - x64 Linux, crossbuilding to aarch64 >> - building natively on aarch64 Linux > > Does anyone else have an opinion on this matter? The question is: > > "Should we enable cds-compatible alignment in the configure options by default generally, not only for Linux aarch64" ? > > This would, in addition to the proposed change affecting Linux on aarch64, also affect MacOS x64. JVMs built there would be able to run, by default, in Rosetta. At the price of sligthly increased archive size of a dozen KB or so. > > If nobody objects, I will do that since I like the simplicity of it. > @tstuefe We already have an issue to reset the default to true (raised by @iklam) > > https://bugs.openjdk.org/browse/JDK-8331952 Okay. I see it was created yesterday evening. @iklam how do you want to handle this? Do you want to proceed with 8331952 and I close this as duplicate? Or vice versa? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19142#issuecomment-2102339405 From erikj at openjdk.org Thu May 9 13:21:53 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 9 May 2024 13:21:53 GMT Subject: RFR: 8331952: --enable-compatible-cds-alignment should be enabled by default In-Reply-To: References: Message-ID: On Thu, 9 May 2024 01:07:26 GMT, xiaotaonan wrote: > --enable-compatible-cds-alignment should be enabled by default Build change looks ok. I think this should be approved by someone from hotspot as well. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19150#pullrequestreview-2047945852 From jlahoda at openjdk.org Thu May 9 13:57:03 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 9 May 2024 13:57:03 GMT Subject: Integrated: 8327476: Upgrade JLine to 3.26.1 In-Reply-To: References: Message-ID: On Wed, 6 Mar 2024 21:20:50 GMT, Jan Lahoda wrote: > This is a patch that: > a) upgrades the JLine inside the JDK to 3.25.1 > b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend > > Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are: > - fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945 > - disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily > > There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects: > https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm > https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal > the patch is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff > > I've also cleaned the patch a little removing most of the changes for the rename. The result is here: > https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff This pull request has now been integrated. Changeset: aaa90b30 Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/aaa90b3005c85852971203ce6feb88e7091e167b Stats: 13181 lines in 144 files changed: 5784 ins; 5349 del; 2048 mod 8327476: Upgrade JLine to 3.26.1 Reviewed-by: ihse, vromero ------------- PR: https://git.openjdk.org/jdk/pull/18142 From iklam at openjdk.org Thu May 9 17:07:52 2024 From: iklam at openjdk.org (Ioi Lam) Date: Thu, 9 May 2024 17:07:52 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: <8iYNtl4xOqm5tGUDjFzfrTH9MD5usYjeEyEJ94ggXhY=.ca0a14e2-dffc-48cf-b4e4-cd4700f9809c@github.com> On Wed, 8 May 2024 15:14:16 GMT, Thomas Stuefe wrote: > On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. > > Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). > > I tested this patch on: > - x64 Linux > - x64 Linux, crossbuilding to aarch64 > - building natively on aarch64 Linux Looks good to me. I will close my JBS issue as a duplicate of this issue. Thanks ------------- Marked as reviewed by iklam (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19142#pullrequestreview-2048421270 From zsong at openjdk.org Thu May 9 22:19:14 2024 From: zsong at openjdk.org (Zhao Song) Date: Thu, 9 May 2024 22:19:14 GMT Subject: RFR: 8332008: Enable issuestitle check Message-ID: As requested in [SKARA-2170](https://bugs.openjdk.org/browse/SKARA-2170) and [SKARA-2248](https://bugs.openjdk.org/browse/SKARA-2248), now Skara bot is able to warn on trailing periods or leading lowercase letter in issue titles. I am going to update the jcheck configuration to configure issuestitle check as a warning. Given that it's just a warning, it wouldn't block integration. ------------- Commit messages: - JDK-8332008 Changes: https://git.openjdk.org/jdk/pull/19161/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19161&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332008 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19161.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19161/head:pull/19161 PR: https://git.openjdk.org/jdk/pull/19161 From duke at openjdk.org Thu May 9 22:23:02 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Thu, 9 May 2024 22:23:02 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v7] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: whitespace ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/8ff243a2..1ecfdc44 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=05-06 Stats: 753 lines in 9 files changed: 303 ins; 101 del; 349 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From erikj at openjdk.org Thu May 9 22:29:05 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 9 May 2024 22:29:05 GMT Subject: RFR: 8332008: Enable issuestitle check In-Reply-To: References: Message-ID: <69OLbh8qpplyBhBsslbKJqT8KSjfu4s8nCqYxFhXoe8=.e06d60fb-292f-40a1-a75f-267730c619b5@github.com> On Thu, 9 May 2024 20:53:59 GMT, Zhao Song wrote: > As requested in [SKARA-2170](https://bugs.openjdk.org/browse/SKARA-2170) and [SKARA-2248](https://bugs.openjdk.org/browse/SKARA-2248), now Skara bot is able to warn on trailing periods or leading lowercase letter in issue titles. > I am going to update the jcheck configuration to configure issuestitle check as a warning. Given that it's just a warning, it wouldn't block integration. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19161#pullrequestreview-2048931426 From zsong at openjdk.org Thu May 9 22:36:05 2024 From: zsong at openjdk.org (Zhao Song) Date: Thu, 9 May 2024 22:36:05 GMT Subject: RFR: 8332008: Enable issuestitle check In-Reply-To: References: Message-ID: On Thu, 9 May 2024 20:53:59 GMT, Zhao Song wrote: > As requested in [SKARA-2170](https://bugs.openjdk.org/browse/SKARA-2170) and [SKARA-2248](https://bugs.openjdk.org/browse/SKARA-2248), now Skara bot is able to warn on trailing periods or leading lowercase letter in issue titles. > I am going to update the jcheck configuration to configure issuestitle check as a warning. Given that it's just a warning, it wouldn't block integration. Thank you for the review! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19161#issuecomment-2103553031 From zsong at openjdk.org Thu May 9 23:08:08 2024 From: zsong at openjdk.org (Zhao Song) Date: Thu, 9 May 2024 23:08:08 GMT Subject: Integrated: 8332008: Enable issuestitle check In-Reply-To: References: Message-ID: <_Zx4HHqd-0ZDAyXpGvmIZGBkLZh6etI5Jb-vF3ajCQw=.55be1255-894c-4de0-9794-c16470d2d390@github.com> On Thu, 9 May 2024 20:53:59 GMT, Zhao Song wrote: > As requested in [SKARA-2170](https://bugs.openjdk.org/browse/SKARA-2170) and [SKARA-2248](https://bugs.openjdk.org/browse/SKARA-2248), now Skara bot is able to warn on trailing periods or leading lowercase letter in issue titles. > I am going to update the jcheck configuration to configure issuestitle check as a warning. Given that it's just a warning, it wouldn't block integration. This pull request has now been integrated. Changeset: d47a4e9f Author: Zhao Song Committer: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/d47a4e9f63a9414b90e09514bc26f6f7142ad49f Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8332008: Enable issuestitle check Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/19161 From ascarpino at openjdk.org Thu May 9 23:39:06 2024 From: ascarpino at openjdk.org (Anthony Scarpino) Date: Thu, 9 May 2024 23:39:06 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v7] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 22:23:02 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > whitespace src/java.base/share/classes/sun/security/ec/ECOperations.java line 701: > 699: if (!m.equals(v)) { > 700: java.util.HexFormat hex = java.util.HexFormat.of(); > 701: throw new RuntimeException(); I think your cleanup went to far. You should have some message saying they are not equal and if you don't want to print hex, remove getting an instance. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1596099182 From duke at openjdk.org Fri May 10 00:15:40 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 10 May 2024 00:15:40 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v8] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: add message back ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/1ecfdc44..83b21310 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=06-07 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From duke at openjdk.org Fri May 10 00:15:40 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 10 May 2024 00:15:40 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v7] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 23:36:03 GMT, Anthony Scarpino wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: >> >> whitespace > > src/java.base/share/classes/sun/security/ec/ECOperations.java line 701: > >> 699: if (!m.equals(v)) { >> 700: java.util.HexFormat hex = java.util.HexFormat.of(); >> 701: throw new RuntimeException(); > > I think your cleanup went to far. You should have some message saying they are not equal and if you don't want to print hex, remove getting an instance. I put the message back.. I removed it 'half'-intentionally; Was comparing against the original version and it didn't have any details, thought maybe should follow suit. But I did find this message helpful, so its back. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1596116606 From duke at openjdk.org Fri May 10 00:19:32 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 10 May 2024 00:19:32 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v9] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: whitespace ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/83b21310..8cd095dd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From darcy at openjdk.org Fri May 10 00:43:10 2024 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 10 May 2024 00:43:10 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v4] In-Reply-To: References: Message-ID: <8RuPOykuynrke0HG-JuhOP296mQX8P5QGdcJfjgPsS4=.da676135-40ae-4a23-9a1b-3bc7e3d1fee7@github.com> > Get JDK 24 underway. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Adjust test for deprecated options. - Merge branch 'master' into JDK-8330188 - Update deprecated options test. - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Correct release date as observed in review feedback. - Improve javadoc of class file update. - JDK-8330182: Start of release updates for JDK 24 JDK-8330183: Add SourceVersion.RELEASE_24 JDK-8330184: Add source 24 and target 24 to javac ------------- Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=03 Stats: 107 lines in 37 files changed: 46 ins; 7 del; 54 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From jwaters at openjdk.org Fri May 10 01:04:04 2024 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 10 May 2024 01:04:04 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis In-Reply-To: References: Message-ID: <9cOTNRj5EgyWRkI0hRuNjxym6vY29_GzTJdh4f-JstI=.4c216b65-b596-41f1-9ec1-3720ddca5577@github.com> On Wed, 24 Apr 2024 09:15:21 GMT, Magnus Ihse Bursie wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Please mark the PR as draft it is not intended for review. @magicus? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2103667760 From duke at openjdk.org Fri May 10 01:11:16 2024 From: duke at openjdk.org (xiaotaonan) Date: Fri, 10 May 2024 01:11:16 GMT Subject: RFR: 8331952: --enable-compatible-cds-alignment should be enabled by default In-Reply-To: References: Message-ID: <77r_x-3WGObk43Axt_k3XkwDvYkVhnrnvO_SIBAvjto=.c265ec76-daad-4b64-bea6-70c77c35b596@github.com> On Thu, 9 May 2024 01:07:26 GMT, xiaotaonan wrote: > --enable-compatible-cds-alignment should be enabled by default @lgxbslgx ------------- PR Comment: https://git.openjdk.org/jdk/pull/19150#issuecomment-2103672340 From stuefe at openjdk.org Fri May 10 04:33:07 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 10 May 2024 04:33:07 GMT Subject: RFR: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <8iYNtl4xOqm5tGUDjFzfrTH9MD5usYjeEyEJ94ggXhY=.ca0a14e2-dffc-48cf-b4e4-cd4700f9809c@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> <8iYNtl4xOqm5tGUDjFzfrTH9MD5usYjeEyEJ94ggXhY=.ca0a14e2-dffc-48cf-b4e4-cd4700f9809c@github.com> Message-ID: <5lvfr24Ri0R5ThC5-Gr3_07SIb6JmkgDHc6IjdFyGR8=.6d570dda-bf38-4ab3-9e09-940d641f712d@github.com> On Thu, 9 May 2024 17:05:40 GMT, Ioi Lam wrote: >> On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. >> >> Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). >> >> I tested this patch on: >> - x64 Linux >> - x64 Linux, crossbuilding to aarch64 >> - building natively on aarch64 Linux > > Looks good to me. I will close my JBS issue as a duplicate of this issue. > > Thanks Okay, thanks @iklam ------------- PR Comment: https://git.openjdk.org/jdk/pull/19142#issuecomment-2103841320 From stuefe at openjdk.org Fri May 10 04:33:08 2024 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 10 May 2024 04:33:08 GMT Subject: Integrated: 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default In-Reply-To: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> References: <4-4Y0kUGd0M1mvIy16XdBFWZfmnu1AlC8ufi5aoNT6c=.d262020d-00ea-4093-9fc6-5b2d726ca676@github.com> Message-ID: On Wed, 8 May 2024 15:14:16 GMT, Thomas Stuefe wrote: > On Linux aarch64, a JVM may encounter three different page sizes: 4K, 64K, and (when run on Mac M1 hardware) 16K. > > Since forgetting to specify `--enable-compatible-cds-alignment` is a common error that is only noticed when running the produced JVM on hardware with different page size, we propose to enable that option by default on Linux aarch64. The cost is a moderate increase in CDS archive size (about 300K). > > I tested this patch on: > - x64 Linux > - x64 Linux, crossbuilding to aarch64 > - building natively on aarch64 Linux This pull request has now been integrated. Changeset: d2d37c91 Author: Thomas Stuefe URL: https://git.openjdk.org/jdk/commit/d2d37c913e5b55f7aec2c7a6b5a2328348ded223 Stats: 12 lines in 1 file changed: 11 ins; 0 del; 1 mod 8331942: On Linux aarch64, CDS archives should be using 64K alignment by default Reviewed-by: aph, iklam ------------- PR: https://git.openjdk.org/jdk/pull/19142 From jpai at openjdk.org Fri May 10 06:00:03 2024 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 10 May 2024 06:00:03 GMT Subject: RFR: 8331952: --enable-compatible-cds-alignment should be enabled by default In-Reply-To: <77r_x-3WGObk43Axt_k3XkwDvYkVhnrnvO_SIBAvjto=.c265ec76-daad-4b64-bea6-70c77c35b596@github.com> References: <77r_x-3WGObk43Axt_k3XkwDvYkVhnrnvO_SIBAvjto=.c265ec76-daad-4b64-bea6-70c77c35b596@github.com> Message-ID: <5F685wJkbXhZ4QKEB7EROlOLIzEEDBfbE7rCGmnb_0w=.44711fc7-5204-4785-9133-1f96abdd3694@github.com> On Fri, 10 May 2024 01:08:29 GMT, xiaotaonan wrote: >> --enable-compatible-cds-alignment should be enabled by default > > @lgxbslgx Hello @xiaotaonan, the JBS issue against which this PR has been opened has already been closed as a duplicate of https://bugs.openjdk.org/browse/JDK-8331942, which itself has already been resolved. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19150#issuecomment-2103921218 From david.holmes at oracle.com Fri May 10 06:49:02 2024 From: david.holmes at oracle.com (David Holmes) Date: Fri, 10 May 2024 16:49:02 +1000 Subject: undefined symbols in libjvm.so In-Reply-To: References: <64b3b8a6-1047-4f3d-a90c-3d2cfd097bff@oracle.com> Message-ID: <84ae9ba2-c15f-4321-9264-fe5a64849551@oracle.com> On 8/05/2024 6:55 am, Vladimir Petko wrote: > Hi, > > This is probably an edge-case with assembly-defined symbols. > -Wl,z,defs prevents linking a shared library with undefined imports, > but does nothing about symbols exported by the library itself that are > undefined. > -Wl,--allow-shlib-undefined allows linking executable against such > library as long as it does not use any of the undefined symbols. I > have made a small sample[1] to illustrate the point. So we can only detect the undefined symbol problem indirectly via an executable linking to the bad library rather than the building of the library itself? David > > Best Regards, > Vladimir. > > [1] https://github.com/vpa1977/linksample > > On Tue, May 7, 2024 at 10:36?PM Magnus Ihse Bursie > wrote: >> >> Undefined symbols in libjvm.so is no good, and it should not be allowed. >> However, I am unsure about your analysis. This flag only affect linking >> of executables, not shared libraries. We do set "-Wl,-z,defs" when >> linking shared libraries, and this should complain about undefined symbols. >> >> /Magnus >> >> On 2024-05-06 21:57, Vladimir Petko wrote: >>> Hi, >>> >>> I have recently encountered bugs caused by undefined symbols in >>> libjvm.so[1][2]. The root cause of those issues is the expression in >>> make/autoconf/flags-ldflags.m4: >>> >>> --- >>> if test "x$TOOLCHAIN_TYPE" = xgcc; then >>> EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined" >>> ... >>> -- >>> >>> OpenJDK master builds fine after fixing[1] on the following >>> architectures: amd64, i386, armhf, arm64, s390, ppc64el and riscv64. >>> >>> Would it be possible to consider removing -Wl,--allow-shlib-undefined >>> from the build flags? >>> >>> Best Regards, >>> Vladimir. >>> >>> [1] https://bugs.openjdk.org/browse/JDK-8331541 >>> [2] https://bugs.openjdk.org/browse/JDK-8329983 From naoto at openjdk.org Fri May 10 21:35:22 2024 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 10 May 2024 21:35:22 GMT Subject: RFR: 8332085: Remove 10 year old transition check in GenerateCurrencyData tool Message-ID: The build tool that generates the currency data had a check that throws an exception (causes a build failure) if the transition date is more than 10 years away (past/future). This caused a build failure in 8u-RI repository. Since the risk of build failure seems to exceed the potential benefit (make the data clean), removing the check is appropriate. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/19183/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19183&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332085 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19183.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19183/head:pull/19183 PR: https://git.openjdk.org/jdk/pull/19183 From erikj at openjdk.org Fri May 10 22:27:04 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 10 May 2024 22:27:04 GMT Subject: RFR: 8332085: Remove 10 year old transition check in GenerateCurrencyData tool In-Reply-To: References: Message-ID: On Fri, 10 May 2024 21:30:21 GMT, Naoto Sato wrote: > The build tool that generates the currency data had a check that throws an exception (causes a build failure) if the transition date is more than 10 years away (past/future). This caused a build failure in 8u-RI repository. Since the risk of build failure seems to exceed the potential benefit (make the data clean), removing the check is appropriate. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19183#pullrequestreview-2050944169 From amenkov at openjdk.org Fri May 10 23:59:26 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Fri, 10 May 2024 23:59:26 GMT Subject: RFR: 8332096: hotspot-ide-project fails with this-escape Message-ID: <_S3BOhhYVz7pK7B1kVICha4LIQdFMi1FQtMvORlxlPk=.da9fe128-d62f-4eee-ae9e-6b51c04fedb7@github.com> The change fixes `make hotspot-ide-project` which fails with \open\make\ide\visualstudio\hotspot\src\classes\build\tools\projectcreator\FileTreeCreator.java:54: warning: [this-escape] possible 'this' escape before subclass is fully initialized attributes.push(new DirAttributes()); ^ error: warnings found and -Werror specified ------------- Commit messages: - fix Changes: https://git.openjdk.org/jdk/pull/19186/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19186&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332096 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/19186.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19186/head:pull/19186 PR: https://git.openjdk.org/jdk/pull/19186 From duke at openjdk.org Sat May 11 00:36:10 2024 From: duke at openjdk.org (xiaotaonan) Date: Sat, 11 May 2024 00:36:10 GMT Subject: Withdrawn: 8331952: --enable-compatible-cds-alignment should be enabled by default In-Reply-To: References: Message-ID: On Thu, 9 May 2024 01:07:26 GMT, xiaotaonan wrote: > --enable-compatible-cds-alignment should be enabled by default This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/19150 From mikael at openjdk.org Sat May 11 02:25:48 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Sat, 11 May 2024 02:25:48 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 Message-ID: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. ------------- Commit messages: - 8329816: Add SLEEF version 3.6 Changes: https://git.openjdk.org/jdk/pull/19185/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19185&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8329816 Stats: 14313 lines in 6 files changed: 14313 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19185.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19185/head:pull/19185 PR: https://git.openjdk.org/jdk/pull/19185 From iris at openjdk.org Sat May 11 05:50:02 2024 From: iris at openjdk.org (Iris Clark) Date: Sat, 11 May 2024 05:50:02 GMT Subject: RFR: 8332085: Remove 10 year old transition check in GenerateCurrencyData tool In-Reply-To: References: Message-ID: On Fri, 10 May 2024 21:30:21 GMT, Naoto Sato wrote: > The build tool that generates the currency data had a check that throws an exception (causes a build failure) if the transition date is more than 10 years away (past/future). This caused a build failure in 8u-RI repository. Since the risk of build failure seems to exceed the potential benefit (make the data clean), removing the check is appropriate. Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19183#pullrequestreview-2051087379 From jwaters at openjdk.org Mon May 13 04:26:02 2024 From: jwaters at openjdk.org (Julian Waters) Date: Mon, 13 May 2024 04:26:02 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis In-Reply-To: References: Message-ID: <0TRavDTT-tP_CWDMxGtcwZawPjWA_Ee5Uxcay8NXbao=.99b25023-3008-4172-b537-d8a78ccbe71b@github.com> On Wed, 24 Apr 2024 09:15:21 GMT, Magnus Ihse Bursie wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Please mark the PR as draft it is not intended for review. @magicus? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2106619396 From mli at openjdk.org Mon May 13 07:15:08 2024 From: mli at openjdk.org (Hamlin Li) Date: Mon, 13 May 2024 07:15:08 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Thanks for working on this. Just one question, currently in `sleefinline_{advsimd,sve}.h` there is `#define SLEEF_ALWAYS_INLINE inline`, but what expected is something like `#define SLEEF_ALWAYS_INLINE inline __attribute__((always_inline))` (please check https://github.com/shibatch/sleef/pull/537 for details). In the future, when we change it, do we need to go through the legal process again? I guess we don't need it, but just double check it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2106818228 From mcimadamore at openjdk.org Mon May 13 11:08:51 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 13 May 2024 11:08:51 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI Message-ID: This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: * `System::load` and `System::loadLibrary` are now restricted methods * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. ------------- Commit messages: - Initial push Changes: https://git.openjdk.org/jdk/pull/19213/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331671 Stats: 466 lines in 99 files changed: 301 ins; 53 del; 112 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From mcimadamore at openjdk.org Mon May 13 11:08:51 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 13 May 2024 11:08:51 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI In-Reply-To: References: Message-ID: On Mon, 13 May 2024 10:42:26 GMT, Maurizio Cimadamore wrote: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Javadoc: https://cr.openjdk.org/~mcimadamore/jdk/8331671/v1/javadoc/api/index.html Specdiff: https://cr.openjdk.org/~mcimadamore/jdk/8331671/v1/specdiff_out/overview-summary.html make/conf/module-loader-map.conf line 105: > 103: java.smartcardio \ > 104: jdk.accessibility \ > 105: jdk.attach \ The list of allowed modules has been rewritten from scratch, by looking at the set of modules containing at least one `native` method declaration. src/hotspot/share/prims/nativeLookup.cpp line 277: > 275: > 276: Klass* klass = vmClasses::ClassLoader_klass(); > 277: Handle jni_class(THREAD, method->method_holder()->java_mirror()); This is the biggest change in this PR. That is, we need to pass enough arguments to `ClassLoader::findNative` so that the method can start a restricted check accordingly. src/java.base/share/classes/java/lang/Module.java line 311: > 309: Module target = moduleForNativeAccess(); > 310: ModuleBootstrap.IllegalNativeAccess illegalNativeAccess = ModuleBootstrap.illegalNativeAccess(); > 311: if (illegalNativeAccess != ModuleBootstrap.IllegalNativeAccess.ALLOW && There are some changes in this code: * this code is no-op if `--illegal-native-access` is set to `allow` * we also attach the location of the problematic class to the warning message, using `CodeSource` * we use the "initial error stream" to emit the warning, similarly to what is done for other runtime warnings src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 115: > 113: @ForceInline > 114: public static void ensureNativeAccess(Class currentClass, Class owner, String methodName) { > 115: if (VM.isModuleSystemInited()) { If we call this code too early, we can see cases where `module` is `null`. src/java.desktop/macosx/classes/com/apple/eio/FileManager.java line 61: > 59: } > 60: > 61: @SuppressWarnings({"removal", "restricted"}) There are several of these changes. One option might have been to just disable restricted warnings when building. But on a deeper look, I realized that in all these places we already disabled deprecation warnings for the use of security manager, so I also added a new suppression instead. test/jdk/java/foreign/enablenativeaccess/panama_jni_load_module/module-info.java line 24: > 22: */ > 23: > 24: module panama_jni_load_module { This module setup is a bit convoluted, but I wanted to make sure that we got separate warnings for `System.loadLibrary` and binding of the `native` method, and that warning on the _use_ of the native method was not generated (typically, all three operations occur in the same module). ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2107272261 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598269825 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598271285 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598274987 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598276455 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598277853 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598279827 From mcimadamore at openjdk.org Mon May 13 11:42:04 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 13 May 2024 11:42:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v2] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Avoid call to VM::isModuleSystemInited Use initial error stream ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/d9fe9a71..c4938dc7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=00-01 Stats: 11 lines in 2 files changed: 3 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From mcimadamore at openjdk.org Mon May 13 11:42:04 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 13 May 2024 11:42:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v2] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:38:40 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Avoid call to VM::isModuleSystemInited > Use initial error stream src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 124: > 122: if (module != null) { > 123: // not in init phase > 124: Holder.JLA.ensureNativeAccess(module, owner, methodName, currentClass); In an earlier iteration I had a call to `VM::isModuleSystemInited`, but I discovered that caused a performance regression, since that method involves a volatile access. Perhaps we should rethink that part of the init code to use stable fields, but it's probably better done separately. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598328283 From mcimadamore at openjdk.org Mon May 13 11:47:38 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 13 May 2024 11:47:38 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: - Fix another typo - Fix typo - Add more comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/c4938dc7..bad10942 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=01-02 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From erikj at openjdk.org Mon May 13 13:18:06 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 May 2024 13:18:06 GMT Subject: RFR: 8332096: hotspot-ide-project fails with this-escape In-Reply-To: <_S3BOhhYVz7pK7B1kVICha4LIQdFMi1FQtMvORlxlPk=.da9fe128-d62f-4eee-ae9e-6b51c04fedb7@github.com> References: <_S3BOhhYVz7pK7B1kVICha4LIQdFMi1FQtMvORlxlPk=.da9fe128-d62f-4eee-ae9e-6b51c04fedb7@github.com> Message-ID: On Fri, 10 May 2024 23:54:11 GMT, Alex Menkov wrote: > The change fixes `make hotspot-ide-project` which fails with > > \open\make\ide\visualstudio\hotspot\src\classes\build\tools\projectcreator\FileTreeCreator.java:54: warning: [this-escape] possible 'this' escape before subclass is fully initialized > attributes.push(new DirAttributes()); > ^ > error: warnings found and -Werror specified Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19186#pullrequestreview-2052671844 From erikj at openjdk.org Mon May 13 13:23:11 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 May 2024 13:23:11 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: > > - Fix another typo > - Fix typo > - Add more comments Build changes look good. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2107563120 From weijun at openjdk.org Mon May 13 13:48:23 2024 From: weijun at openjdk.org (Weijun Wang) Date: Mon, 13 May 2024 13:48:23 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: > > - Fix another typo > - Fix typo > - Add more comments security changes (`java.security.jgss`, `jdk.crypto.cryptoki`, `jdk.crypto.mscapi`, and `jdk.security.auth`) look good. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2107621474 From dfuchs at openjdk.org Mon May 13 14:18:11 2024 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 13 May 2024 14:18:11 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: > > - Fix another typo > - Fix typo > - Add more comments Changes to jdk.net and jdk.sctp look ok. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2107695217 From alanb at openjdk.org Mon May 13 15:35:08 2024 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 13 May 2024 15:35:08 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: > > - Fix another typo > - Fix typo > - Add more comments src/hotspot/share/runtime/arguments.cpp line 2271: > 2269: } else if (match_option(option, "--illegal-native-access=", &tail)) { > 2270: if (!create_module_property("jdk.module.illegal.native.access", tail, InternalProperty)) { > 2271: return JNI_ENOMEM; I think it would be helpful to get guidance on if this is the right way to add this system property, only because this one not a "module property". The configuration (WriteableProperty + InternalProperty) look right. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1598673962 From ascarpino at openjdk.org Mon May 13 16:22:09 2024 From: ascarpino at openjdk.org (Anthony Scarpino) Date: Mon, 13 May 2024 16:22:09 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v9] In-Reply-To: References: Message-ID: On Fri, 10 May 2024 00:19:32 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > whitespace The changes look good and have passed testing ------------- Marked as reviewed by ascarpino (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18583#pullrequestreview-2053158639 From naoto at openjdk.org Mon May 13 16:52:23 2024 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 13 May 2024 16:52:23 GMT Subject: Integrated: 8332085: Remove 10 year old transition check in GenerateCurrencyData tool In-Reply-To: References: Message-ID: On Fri, 10 May 2024 21:30:21 GMT, Naoto Sato wrote: > The build tool that generates the currency data had a check that throws an exception (causes a build failure) if the transition date is more than 10 years away (past/future). This caused a build failure in 8u-RI repository. Since the risk of build failure seems to exceed the potential benefit (make the data clean), removing the check is appropriate. This pull request has now been integrated. Changeset: 5ded8da6 Author: Naoto Sato URL: https://git.openjdk.org/jdk/commit/5ded8da676d62158d0011086d7f80ff2c9096e13 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod 8332085: Remove 10 year old transition check in GenerateCurrencyData tool Reviewed-by: erikj, iris Backport-of: 4f3b76ff496e7423e5c43ca62cef019e4f4292ec ------------- PR: https://git.openjdk.org/jdk/pull/19183 From mikael at openjdk.org Mon May 13 17:36:24 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Mon, 13 May 2024 17:36:24 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Looks like that change is not yet in a released version of SLEEF, and in particular not in 3.6. We do need updated approvals when we pick up new versions. Since we've gone through the process once it's typically easier/faster to do so. It will be technically easier/faster as well, now that I know how to do it and have encoded it in the createSleef.sh script. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2108363977 From erikj at openjdk.org Mon May 13 18:35:13 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 May 2024 18:35:13 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Marked as reviewed by erikj (Reviewer). src/jdk.incubator.vector/linux/legal/sleef.md line 32: > 30: SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE > 31: FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, > 32: ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Is this missing line break a mistake or intended? ------------- PR Review: https://git.openjdk.org/jdk/pull/19185#pullrequestreview-2053422578 PR Review Comment: https://git.openjdk.org/jdk/pull/19185#discussion_r1598883436 From mli at openjdk.org Mon May 13 21:01:06 2024 From: mli at openjdk.org (Hamlin Li) Date: Mon, 13 May 2024 21:01:06 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Marked as reviewed by mli (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19185#pullrequestreview-2053815054 From mli at openjdk.org Mon May 13 21:01:08 2024 From: mli at openjdk.org (Hamlin Li) Date: Mon, 13 May 2024 21:01:08 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: <99nPPFg0UWk8yhMcjSYTEY8Nbp7yP4Oz6bt8izRgXcs=.5789fead-e2a8-46e3-b868-b701471aeff4@github.com> On Mon, 13 May 2024 17:33:20 GMT, Mikael Vidstedt wrote: > Looks like that change is not yet in a released version of SLEEF, and in particular not in 3.6. > > We do need updated approvals when we pick up new versions. Since we've gone through the process once it's typically easier/faster to do so. It will be technically easier/faster as well, now that I know how to do it and have encoded it in the createSleef.sh script. Thanks, I see. As the version 3.6 will introduce some performance regression compared to non-intrinsic version, so to bring the fix into jdk, we need either do a manual change (like https://github.com/openjdk/jdk/pull/18605/commits/cd70f5a970514938d05f7a2426b15f78245236d3), or wait the next version after 3.6 (which should include changes in https://github.com/shibatch/sleef/pull/537), I think we prefer the latter (i.e. depends on next version after 3.6) That means https://github.com/openjdk/jdk/pull/18605 (JDK-8312425) requires sleef version next to 3.6 (could be 3.6.1 or 3.7). I'm OK to push this pr first, if it's also convenient for you, as we will need to push the change between 3.6.1/3.7 and 3.6 again when 3.6.1/3.7 is released. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2108788721 From jwaters at openjdk.org Tue May 14 00:28:05 2024 From: jwaters at openjdk.org (Julian Waters) Date: Tue, 14 May 2024 00:28:05 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis [v2] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 07:50:00 GMT, Julian Waters wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Add check for compiler in configure > - 8330988: Implementation of 8288293: Windows/gcc Port for hsdis Hmm, it seems Magnus isn't available at the moment. @erikj79 might you be able to answer my questions regarding hsdis? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2109049333 From duke at openjdk.org Tue May 14 01:03:09 2024 From: duke at openjdk.org (ExE Boss) Date: Tue, 14 May 2024 01:03:09 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: > > - Fix another typo > - Fix typo > - Add more comments src/hotspot/share/prims/nativeLookup.cpp line 275: > 273: > 274: // Otherwise call static method findNative in ClassLoader > 275: Suggestion: src/hotspot/share/prims/nativeLookup.cpp line 419: > 417: if (entry != nullptr) return entry; > 418: > 419: Suggestion: src/hotspot/share/prims/nativeLookup.cpp line 426: > 424: return nullptr; > 425: } > 426: } Suggestion: } src/java.base/share/classes/java/lang/Module.java line 331: > 329: String modflag = isNamed() ? getName() : "ALL-UNNAMED"; > 330: String caller = currentClass != null ? currentClass.getName() : "code"; > 331: System.err.printf(""" This?message should?probably be?different when?linking native?methods, since otherwise it?ll be: WARNING: A restricted method in foo has been called WARNING: bar has been called by Baz in Baz WARNING: Use --enable-native-access=foo to avoid a warning for callers in this module WARNING: Restricted methods will be blocked in a future release unless native access is enabled when?it?should really?be something?like: WARNING: A JNI native method in foo has been linked WARNING: bar has been linked in Baz WARNING: Use --enable-native-access=foo to avoid a warning for native methods in this module WARNING: Native methods will be blocked in a future release unless native access is enabled ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1599248442 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1599248501 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1599248577 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1599253428 From mcimadamore at openjdk.org Tue May 14 18:10:28 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Tue, 14 May 2024 18:10:28 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v4] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision: - Address review comments Improve warning for JNI methods, similar to what's described in JEP 472 Beef up tests - Address review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/bad10942..0d21bf99 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=02-03 Stats: 84 lines in 15 files changed: 42 ins; 14 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From dholmes at openjdk.org Wed May 15 01:04:01 2024 From: dholmes at openjdk.org (David Holmes) Date: Wed, 15 May 2024 01:04:01 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v4] In-Reply-To: References: Message-ID: On Tue, 14 May 2024 18:10:28 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision: > > - Address review comments > Improve warning for JNI methods, similar to what's described in JEP 472 > Beef up tests > - Address review comments Hotspot changes look good - notwithstanding discussion about properlty namespace placement. Manpage changes also look good. ------------- PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2056696636 From dholmes at openjdk.org Wed May 15 01:04:02 2024 From: dholmes at openjdk.org (David Holmes) Date: Wed, 15 May 2024 01:04:02 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: On Mon, 13 May 2024 15:32:27 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision: >> >> - Fix another typo >> - Fix typo >> - Add more comments > > src/hotspot/share/runtime/arguments.cpp line 2271: > >> 2269: } else if (match_option(option, "--illegal-native-access=", &tail)) { >> 2270: if (!create_module_property("jdk.module.illegal.native.access", tail, InternalProperty)) { >> 2271: return JNI_ENOMEM; > > I think it would be helpful to get guidance on if this is the right way to add this system property, only because this one not a "module property". The configuration (WriteableProperty + InternalProperty) look right. So my recollection/understanding is that we use this mechanism to convert module-related `--` flags passed to the VM into system properties that the Java code can then read, but we set them up such that you are not allowed to specify them directly via `-D`. Is the question here whether this new property should be in the `jdk.module` namespace? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1600819327 From alanb at openjdk.org Wed May 15 06:18:02 2024 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 15 May 2024 06:18:02 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: References: Message-ID: <-gTDhrDCjlq9pEoBxG4Qneo9dEf7ErWmvnyOZKGx4mM=.8772d4dd-aa5e-412c-8131-75687cddad5b@github.com> On Wed, 15 May 2024 00:54:43 GMT, David Holmes wrote: >> src/hotspot/share/runtime/arguments.cpp line 2271: >> >>> 2269: } else if (match_option(option, "--illegal-native-access=", &tail)) { >>> 2270: if (!create_module_property("jdk.module.illegal.native.access", tail, InternalProperty)) { >>> 2271: return JNI_ENOMEM; >> >> I think it would be helpful to get guidance on if this is the right way to add this system property, only because this one not a "module property". The configuration (WriteableProperty + InternalProperty) look right. > > So my recollection/understanding is that we use this mechanism to convert module-related `--` flags passed to the VM into system properties that the Java code can then read, but we set them up such that you are not allowed to specify them directly via `-D`. Is the question here whether this new property should be in the `jdk.module` namespace? That's my recollection too. The usage here isn' related to modules which makes me wonder if this function should be renamed (not by this PR of course) of if we should be using PropertyList_unique_add (with AddProperty, WriteableProperty, InternalProperty) instead. There will be further GNU style options coming that will likely need to map to an internal system property in the same way. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601002132 From duke at openjdk.org Wed May 15 07:59:04 2024 From: duke at openjdk.org (ExE Boss) Date: Wed, 15 May 2024 07:59:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v4] In-Reply-To: References: Message-ID: On Tue, 14 May 2024 18:10:28 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision: > > - Address review comments > Improve warning for JNI methods, similar to what's described in JEP 472 > Beef up tests > - Address review comments src/java.base/share/classes/java/lang/Module.java line 334: > 332: System.err.printf(""" > 333: WARNING: A native method in %s has been bound > 334: WARNING: %s has been called by %s in %s Note that this line is still not entirely correct, as for code like: // in module a: package a; import b.Foo; public class Foo { public static void main(String... args) { System.load("JNI library implementing Java_b_Bar_nativeMethod"); Bar.nativeMethod(); } } // in module b: package b; public class Bar { public static native void nativeMethod(); } It?ll?show?`Bar` as?the?caller of?`Bar::nativeMethod()`, even?though the?caller is?`Foo` in?this?case, which?is?why I?initially?suggested just?omitting the?caller from?**JNI** linkage?warnings. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601140578 From sgehwolf at openjdk.org Wed May 15 09:50:32 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 15 May 2024 09:50:32 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v27] In-Reply-To: References: Message-ID: > Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app b eing modularized). > > The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. > > Basic usage example: > > $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) > $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) > $ ls ../linux-x86_64-server-release/images/jdk/jmods > java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod > java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod > java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod > java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.internal.vm.compiler.manage... Severin Gehwolf has updated the pull request incrementally with two additional commits since the last revision: - Simplify JLINK_JDK_EXTRA_OPTS var handling - Only add runtime track files for linkable runtimes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14787/files - new: https://git.openjdk.org/jdk/pull/14787/files/67aea4ca..be30a182 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14787&range=26 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14787&range=25-26 Stats: 11 lines in 2 files changed: 5 ins; 5 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14787/head:pull/14787 PR: https://git.openjdk.org/jdk/pull/14787 From sgehwolf at openjdk.org Wed May 15 09:50:35 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 15 May 2024 09:50:35 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v26] In-Reply-To: <7GEk4PVZYWDSKt8bWCVSHD4f8zFmmJNWwJojxrFgwC4=.10d95786-32d8-40e8-bb21-1647da3ee39c@github.com> References: <7GEk4PVZYWDSKt8bWCVSHD4f8zFmmJNWwJojxrFgwC4=.10d95786-32d8-40e8-bb21-1647da3ee39c@github.com> Message-ID: On Wed, 8 May 2024 22:36:51 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 105 commits: >> >> - Generate the runtime image link diff at jlink time >> >> But only do that once the plugin-pipeline has run. The generation is >> enabled with the hidden option '--generate-linkable-runtime' and >> the resource pools available at jlink time are being used to generate >> the diff. >> - Merge branch 'master' into jdk-8311302-jmodless-link >> - Use shorter name for the build tool >> - Review feedback from Erik J. >> - Remove dependency on CDS which isn't needed anymore >> - Fix coment >> - Fix comment >> - Fix typo >> - Revert some now unneded build changes >> - Follow build tools naming convention >> - ... and 95 more: https://git.openjdk.org/jdk/compare/23a72a1f...67aea4ca > > make/Images.gmk line 100: > >> 98: >> 99: ifeq ($(JLINK_PRODUCE_RUNTIME_LINK_JDK), true) >> 100: JLINK_JDK_EXTRA_OPTS := $(JLINK_JDK_EXTRA_OPTS) --generate-linkable-runtime > > I just noticed this slight improvement: > > Suggestion: > > JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime Thanks, fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1601322116 From mcimadamore at openjdk.org Wed May 15 09:59:05 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 15 May 2024 09:59:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v4] In-Reply-To: References: Message-ID: <_MDZPWLFa7qcrmsqMsXDJx6Y5lqfI3E4d6Z6-VKv79g=.ad216d38-b066-47d2-bfcd-31a64052015d@github.com> On Wed, 15 May 2024 07:55:27 GMT, ExE Boss wrote: > Note that this line is still not entirely correct, as for code like: You are correct - the message is however consistent with what written in JEP 472. I'll discuss with @pron ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601335120 From prappo at openjdk.org Wed May 15 10:11:20 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Wed, 15 May 2024 10:11:20 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v67] In-Reply-To: References: Message-ID: <0VWiHjqzZPIdMDumfFRh76XHMlYsQelkvLxsZQTZ_08=.ac0f0e28-32d2-4eba-8302-a0b2f60ba6fa@github.com> On Tue, 7 May 2024 17:31:29 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: > > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - Remove `--no-fonts` from `MISSING_IN_MAN_PAGE` > - Update javadoc.1 troff man page > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - address review feedback, to improve testing of changes to Elements > - update copyright years > - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 > - update commonmark-java from 0.21.0 to 0.22.0 > - Remove links to `jdk.javadoc` module from `java.compiler` module` > - Suppress warnings building tests > - ... and 81 more: https://git.openjdk.org/jdk/compare/524aaad9...cc12140a I think we should add a test to verify that if `--disable-line-doc-comments` is specified, no `///` dangling comments are reported. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2112100605 From mcimadamore at openjdk.org Wed May 15 10:37:24 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 15 May 2024 10:37:24 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: <-gTDhrDCjlq9pEoBxG4Qneo9dEf7ErWmvnyOZKGx4mM=.8772d4dd-aa5e-412c-8131-75687cddad5b@github.com> References: <-gTDhrDCjlq9pEoBxG4Qneo9dEf7ErWmvnyOZKGx4mM=.8772d4dd-aa5e-412c-8131-75687cddad5b@github.com> Message-ID: <3w0X9MH3A4P3lX6oIuONx-daTSVe3kWm8z2YWDbHNvg=.9a19ac2b-f46b-4d64-9cdd-f3e70dc3da20@github.com> On Wed, 15 May 2024 06:15:35 GMT, Alan Bateman wrote: >> So my recollection/understanding is that we use this mechanism to convert module-related `--` flags passed to the VM into system properties that the Java code can then read, but we set them up such that you are not allowed to specify them directly via `-D`. Is the question here whether this new property should be in the `jdk.module` namespace? > > That's my recollection too. The usage here isn' related to modules which makes me wonder if this function should be renamed (not by this PR of course) of if we should be using PropertyList_unique_add (with AddProperty, WriteableProperty, InternalProperty) instead. There will be further GNU style options coming that will likely need to map to an internal system property in the same way. I don't fully agree that this option is not module related (which is why I gave it that name). The very definition of illegal native access is related to native access occurring from a module that is outside a specific set. So I think it's 50/50 as to whether this option is module-related or not. Of course I can fix the code if there's something clearly better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601386336 From mcimadamore at openjdk.org Wed May 15 10:40:34 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 15 May 2024 10:40:34 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v5] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Refine warning text for JNI method binding ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/0d21bf99..daf729f4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=03-04 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From alanb at openjdk.org Wed May 15 11:05:14 2024 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 15 May 2024 11:05:14 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3] In-Reply-To: <3w0X9MH3A4P3lX6oIuONx-daTSVe3kWm8z2YWDbHNvg=.9a19ac2b-f46b-4d64-9cdd-f3e70dc3da20@github.com> References: <-gTDhrDCjlq9pEoBxG4Qneo9dEf7ErWmvnyOZKGx4mM=.8772d4dd-aa5e-412c-8131-75687cddad5b@github.com> <3w0X9MH3A4P3lX6oIuONx-daTSVe3kWm8z2YWDbHNvg=.9a19ac2b-f46b-4d64-9cdd-f3e70dc3da20@github.com> Message-ID: On Wed, 15 May 2024 10:34:01 GMT, Maurizio Cimadamore wrote: > I don't fully agree that this option is not module related (which is why I gave it that name). The very definition of illegal native access is related to native access occurring from a module that is outside a specific set. So I think it's 50/50 as to whether this option is module-related or not. Of course I can fix the code if there's something clearly better. It maps here to a jdk.module.* property so I suppose it's okay. The functions were introduced to create jdk.module.* properties where the values were a set module names or a module path. Maybe these functions should be renamed at some point (not here) as they are more widely useful now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601421535 From sgehwolf at openjdk.org Wed May 15 11:55:39 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 15 May 2024 11:55:39 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v28] In-Reply-To: References: Message-ID: > Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app b eing modularized). > > The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. > > Basic usage example: > > $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) > $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) > $ ls ../linux-x86_64-server-release/images/jdk/jmods > java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod > java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod > java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod > java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.internal.vm.compiler.manage... Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 108 commits: - Merge branch 'master' into jdk-8311302-jmodless-link - Simplify JLINK_JDK_EXTRA_OPTS var handling - Only add runtime track files for linkable runtimes - Generate the runtime image link diff at jlink time But only do that once the plugin-pipeline has run. The generation is enabled with the hidden option '--generate-linkable-runtime' and the resource pools available at jlink time are being used to generate the diff. - Merge branch 'master' into jdk-8311302-jmodless-link - Use shorter name for the build tool - Review feedback from Erik J. - Remove dependency on CDS which isn't needed anymore - Fix coment - Fix comment - ... and 98 more: https://git.openjdk.org/jdk/compare/957eb611...8cca277e ------------- Changes: https://git.openjdk.org/jdk/pull/14787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14787&range=27 Stats: 3424 lines in 36 files changed: 3272 ins; 110 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/14787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14787/head:pull/14787 PR: https://git.openjdk.org/jdk/pull/14787 From jwaters at openjdk.org Wed May 15 13:08:14 2024 From: jwaters at openjdk.org (Julian Waters) Date: Wed, 15 May 2024 13:08:14 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis [v2] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 07:50:00 GMT, Julian Waters wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Add check for compiler in configure > - 8330988: Implementation of 8288293: Windows/gcc Port for hsdis Magnus? Erik? You guys there? :( ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2112465392 From ihse at openjdk.org Wed May 15 13:17:25 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 15 May 2024 13:17:25 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v28] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 11:55:39 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app being modularized). >> >> The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. >> >> Basic usage example: >> >> $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) >> $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) >> $ ls ../linux-x86_64-server-release/images/jdk/jmods >> java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod >> java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod >> java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod >> java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.i... > > Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 108 commits: > > - Merge branch 'master' into jdk-8311302-jmodless-link > - Simplify JLINK_JDK_EXTRA_OPTS var handling > - Only add runtime track files for linkable runtimes > - Generate the runtime image link diff at jlink time > > But only do that once the plugin-pipeline has run. The generation is > enabled with the hidden option '--generate-linkable-runtime' and > the resource pools available at jlink time are being used to generate > the diff. > - Merge branch 'master' into jdk-8311302-jmodless-link > - Use shorter name for the build tool > - Review feedback from Erik J. > - Remove dependency on CDS which isn't needed anymore > - Fix coment > - Fix comment > - ... and 98 more: https://git.openjdk.org/jdk/compare/957eb611...8cca277e Thanks! Now I am 100% happy with the build changes. :) ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14787#pullrequestreview-2057984229 From ihse at openjdk.org Wed May 15 13:35:05 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 15 May 2024 13:35:05 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis [v2] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 07:50:00 GMT, Julian Waters wrote: >> WIP >> >> This changeset contains hsdis for Windows/gcc Port. It supports both the binutils and capstone backends, though the LLVM backend is left out due to compatibility issues encountered during the build. Currently, which gcc distributions are supported is still to be clarified, as several, ranging from Cygwin, to MinGW64, to the gcc subsystems from MSYS2. For this reason, the build system hack in place at the moment to compile the binutils backend on Windows is still left in place, for now. > > Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Add check for compiler in configure > - 8330988: Implementation of 8288293: Windows/gcc Port for hsdis Hi Julian, sorry for not getting back to you. The problem from my PoV is that this is a very large and intrusive patch in the build of the actual product, for a claimed problem in the tangential hsdis library. I have not understood a pressing business need to get a Windows/gcc port for hsdis, which means I can't really prioritize trying to understand this patch. As you know, the build system does not currently really separate between "the OS is Windows" and "the toolchain is Microsoft". I understand that you want to fix that, and in theory I support it. However, you must also realize that making a complete fix of this requires a lot of work, for something that there is no clearly defined need. (After all, cl.exe works fine to create the build, has no apparent issues, and is as far as an "official" compiler for Windows as you can get.) That makes it fall squarely in the WIBNIs bucked ("wouldn't it be nice if..."). If you can fix just the hsdis build without changing anything outside the hsdis Makefiles, that would be a different story. Such a change would be limited in scope, easy to say it will not affect the product proper, and be easier to review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2112546029 From jjg at openjdk.org Wed May 15 15:54:02 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 15 May 2024 15:54:02 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v68] In-Reply-To: References: Message-ID: <9QLu9m9L7_IJM2Ha6Wi7_mhsyMC6fVCbzMAH4_Fl-zU=.d40f4592-8768-45da-8cb5-cb47ff761253@github.com> > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 93 commits: - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - Remove `--no-fonts` from `MISSING_IN_MAN_PAGE` - Update javadoc.1 troff man page - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - address review feedback, to improve testing of changes to Elements - update copyright years - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3 - update commonmark-java from 0.21.0 to 0.22.0 - ... and 83 more: https://git.openjdk.org/jdk/compare/61aff6db...43546101 ------------- Changes: https://git.openjdk.org/jdk/pull/16388/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=67 Stats: 26438 lines in 242 files changed: 25744 ins; 257 del; 437 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From alanb at openjdk.org Wed May 15 15:59:14 2024 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 15 May 2024 15:59:14 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v5] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 10:40:34 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Refine warning text for JNI method binding src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java line 871: > 869: return IllegalNativeAccess.WARN; > 870: } else { > 871: fail("Value specified to --illegal-access not recognized:" Typo in the message, should be --illegal-native-access. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1601898238 From mcimadamore at openjdk.org Wed May 15 16:08:17 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 15 May 2024 16:08:17 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Address review comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/daf729f4..1c45e5d5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From jjg at openjdk.org Wed May 15 21:04:36 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 15 May 2024 21:04:36 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: update tests for dangling doc comments, per review feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16388/files - new: https://git.openjdk.org/jdk/pull/16388/files/43546101..bfa35bd4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=68 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=67-68 Stats: 110 lines in 9 files changed: 95 ins; 0 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From jjg at openjdk.org Wed May 15 21:07:18 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 15 May 2024 21:07:18 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v67] In-Reply-To: <0VWiHjqzZPIdMDumfFRh76XHMlYsQelkvLxsZQTZ_08=.ac0f0e28-32d2-4eba-8302-a0b2f60ba6fa@github.com> References: <0VWiHjqzZPIdMDumfFRh76XHMlYsQelkvLxsZQTZ_08=.ac0f0e28-32d2-4eba-8302-a0b2f60ba6fa@github.com> Message-ID: On Wed, 15 May 2024 10:08:19 GMT, Pavel Rappo wrote: > I think we should add a test to verify that if `--disable-line-doc-comments` is specified, no `///` dangling comments are reported. Added more tests for dangling doc comments. Note we cannot currently use `-Xlint:dangling-doc-comments` in javadoc itself, so the new tests are part of the javac set of tests. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2113453038 From jwaters at openjdk.org Thu May 16 07:59:07 2024 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 16 May 2024 07:59:07 GMT Subject: RFR: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis [v2] In-Reply-To: References: Message-ID: <4QTrXORVLmXOdBxVAdYyAE9M7HTfxOjcW0NVtitY-og=.aef997d7-96d6-4992-b308-d951046c920f@github.com> On Wed, 15 May 2024 13:32:38 GMT, Magnus Ihse Bursie wrote: > Hi Julian, sorry for not getting back to you. > > The problem from my PoV is that this is a very large and intrusive patch in the build of the actual product, for a claimed problem in the tangential hsdis library. I have not understood a pressing business need to get a Windows/gcc port for hsdis, which means I can't really prioritize trying to understand this patch. > > As you know, the build system does not currently really separate between "the OS is Windows" and "the toolchain is Microsoft". I understand that you want to fix that, and in theory I support it. However, you must also realize that making a complete fix of this requires a lot of work, for something that there is no clearly defined need. (After all, cl.exe works fine to create the build, has no apparent issues, and is as far as an "official" compiler for Windows as you can get.) That makes it fall squarely in the WIBNIs bucked ("wouldn't it be nice if..."). > > If you can fix just the hsdis build without changing anything outside the hsdis Makefiles, that would be a different story. Such a change would be limited in scope, easy to say it will not affect the product proper, and be easier to review. Oh, no worries. Sorry for sounding a little impatient. The problem is that there are areas in the build system that will need changing to support hsdis compilation, not just the hsdis Makefile and autoconf file itself. I can try to work on minimizing the amount of changes to non-hsdis files (I was hoping the current changes were small enough, but it seems they are not), but I believe it's impossible to achieve this by only touching the hsdis Makefile and lib-hsdis.m4. That is, there will necessarily be changes, no matter how minimal, to non-hsdis files. As for why do this at all, I was mainly driven by seeing the hack in place for the binutils backend on Windows. It only supports Cygwin, of which the gcc installation is subpar compared to the newer gcc provided by some MSYS2 subsystems (MINGW64 gcc is primarily battle tested on MSYS2, on Cygwin it doesn't get as much attention and misses out further fixes and enhancements from the MSYS2 team, for instance it even links to the obsolete msvcrt library), and the hack itself has several flaws that don't seem apparent at first (For instance, -lpthread will link to libwinpthread.dll and result in an invisible dependency on that dll depending on the Windows platform, which will cause loading hsdis to silently fail depending on how it's loaded for seemingly random reasons!). I wanted to replace that (or I guess provide a better alternative) by adding semi proper support to the hsdis build for the more modern and better battle tested gcc that some MSYS2 subsystems provide, to streamline comp iling the binutils hsdis on Windows. So this is mainly about hsdis-binutils on Windows. hsdis-capstone I also decided to support because it's small and relatively easy to pile on top of the existing work, and MSYS2 also provides Capstone as well. The same unfortunately could not be said for hsdis-llvm, which was significantly more complex than Capstone is I'm not sure where to go from here. I could support gcc for hsdis binutils by extending the hack that exists for Cygwin, but I _really_ don't want to do that. I could enhance the build system to semi properly support gcc for hsdis only, as I've done, but the changes will necessarily touch non hsdis files as well, no matter how minimal they are. I'll return this to draft for the time being I suppose, I'd be interested in hearing which way forward you prefer though But while I work on making this change even smaller and easier to review, could I ask the above questions again? (Well, except for the FIXPATH one, you can ignore that) > @magicus I think I might need some help here. Currently all the Cygwin stuff is gated behind ifeq ($(TOOLCHAIN_TYPE), microsoft) checks... should they be behind isBuildOsEnv cygwin checks instead? I don't know how to add support for Cygwin gcc for most of hsdis, since it is quite different from the more modern gcc distributions that are found in places like MSYS2 and MINGW64. But most of the existing logic seems to accomodate more for the Microsoft compiler than it is concerned about the OS environment being used, and for this reason I can't tell which of the 2 checks to use for the existing hack that switches from microsoft to gcc. Also, gcc doesn't require FIXPATH, but Microsoft does, but I don't want to check for microsoft inside TOOLCHAIN_FIND_COMPILER, what should I do instead to ensure gcc doesn't get FIXPATH while Microsoft does? > Also @magicus, what is the typical path passed to --with-binutils like on Windows? Something like --with-binutils=/c/Users/vertig0/Downloads/binutils-2.42 doesn't work correctly, since the include path to dis-asm.h would then become `#include "/c/Users/vertig0/Downloads/binutils-2.42/include/dis-asm.h"` Which causes a configure check to fail on the compile stage since gcc cannot recognise the MINGW-esque /c/ as a drive, and then causes configure to erroneously report binutils as using the Old API when it's in fact using the New API. --with-binutils=C:/Users/vertig0/Downloads/binutils-2.42 on the other hand works as expected. Should there be a fixup for the path there so gcc can recognise it properly? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18915#issuecomment-2114331612 From Suchismith.Roy at ibm.com Thu May 16 09:34:30 2024 From: Suchismith.Roy at ibm.com (Suchismith Roy) Date: Thu, 16 May 2024 09:34:30 +0000 Subject: JDK-8170635 -- adding a base library to java In-Reply-To: References: <7b083ada-a538-406e-aac0-bd5e0dad5353@oracle.com> Message-ID: Hi Magnus Could you provide an existing PR/implementation I can refer from ? Thanks Suchismith Roy From: build-dev on behalf of Suchismith Roy Date: Wednesday, 8 May 2024 at 11:47?PM To: Magnus Ihse Bursie , Thomas St?fe Cc: build-dev at openjdk.org Subject: [EXTERNAL] RE: JDK-8170635 -- adding a base library to java Thanks for the reply @Magnus Ihse Bursie Is there any example of PRs which create such libraries that I can refer to ? Is OSAL similar to how os.?cpp is defined and respective platforms implement them ? From: Magnus Ihse Bursie ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. Report Suspicious ZjQcmQRYFpfptBannerEnd Thanks for the reply @Magnus Ihse Bursie Is there any example of PRs which create such libraries that I can refer to ? Is OSAL similar to how os.cpp is defined and respective platforms implement them ? From: Magnus Ihse Bursie Date: Tuesday, 7 May 2024 at 6:18?PM To: Thomas St?fe , Suchismith Roy Cc: build-dev at openjdk.org Subject: [EXTERNAL] Re: JDK-8170635 -- adding a base library to java On 2024-05-06 16:36, Thomas St?fe wrote: > Not sure if you meant to address this mail to a specific person. I > assume with proposal you mean this: > https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? > > If yes, my proposal was to move dladdr out of the OpenJDK code base > into an independent library that would be maintained by IBM, > hopefully, and would be a prerequisite for building the JDK. > If no, whose proposal did you mean? Oh, this is an old bug you're picking up Suchismith! I read through the discussion from 2016. It seems that the suggestion to make an external 3rd party library was only supported by Thomas, and that the general agreement among the other participants was that we should have a general, base-level "OSAL" (OS abstraction library) in the JDK, that could be used by both Hotspot and libjli, as well as other JDK libraries. Creating such a library would be a much larger effort than just adding a AIX implementation of dladdr to it, if it existed. The current structure of the JDK does not readily lend itself to such a library, neither in terms of source code layout nor build system. With that said, I do think it would be good if we had such a library. There are more cases than the AIX dladdr issue that is duplicated, like jio_snprintf() and friends. This has actually caused some headaches when doing static builds, since duplication of these functions are not allowed when creating a single linked instance. (The current duplication in dynamic libraries is just ugly and bad programming, not a compilation error.) But it is a much larger question than just fixing an AIX issue. /Magnus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpai at openjdk.org Thu May 16 11:24:10 2024 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 16 May 2024 11:24:10 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 16:08:17 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comment src/java.base/share/classes/sun/launcher/resources/launcher.properties line 72: > 70: \ by code in modules for which native access is not explicitly enabled.\n\ > 71: \ is one of "deny", "warn" or "allow".\n\ > 72: \ This option will be removed in a future release.\n\ Should this specify the current default value for this option if it isn't set? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603157916 From jpai at openjdk.org Thu May 16 11:45:06 2024 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 16 May 2024 11:45:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 16:08:17 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comment Hello Maurizio, in the current mainline, we have code in `LauncherHelper` https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/launcher/LauncherHelper.java#L636 where we enable native access to all unnamed modules if an executable jar with `Enable-Native-Access: ALL-UNNAMED` manifest is being launched. For such executable jars, what is the expected semantics when the launch also explicitly has a `--enable-native-access=M1,M2` option. Something like: java --enable-native-access=M1,M2 -jar foo.jar where `foo.jar` has `Enable-Native-Access: ALL-UNNAMED` in its manifest. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2115005638 From mcimadamore at openjdk.org Thu May 16 11:50:05 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 16 May 2024 11:50:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 11:42:48 GMT, Jaikiran Pai wrote: > Hello Maurizio, in the current mainline, we have code in `LauncherHelper` https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/launcher/LauncherHelper.java#L636 where we enable native access to all unnamed modules if an executable jar with `Enable-Native-Access: ALL-UNNAMED` manifest is being launched. For such executable jars, what is the expected semantics when the launch also explicitly has a `--enable-native-access=M1,M2` option. Something like: > > ``` > java --enable-native-access=M1,M2 -jar foo.jar > ``` > > where `foo.jar` has `Enable-Native-Access: ALL-UNNAMED` in its manifest. The options are additive - e.g. the enable-native-access in the manifest will add up to the enable-native-access in the command line, so effectively it will be as if you were running with --enable-native-access=M1,M2,ALL-UNNAMED > src/java.base/share/classes/sun/launcher/resources/launcher.properties line 72: > >> 70: \ by code in modules for which native access is not explicitly enabled.\n\ >> 71: \ is one of "deny", "warn" or "allow".\n\ >> 72: \ This option will be removed in a future release.\n\ > > Should this specify the current default value for this option if it isn't set? We already do, see https://github.com/openjdk/jdk/pull/19213/files/1c45e5d56c429205ab8185481bc1044a86ab3bc6#diff-d05029afe6aed86f860a10901114402f1f6af4fe1e4b46d883141ab1d2a527b8R582 ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2115012361 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603195671 From jpai at openjdk.org Thu May 16 11:58:06 2024 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 16 May 2024 11:58:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: References: Message-ID: <6OAF_6PrZCouzDuhvwc8J6TSIUmBEc4HEi9Z-155BJ8=.4968dd9f-3939-4a49-9f29-57a901a7d12a@github.com> On Thu, 16 May 2024 11:47:13 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/sun/launcher/resources/launcher.properties line 72: >> >>> 70: \ by code in modules for which native access is not explicitly enabled.\n\ >>> 71: \ is one of "deny", "warn" or "allow".\n\ >>> 72: \ This option will be removed in a future release.\n\ >> >> Should this specify the current default value for this option if it isn't set? > > We already do, see > https://github.com/openjdk/jdk/pull/19213/files/1c45e5d56c429205ab8185481bc1044a86ab3bc6#diff-d05029afe6aed86f860a10901114402f1f6af4fe1e4b46d883141ab1d2a527b8R582 This is slightly different from what we do in the other PR for unsafe memory access where we specify the default in the launcher's help text too https://github.com/openjdk/jdk/pull/19174/files#diff-799093930b698e97b23ead98c6496261af1e2e33ec7aa9261584870cbee8a5eaR219. I don't have a strong opinion on this, I think either one is fine. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603205279 From mcimadamore at openjdk.org Thu May 16 12:20:05 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 16 May 2024 12:20:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v6] In-Reply-To: <6OAF_6PrZCouzDuhvwc8J6TSIUmBEc4HEi9Z-155BJ8=.4968dd9f-3939-4a49-9f29-57a901a7d12a@github.com> References: <6OAF_6PrZCouzDuhvwc8J6TSIUmBEc4HEi9Z-155BJ8=.4968dd9f-3939-4a49-9f29-57a901a7d12a@github.com> Message-ID: On Thu, 16 May 2024 11:55:35 GMT, Jaikiran Pai wrote: >> We already do, see >> https://github.com/openjdk/jdk/pull/19213/files/1c45e5d56c429205ab8185481bc1044a86ab3bc6#diff-d05029afe6aed86f860a10901114402f1f6af4fe1e4b46d883141ab1d2a527b8R582 > > This is slightly different from what we do in the other PR for unsafe memory access where we specify the default in the launcher's help text too https://github.com/openjdk/jdk/pull/19174/files#diff-799093930b698e97b23ead98c6496261af1e2e33ec7aa9261584870cbee8a5eaR219. > > I don't have a strong opinion on this, I think either one is fine. Ah, apologies, I was looking in the wrong place. I agree that we should specify default in the launcher, as well as in the man pages. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603233038 From mcimadamore at openjdk.org Thu May 16 12:23:44 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 16 May 2024 12:23:44 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Add note on --illegal-native-access default value in the launcher help ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/1c45e5d5..3a0db276 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From prappo at openjdk.org Thu May 16 12:37:19 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Thu, 16 May 2024 12:37:19 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback It's probably the biggest update JavaDoc has seen in ages. Tremendous, good work. Thanks, Jon. ------------- Marked as reviewed by prappo (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16388#pullrequestreview-2060613760 From liach at openjdk.org Thu May 16 13:08:20 2024 From: liach at openjdk.org (Chen Liang) Date: Thu, 16 May 2024 13:08:20 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback A meta question about the JEP: Why don't Javadoc features (like snippets and markdown comments) don't go through preview, while Compiler features mostly do? Is there any bar for previews? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115199037 From alanb at openjdk.org Thu May 16 13:50:14 2024 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 16 May 2024 13:50:14 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23] In-Reply-To: References: <_sbNFJXG7ghwsfNfxaGvvoDQ7-UtWpnhGnygKsFTsgQ=.623700db-7306-4b34-9e05-ca9059797e39@github.com> Message-ID: On Tue, 16 Apr 2024 13:54:53 GMT, Alan Bateman wrote: >>> > @mlchung @AlanBateman Any thoughts on this latest version? Is this going into the direction you had envisioned? Any more blockers? The CSR should be up-to-date and is open for review as well. If no more blockers I'll go over this patch once more and clean it up to prepare for integration. Thanks! >>> >>> Thanks for all the efforts on this. >> >> Thanks for looking at this, Alan! >> >>> I've looked through the latest version. I'm a little bit comfortable with LinkDeltaProducer. One reason it's build tool that is tied tied to code in the jdk.jlink module, and secondly is that it copies runtime-image-link.delta into the run-time image. Our long standing position is that the run-time image is created by jlink rather than a combination of jlink and extra stuff copied in by the build. >>> >>> The part that I like with the current proposal is lib/runtime-image-link.delta as it's less complicated that previous iterations that added a resource into the jimage container. >>> >>> What would you (and @mlchung) think of having jlink generate lib/runtime-image-link.delta as a step between the pipeline and image generation? >> >> If I understand you correctly, this would be no longer a build-time only approach to produce the "linkable runtime"? It would be some-kind of jlink-option driven approach (as it would run some code that should only run when producing a linkable runtime is requested)? Other than that, it should be fine as the previous iteration basically did that but at a different phase. Also note that the previous iteration used a build-only jlink plugin so as to satisfy the build-time only approach, yet it ran as part of the plugin-pipeline which wasn't desired either. But it was something similar to what you seem to be describing now. Did I get something wrong? > >> If I understand you correctly, this would be no longer a build-time only approach to produce the "linkable runtime"? It would be some-kind of jlink-option driven approach (as it would run some code that should only run when producing a linkable runtime is requested)? Other than that, it should be fine as the previous iteration basically did that but at a different phase. Also note that the previous iteration used a build-only jlink plugin so as to satisfy the build-time only approach, yet it ran as part of the plugin-pipeline which wasn't desired either. But it was something similar to what you seem to be describing now. Did I get something wrong? > > I think it continues to build time, it's just using some hidden jlink option. So yes, it similar to a previous iteration except that it doesn't run as a plugin the pipeline and the delta goes to the lib directory. > > Let's see what @mlchung says. You've put a lot of work into this so let's see if we can converge to avoid too many more rounds. > @AlanBateman @mlchung The latest update now uses the `jlink` build time option `--generate-linkable-runtime` to add needed resources to the `jimage` when a runtime linkable JDK image is being asked for using the configure option. This now runs outside the plugin-pipeline. I think this is what you meant. Sorry it took longer to get back to this... I think you've got this to a good place and I think the overall solution is good. It may be that JDK should move to this by default in the future, and at the same time re-visit the restriction on generating an image containing jdk.jlink, but let's see if any issues come up. I've added myself as Reviewer to the CSR and I'm working through the code changes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2115298661 From prappo at openjdk.org Thu May 16 14:17:18 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Thu, 16 May 2024 14:17:18 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: <27ZxYFTigdov1GoURB9umQqT9-1dmUskCsovdGyT2Tw=.b05cf1ec-9ca8-4cca-a28f-d8e9198e9857@github.com> On Thu, 16 May 2024 13:05:39 GMT, Chen Liang wrote: > A meta question about the JEP: Why don't Javadoc features (like snippets and markdown comments) don't go through preview, while Compiler features mostly do? Is there any bar for previews? Jon could probably reply more substantially, but my understanding is that [_JEP 12: Preview Features_](https://openjdk.org/jeps/12) is barely applicable here (emphasis mine): > ## Summary > > A *preview feature* is a new feature of the Java language, Java Virtual Machine, or **Java SE API** that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform. Technically, the only reason we could invoke JEP 12 here would be a tiny change to `Elements`, which is Java SE. But let's be honest, that change is not what _JEP 467: Markdown Documentation Comments_ is about. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115367104 From prappo at openjdk.org Thu May 16 14:29:17 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Thu, 16 May 2024 14:29:17 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback > > A meta question about the JEP: Why don't Javadoc features (like snippets and markdown comments) don't go through preview, while Compiler features mostly do? Is there any bar for previews? > > Jon could probably reply more substantially, but my understanding is that [_JEP 12: Preview Features_](https://openjdk.org/jeps/12) is barely applicable here (emphasis mine): > > > ## Summary > > A _preview feature_ is a new feature of the Java language, Java Virtual Machine, or **Java SE API** that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform. > > Technically, the only reason we could invoke JEP 12 here would be a tiny change to `Elements`, which is Java SE. But let's be honest, that change is not what _JEP 467: Markdown Documentation Comments_ is about. Additionally, JavaDoc supports Preview APIs, but does not support previews (meta-previews?) of its own features. We simply don't have a mechanism to say: "Hey, that thing you are looking at is a new feature of JavaDoc. Click _here_ to learn more." ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115404225 From liach at openjdk.org Thu May 16 14:56:21 2024 From: liach at openjdk.org (Chen Liang) Date: Thu, 16 May 2024 14:56:21 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback My rationale for a potential preview is that we changed `-Xlint:dangling-doc-comments` as `///` is now dangling doc comment. Is this considered a Java programming language change? There were some community comments objecting the use of `///` for markdown documentation, and called for alternative syntaxes like `/*markdown */`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115466695 From jjg at openjdk.org Thu May 16 15:08:27 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 16 May 2024 15:08:27 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 15:03:26 GMT, Pavel Rappo wrote: > My rationale for a potential preview is that we changed `-Xlint:dangling-doc-comments` as `///` is now dangling doc comment. Is this considered a Java programming language change? There were some community comments objecting the use of `///` for markdown documentation, and called for alternative syntaxes like `/*markdown */`. There is no change to the Java Language Specification in this work. In fact, JLS does not mention documentation comments in any form -- either traditional or end-of-line comments. (The original version of JLS did mention them; all subsequent versions do not.) As a result, even though `javadoc` is used to _generate_ the Java SE specifications, `javadoc`, the standard doclet, and documentation comments are all JDK features, not Java SE features. Given the relative size of this feature, compared to other new `javadoc` work, I think it is fair to say that if there had been a way to _preview_ the work, we would have considered doing so. But "preview" and JEP 12 are specifically for Java SE: >A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115502498 From prappo at openjdk.org Thu May 16 15:08:26 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Thu, 16 May 2024 15:08:26 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 14:53:17 GMT, Chen Liang wrote: > My rationale for a potential preview is that we changed `-Xlint:dangling-doc-comments` as `///` is now dangling doc comment. Is this considered a Java programming language change? There were some community comments objecting the use of `///` for markdown documentation, and called for alternative syntaxes like `/*markdown */`. It is certainly not a Java language change. The Java language and JLS have never bothered with the javadoc comments. If you are concerned with it being a lint warning rather than a **doc**lint warning, then it's a technicality: doclint sees less than lint sees, and sadly not enough for that check. Thus, that check was put in `lint. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115497564 From liach at openjdk.org Thu May 16 15:14:17 2024 From: liach at openjdk.org (Chen Liang) Date: Thu, 16 May 2024 15:14:17 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback Thanks for these explanations! Makes sense, also great that we can have Javadoc features delivered easily because its loose coupling with Java language. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115515659 From jjg at openjdk.org Thu May 16 16:41:18 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 16 May 2024 16:41:18 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 15:03:26 GMT, Pavel Rappo wrote: > If you are concerned with it being a lint warning rather than a **doc**lint warning, then it's a technicality: doclint sees less than lint sees, and sadly not enough for that check. Thus, that check was put in `lint. To clarify that a bit ... There's a subtle difference between _documentation comments_ and _documentation comments as used with the standard doclet_. From the beginning, documentation comments have been those enclosed in `/**...*/` but there has never been a formal specification that the only content is that accepted by the standard doclet. Indeed, over the years, there have been various doclets, not all from Sun/Oracle, and not all accepting the content syntax used by the standard doclet. This practice continues with the introduction of `///` comments. So, there are actually two issues conflated in this work: 1. introducing the use of `///` for documentation comments 2. introducing the use of Markdown for some comments They go together because it would be silly/confusing to introduce `///` comments by themselves, and figuring out what to do with them until the use of Markdown was introduced. Arguably, the first bullet by itself could have been a Preview feature, but it probably falls below any appropriate threshold. You might also note that `Elements.getDocComment` and friends say nothing about the syntactic form of the content of any doc comment after the lexical wrappings have been removed. In particular, words like HTML and Markdown do not appear in the specs for these methods. This is intentional and means that a different doclet could interpret the content of the doc comment in any way that it chooses. Back to this thread, and `-Xlint` vs `-Xdoclint`: `doclint` is specifically about issues within the content of doc comments as defined in the `JavaDoc Documentation Comment Specification for the Standard Docket` and interpreted by the standard doclet. `dangling-doc-comments` is not specific to comments seen by the standard doclet. It applies to all doc comments, whatever the form of their content. As such, it is a `javac` lexical check, and belongs in `-Xlint`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115724002 From jjg at openjdk.org Thu May 16 16:50:29 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 16 May 2024 16:50:29 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 15:05:32 GMT, Jonathan Gibbons wrote: > There were some community comments objecting the use of `///` for markdown documentation, and called for alternative syntaxes like `/*markdown */`. This was [addressed](https://openjdk.org/jeps/467#Using-///-for-Markdown-documentation-comments) in an update to JEP 467. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-2115749018 From mikael at openjdk.org Thu May 16 17:13:01 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Thu, 16 May 2024 17:13:01 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Let me suggest that we wait for the next release of SLEEF to be released in that case since that release seems to be imminent. That way we'll get both the performance fixes *and* we can include the RISC-V header files at the same time. Fair? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2115793711 From hannesw at openjdk.org Thu May 16 17:56:17 2024 From: hannesw at openjdk.org (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=) Date: Thu, 16 May 2024 17:56:17 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: On Wed, 15 May 2024 21:04:36 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > update tests for dangling doc comments, per review feedback src/jdk.internal.md/share/classes/jdk/internal/markdown/MarkdownTransformer.java line 276: > 274: // The following {@code transform} methods invoke {@code transform} on > 275: // any children that may contain Markdown. If the transformations on > 276: // the children are all identify transformations (that is the result Typo: identify -> identity src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 1465: > 1463: private final HtmlRenderer renderer = HtmlRenderer.builder() > 1464: .nodeRendererFactory(headingRendererFactory) > 1465: .extensions(List.of(tablesExtn/*, headingIdsExtn*/)) Is there a reason to keep the commented argument? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1603439954 PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1603716675 From jjg at openjdk.org Thu May 16 18:17:31 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 16 May 2024 18:17:31 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v70] In-Reply-To: References: Message-ID: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: address review feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/16388/files - new: https://git.openjdk.org/jdk/pull/16388/files/bfa35bd4..a0df7a4b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=69 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=68-69 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16388.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388 PR: https://git.openjdk.org/jdk/pull/16388 From jjg at openjdk.org Thu May 16 18:29:18 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 16 May 2024 18:29:18 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v69] In-Reply-To: References: Message-ID: <9cCjn93xB2wVvlbaMhTVDVpATceUjfiaYTasTTX3x3s=.3d30ce89-5a29-44b3-8666-30dd74529f17@github.com> On Thu, 16 May 2024 16:44:51 GMT, Hannes Walln?fer wrote: >> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: >> >> update tests for dangling doc comments, per review feedback > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 1465: > >> 1463: private final HtmlRenderer renderer = HtmlRenderer.builder() >> 1464: .nodeRendererFactory(headingRendererFactory) >> 1465: .extensions(List.of(tablesExtn/*, headingIdsExtn*/)) > > Is there a reason to keep the commented argument? no, it should go; thanks for catching ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1603864642 From alanb at openjdk.org Thu May 16 18:43:06 2024 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 16 May 2024 18:43:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Add note on --illegal-native-access default value in the launcher help src/java.base/share/classes/java/lang/System.java line 2023: > 2021: * @throws NullPointerException if {@code filename} is {@code null} > 2022: * @throws IllegalCallerException If the caller is in a module that > 2023: * does not have native access enabled. The exception description is fine, just noticed the other exception descriptions start with a lowercase "if", this one is different. src/java.base/share/man/java.1 line 587: > 585: \f[V]deny\f[R]: This mode disables all illegal native access except for > 586: those modules enabled by the \f[V]--enable-native-access\f[R] > 587: command-line option. "This mode disable all illegal native access except for those modules enabled the --enable-native-access command-line option". This can be read to mean that modules granted native access with the command line option is also illegal native access An alternative is to make the second part of the sentence a new sentence, something like "Only modules enabled by the --enable-native-access command line option may perform native access. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603878829 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1603875920 From sviswanathan at openjdk.org Thu May 16 23:38:08 2024 From: sviswanathan at openjdk.org (Sandhya Viswanathan) Date: Thu, 16 May 2024 23:38:08 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v9] In-Reply-To: References: Message-ID: <9aJy6ON5gSI5ihwK-WkvnyrtHjJTPN5IAFymf1Jpp9M=.32b8ee27-465d-47d8-9099-22cb846cff9a@github.com> On Fri, 10 May 2024 00:19:32 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > whitespace src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 168: > 166: XMMRegister broadcast5 = xmm24; > 167: KRegister limb0 = k1; > 168: KRegister limb5 = k2; limb5 and select are not being used anymore. src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 185: > 183: __ evmovdquq(modulus, allLimbs, ExternalAddress(modulus_p256()), false, Assembler::AVX_512bit, rscratch); > 184: > 185: // A = load(*aLimbs) A little bit more description in comments on what the load step involves would be helpful. e.g. Load upper 4 limbs, shift left by 1 limb using perm, or in the lowest limb. src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 270: > 268: __ push(r14); > 269: __ push(r15); > 270: No need to save/restore rbx, r12, r14, r15. Only r13 is used as temp in montgomeryMultiply(aLimbs, bLimbs, rLimbs). That too could be easily changed to r8. src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 286: > 284: __ mov(aLimbs, c_rarg0); > 285: __ mov(bLimbs, c_rarg1); > 286: __ mov(rLimbs, c_rarg2); We could directly call montgomeryMultiply(c_rarg0, c_rarg1, c_rarg2) then these moves are not necessary. src/hotspot/cpu/x86/vm_version_x86.cpp line 1370: > 1368: > 1369: #ifdef _LP64 > 1370: if (supports_avx512ifma() && supports_avx512vlbw() && MaxVectorSize >= 64) { No need to tie the intrinsic to MaxVectorSize setting. src/hotspot/share/opto/library_call.cpp line 7564: > 7562: > 7563: if (!stubAddr) return false; > 7564: if (stopped()) return true; Line 7564 seems redundant here as there is no range check or anything like that before this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1604169603 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1604141586 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1604174141 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1604175443 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1603792252 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1603865712 From alanb at openjdk.org Fri May 17 05:54:03 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 05:54:03 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 22:20:39 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > remove jaxp-compat.properties from the list make/modules/java.xml/Copy.gmk line 37: > 35: JAXPPROPFILE_TARGET_FILES := $(subst $(JAXPPROPFILE_SRC_DIR),$(CONF_DST_DIR),$(JAXPPROPFILE_SRCS)) > 36: > 37: $(CONF_DST_DIR)/%: $(JAXPPROPFILE_SRC_DIR)/% The make file changes to copy the properties files look okay but I'm curious about why the naming changes from "XML" to "JAXPPROFILE". ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1604383246 From alanb at openjdk.org Fri May 17 06:24:07 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 06:24:07 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 22:20:39 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > remove jaxp-compat.properties from the list src/java.xml/share/conf/jaxp-strict.properties line 9: > 7: # test the more secure/strict behavior, identify issues such as a processor > 8: # unknowingly makes outbound network connections to fetch DTD, or processes XML > 9: # that relies on extension functions. There isn't a JEP to propose that XML processing be secure by default on the technical roadmap right now so I think this paragraph will need to be tweaked to avoid making any assumptions. I think just say that the file provides the settings for more secure XML processing and drop the text about testing (and "and create your own configuration file for the experiment" from the paragraph below). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1604405287 From mli at openjdk.org Fri May 17 06:34:01 2024 From: mli at openjdk.org (Hamlin Li) Date: Fri, 17 May 2024 06:34:01 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. > Let me suggest that we wait for the next release of SLEEF to be released in that case since that release seems to be imminent. That way we'll get both the performance fixes _and_ we can include the RISC-V header files at the same time. Fair? Yes, it makes sense to me. Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2116848373 From alanb at openjdk.org Fri May 17 06:40:03 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 06:40:03 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 22:20:39 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > remove jaxp-compat.properties from the list src/java.xml/share/classes/module-info.java line 443: > 441: * > 442: * > 443: * This file allows deployments to test the more secure/strict behavior, I think it might be better to reduce this paragraph down to just say something like "Deploying with this configuation prevents processors from unknowingly making outbound network connections to fetch DTDs, or process XML that makes use of extension functions." We could say that a future JDK release may use a strict configuration by default but that opens the door to questions as to whether the system property is needed, whether jaxp.propeteries is going away, so maybe better to leave that out for now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1604418621 From alanb at openjdk.org Fri May 17 09:34:11 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 09:34:11 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: <9oh0XZoux2OKBke0T-hr6CS9OsuDD6Wk1HdQdPu2YyY=.1d9a2a75-cb80-498c-86f9-da457669e3e8@github.com> On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Add note on --illegal-native-access default value in the launcher help src/java.base/share/classes/java/lang/foreign/package-info.java line 170: > 168: * the special value {@code ALL-UNNAMED} can be used). Access to restricted methods > 169: * from modules not listed by that option is deemed illegal. Clients can > 170: * control how illegal access to restricted method is handled, using the command line I assume this should be "to a restricted method is handled" or "to restricted methods are handled", either would work here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604637950 From alanb at openjdk.org Fri May 17 09:40:21 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 09:40:21 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Add note on --illegal-native-access default value in the launcher help src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 288: > 286: * throw exception depending on the configuration. > 287: */ > 288: void ensureNativeAccess(Module m, Class owner, String methodName, Class currentClass, boolean jni); It might be helpful to future maintainers if we put `@param` descriptions for these parameters. I had to re-read Module.enableNativeAccess to remember the difference between the owner class and the current class. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604644767 From alanb at openjdk.org Fri May 17 09:44:05 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 09:44:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Add note on --illegal-native-access default value in the launcher help src/java.base/share/classes/java/lang/ClassLoader.java line 2448: > 2446: * Invoked in the VM class linking code. > 2447: */ > 2448: static long findNative(ClassLoader loader, Class clazz, String entryName, String javaName) { I think this is another place where `@param` descriptions would help as it's not immediately clear that "javaName" is a method name. src/java.base/share/classes/java/lang/Runtime.java line 39: > 37: > 38: import jdk.internal.access.SharedSecrets; > 39: import jdk.internal.javac.Restricted; Runtime has been touched for a while so you'll need to bump the copyright year. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604648529 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604650293 From alanb at openjdk.org Fri May 17 09:48:13 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 17 May 2024 09:48:13 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 12:23:44 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Add note on --illegal-native-access default value in the launcher help This looks good. Just a few minor comments where future maintainers might appreciate comments that describe parameters. src/java.base/share/classes/java/lang/Module.java line 332: > 330: String caller = currentClass != null ? currentClass.getName() : "code"; > 331: if (jni) { > 332: System.err.printf(""" System.err may change in a running VM. It may be that we will need to change this at some point to use its initial setting. Not suggesting we changing it now but we might have to re-visit this. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2062832385 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604653749 From hannesw at openjdk.org Fri May 17 10:25:19 2024 From: hannesw at openjdk.org (Hannes =?UTF-8?B?V2FsbG7DtmZlcg==?=) Date: Fri, 17 May 2024 10:25:19 GMT Subject: RFR: 8298405: Implement JEP 467: Markdown Documentation Comments [v70] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 18:17:31 GMT, Jonathan Gibbons wrote: >> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. >> >> Notable features: >> >> * support for `///` documentation comments in `JavaTokenizer` >> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library >> * updates to `DocCommentParser` to treat `///` comments as Markdown >> * updates to the standard doclet to render Markdown comments in HTML > > Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision: > > address review feedback @jonathan-gibbons I'm extremely impressed with this work, especially given its size and the non-trivial problems you had to solve. Kudos also to @pavelrappo for relentless reviewing! ------------- Marked as reviewed by hannesw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/16388#pullrequestreview-2062926643 From erikj at openjdk.org Fri May 17 13:15:05 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 17 May 2024 13:15:05 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 05:51:31 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional commit since the last revision: >> >> remove jaxp-compat.properties from the list > > make/modules/java.xml/Copy.gmk line 37: > >> 35: JAXPPROPFILE_TARGET_FILES := $(subst $(JAXPPROPFILE_SRC_DIR),$(CONF_DST_DIR),$(JAXPPROPFILE_SRCS)) >> 36: >> 37: $(CONF_DST_DIR)/%: $(JAXPPROPFILE_SRC_DIR)/% > > The make file changes to copy the properties files look okay but I'm curious about why the naming changes from "XML" to "JAXPPROFILE". If we are changing this file, we should modernize it. $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ DEST := $(CONF_DST_DIR), \ FILES := $(wildcard $(TOPDIR)/src/java.xml/share/conf/jaxp*.properties*), \ )) TARGETS += $(COPY_XML_MODULE_CONF) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1604981949 From erikj at openjdk.org Fri May 17 13:15:05 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 17 May 2024 13:15:05 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: <9ItSoz7uGqjAXpvgoBoqNzVHqji5rlox0OtPbIoJbq4=.c7a0d8ea-527c-4d7b-a8ab-e01c3a88924d@github.com> On Thu, 16 May 2024 22:20:39 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > remove jaxp-compat.properties from the list make/modules/java.xml/Copy.gmk line 31: > 29: ################################################################################ > 30: # > 31: # Copy property files from share/conf to CONF_DST_DIR LIB_DST_DIR There is no copying to LIB_DST_DIR, so no need to mention it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1604983457 From mcimadamore at openjdk.org Fri May 17 13:23:06 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Fri, 17 May 2024 13:23:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v7] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 18:39:57 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: >> >> Add note on --illegal-native-access default value in the launcher help > > src/java.base/share/classes/java/lang/System.java line 2023: > >> 2021: * @throws NullPointerException if {@code filename} is {@code null} >> 2022: * @throws IllegalCallerException If the caller is in a module that >> 2023: * does not have native access enabled. > > The exception description is fine, just noticed the other exception descriptions start with a lowercase "if", this one is different. I'll fix this. Note that in `ModuleLayer.Controller`, all `@throws` start with capital letter, which is probably where I copied/pasted this from. I'll fix all, except for `ModuleLayer` where, for consistency, I think upper case is better. > src/java.base/share/man/java.1 line 587: > >> 585: \f[V]deny\f[R]: This mode disables all illegal native access except for >> 586: those modules enabled by the \f[V]--enable-native-access\f[R] >> 587: command-line option. > > "This mode disable all illegal native access except for those modules enabled the --enable-native-access command-line option". > > This can be read to mean that modules granted native access with the command line option is also illegal native access An alternative is to make the second part of the sentence a new sentence, something like "Only modules enabled by the --enable-native-access command line option may perform native access. I've simplified the text to: This mode disables illegal native access. That is, any illegal native access causes an `IllegalCallerException`. This mode will become the default in a future release. I think it's not necessary to state again the dependency on `--enable-native-access` as we already defined what "illegal native access" means. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604994928 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1604993505 From mcimadamore at openjdk.org Fri May 17 13:38:25 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Fri, 17 May 2024 13:38:25 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods > * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation > > This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. > > Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. > > Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Address review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19213/files - new: https://git.openjdk.org/jdk/pull/19213/files/3a0db276..789bdf48 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19213&range=06-07 Stats: 28 lines in 10 files changed: 8 ins; 2 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/19213.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19213/head:pull/19213 PR: https://git.openjdk.org/jdk/pull/19213 From mikael at openjdk.org Fri May 17 16:48:02 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 17 May 2024 16:48:02 GMT Subject: RFR: 8329816: Add SLEEF version 3.6 In-Reply-To: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> References: <6jg27TPuZKNM8WsxMUYeOlO5MK7v-YukCdniJ7QEEC0=.7be5c67f-9493-462a-9626-d294ba2e8c5d@github.com> Message-ID: On Fri, 10 May 2024 22:32:29 GMT, Mikael Vidstedt wrote: > [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) to move forward. Thank you Hamlin. I'll try to keep my eyes open for the announcement of the upcoming SLEEF release but do feel free to notify me if you see it first! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19185#issuecomment-2117988886 From duke at openjdk.org Fri May 17 17:10:06 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 17 May 2024 17:10:06 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v10] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: comments from Sandhya ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/8cd095dd..5c360e35 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=08-09 Stats: 82 lines in 4 files changed: 1 ins; 59 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From duke at openjdk.org Fri May 17 17:10:09 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 17 May 2024 17:10:09 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v9] In-Reply-To: <9aJy6ON5gSI5ihwK-WkvnyrtHjJTPN5IAFymf1Jpp9M=.32b8ee27-465d-47d8-9099-22cb846cff9a@github.com> References: <9aJy6ON5gSI5ihwK-WkvnyrtHjJTPN5IAFymf1Jpp9M=.32b8ee27-465d-47d8-9099-22cb846cff9a@github.com> Message-ID: <4xhuUYOdlWYYc55JwT3nlFeXj6E5gjrYfauN_RF3DB0=.73d9f401-3dda-4450-94bf-fa4a99cf31e4@github.com> On Thu, 16 May 2024 23:21:36 GMT, Sandhya Viswanathan wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: >> >> whitespace > > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 168: > >> 166: XMMRegister broadcast5 = xmm24; >> 167: KRegister limb0 = k1; >> 168: KRegister limb5 = k2; > > limb5 and select are not being used anymore. Thanks, fixed (and also broadcast5) > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 185: > >> 183: __ evmovdquq(modulus, allLimbs, ExternalAddress(modulus_p256()), false, Assembler::AVX_512bit, rscratch); >> 184: >> 185: // A = load(*aLimbs) > > A little bit more description in comments on what the load step involves would be helpful. e.g. Load upper 4 limbs, shift left by 1 limb using perm, or in the lowest limb. Done > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 270: > >> 268: __ push(r14); >> 269: __ push(r15); >> 270: > > No need to save/restore rbx, r12, r14, r15. Only r13 is used as temp in montgomeryMultiply(aLimbs, bLimbs, rLimbs). That too could be easily changed to r8. Seems I forgot to completely cleanup, thanks! (Originally copied from poly1305 stub) > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 286: > >> 284: __ mov(aLimbs, c_rarg0); >> 285: __ mov(bLimbs, c_rarg1); >> 286: __ mov(rLimbs, c_rarg2); > > We could directly call montgomeryMultiply(c_rarg0, c_rarg1, c_rarg2) then these moves are not necessary. Gave them symbolic names and passed the gpr temp and parameter. vector register map still in the montgomeryMultiply function, but gprs explicitly passed in. 'close enough'? > src/hotspot/cpu/x86/vm_version_x86.cpp line 1370: > >> 1368: >> 1369: #ifdef _LP64 >> 1370: if (supports_avx512ifma() && supports_avx512vlbw() && MaxVectorSize >= 64) { > > No need to tie the intrinsic to MaxVectorSize setting. Done > src/hotspot/share/opto/library_call.cpp line 7564: > >> 7562: >> 7563: if (!stubAddr) return false; >> 7564: if (stopped()) return true; > > Line 7564 seems redundant here as there is no range check or anything like that before this. Oh. That is what that is for... I thought it was some soft of 'VM quitting' short-circuit. Removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605328906 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605328960 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605328859 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605328829 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605329040 PR Review Comment: https://git.openjdk.org/jdk/pull/18583#discussion_r1605328995 From jjg at openjdk.org Fri May 17 17:45:27 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Fri, 17 May 2024 17:45:27 GMT Subject: Integrated: 8298405: Implement JEP 467: Markdown Documentation Comments In-Reply-To: References: Message-ID: On Thu, 26 Oct 2023 23:29:00 GMT, Jonathan Gibbons wrote: > Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP. > > Notable features: > > * support for `///` documentation comments in `JavaTokenizer` > * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library > * updates to `DocCommentParser` to treat `///` comments as Markdown > * updates to the standard doclet to render Markdown comments in HTML This pull request has now been integrated. Changeset: 0a58cffe Author: Jonathan Gibbons URL: https://git.openjdk.org/jdk/commit/0a58cffe88ba823e71fcdcca64b784ed04ca5398 Stats: 26546 lines in 250 files changed: 25839 ins; 257 del; 450 mod 8298405: Implement JEP 467: Markdown Documentation Comments 8329296: Update Elements for '///' documentation comments Co-authored-by: Jim Laskey Reviewed-by: prappo, darcy, hannesw ------------- PR: https://git.openjdk.org/jdk/pull/16388 From duke at openjdk.org Fri May 17 21:16:47 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 17 May 2024 21:16:47 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: shenandoah verifier ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/5c360e35..df4fe6fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=09-10 Stats: 7 lines in 2 files changed: 6 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From joehw at openjdk.org Fri May 17 21:57:00 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 17 May 2024 21:57:00 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v9] In-Reply-To: References: Message-ID: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: modernize make copy; update module summary and jaxp-strict. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/cf4df792..2ee2c7ca Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=07-08 Stats: 24 lines in 3 files changed: 1 ins; 12 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From joehw at openjdk.org Fri May 17 21:57:01 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 17 May 2024 21:57:01 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v8] In-Reply-To: References: Message-ID: On Thu, 16 May 2024 22:20:39 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > remove jaxp-compat.properties from the list Thanks Alan, Erik! Updated accordingly. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2118424649 From sviswanathan at openjdk.org Fri May 17 21:58:14 2024 From: sviswanathan at openjdk.org (Sandhya Viswanathan) Date: Fri, 17 May 2024 21:58:14 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 21:16:47 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > shenandoah verifier Marked as reviewed by sviswanathan (Reviewer). The intrinsics and the C2 changes look good to me. ------------- PR Review: https://git.openjdk.org/jdk/pull/18583#pullrequestreview-2064439617 PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2118426661 From duke at openjdk.org Fri May 17 22:20:08 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Fri, 17 May 2024 22:20:08 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 21:16:47 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > shenandoah verifier Thanks Sandhya! Now that I have @ascarpino approval as well, I plan to integrate next Tuesday. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2118443577 From erikj at openjdk.org Fri May 17 23:06:03 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 17 May 2024 23:06:03 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v9] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 21:57:00 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > modernize make copy; update module summary and jaxp-strict. Build change looks good. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2064478337 From jpai at openjdk.org Sat May 18 11:43:02 2024 From: jpai at openjdk.org (Jaikiran Pai) Date: Sat, 18 May 2024 11:43:02 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: <_4CgX7Ojzb5QH2sJ4k2fDgfz_zba03l_4feYaVyzhl0=.a6128ce8-56c3-4b71-a0e3-cf48c9b68c3e@github.com> On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments Marked as reviewed by jpai (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2064736036 From joehw at openjdk.org Sun May 19 05:01:32 2024 From: joehw at openjdk.org (Joe Wang) Date: Sun, 19 May 2024 05:01:32 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: withdraw changes to jaxp.properties. The configuration process has not changed, changing the default configuration would result in many failures that test the process. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/2ee2c7ca..dfc965c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=08-09 Stats: 10 lines in 2 files changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From alanb at openjdk.org Mon May 20 07:16:04 2024 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 20 May 2024 07:16:04 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: On Sun, 19 May 2024 05:01:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > withdraw changes to jaxp.properties. The configuration process has not changed, changing the default configuration would result in many failures that test the process. Looks good, just one comment on on the jaxp-strict.properties file text. src/java.xml/share/conf/jaxp-strict.properties line 17: > 15: # java -Djava.xml.config.file=$JAVA_HOME/conf/jaxp-strict.properties > 16: # > 17: # The pathname to the configuration file must be valid. If it is not absolute, I think it would be better to drop this paragraph or else just replace it with a sentence to say that the java.xml module description specifies the system property. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2065520089 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606350445 From mullan at openjdk.org Mon May 20 12:51:04 2024 From: mullan at openjdk.org (Sean Mullan) Date: Mon, 20 May 2024 12:51:04 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: On Sun, 19 May 2024 05:01:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > withdraw changes to jaxp.properties. The configuration process has not changed, changing the default configuration would result in many failures that test the process. src/java.xml/share/classes/module-info.java line 444: > 442: * > 443: * Deploying with this configuration prevents processors from unknowingly making > 444: * outbound network connections to fetch DTDs, or process XML that makes use of s/process/processing/ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606737006 From alanb at openjdk.org Mon May 20 12:58:04 2024 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 20 May 2024 12:58:04 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: On Mon, 20 May 2024 12:48:01 GMT, Sean Mullan wrote: >> Joe Wang has updated the pull request incrementally with one additional commit since the last revision: >> >> withdraw changes to jaxp.properties. The configuration process has not changed, changing the default configuration would result in many failures that test the process. > > src/java.xml/share/classes/module-info.java line 444: > >> 442: * >> 443: * Deploying with this configuration prevents processors from unknowingly making >> 444: * outbound network connections to fetch DTDs, or process XML that makes use of > > s/process/processing/ In XML parlance, a "processor" is an aggregation of parsers, serializers, and other things that contribute to the processing. So I think it could be either here, but you have a point and if it stays as "processor" then it should link #FacPro where the term is defined. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606745477 From mullan at openjdk.org Mon May 20 13:06:04 2024 From: mullan at openjdk.org (Sean Mullan) Date: Mon, 20 May 2024 13:06:04 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: <2mJ-7JL_PjE-BMboEkzX_Eb_hvccSdjiKyS42wM0E_A=.96b2b620-9c30-4c14-b367-f53ba929eed5@github.com> On Mon, 20 May 2024 12:55:24 GMT, Alan Bateman wrote: >> src/java.xml/share/classes/module-info.java line 444: >> >>> 442: * >>> 443: * Deploying with this configuration prevents processors from unknowingly making >>> 444: * outbound network connections to fetch DTDs, or process XML that makes use of >> >> s/process/processing/ > > In XML parlance, a "processor" is an aggregation of parsers, serializers, and other things that contribute to the processing. So I think it could be either here, but you have a point and if it stays as "processor" then it should link #FacPro where the term is defined. It's the wording that doesn't sound right, before this you have "making" which doesn't sound right with "process". Maybe it needs two sentences. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606754542 From joehw at openjdk.org Mon May 20 16:29:36 2024 From: joehw at openjdk.org (Joe Wang) Date: Mon, 20 May 2024 16:29:36 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v11] In-Reply-To: References: Message-ID: <4tfHaJ1FaeY04rnf4G8Px8hZltyQxTJ_F_FYkJNuwPQ=.fbfd4253-ce53-4464-8e67-60afa018085d@github.com> > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: updated jaxp-strict; fixed typo in module-info. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/dfc965c6..55a86db3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=09-10 Stats: 5 lines in 2 files changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From joehw at openjdk.org Mon May 20 16:29:36 2024 From: joehw at openjdk.org (Joe Wang) Date: Mon, 20 May 2024 16:29:36 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: References: Message-ID: On Mon, 20 May 2024 07:13:02 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional commit since the last revision: >> >> withdraw changes to jaxp.properties. The configuration process has not changed, changing the default configuration would result in many failures that test the process. > > src/java.xml/share/conf/jaxp-strict.properties line 17: > >> 15: # java -Djava.xml.config.file=$JAVA_HOME/conf/jaxp-strict.properties >> 16: # >> 17: # The pathname to the configuration file must be valid. If it is not absolute, > > I think it would be better to drop this paragraph or else just replace it with a sentence to say that the java.xml module description specifies the system property. Thanks Alan. Replaced the paragraph with a reference to the module description. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606993156 From joehw at openjdk.org Mon May 20 16:32:04 2024 From: joehw at openjdk.org (Joe Wang) Date: Mon, 20 May 2024 16:32:04 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a secure by default configuration [v10] In-Reply-To: <2mJ-7JL_PjE-BMboEkzX_Eb_hvccSdjiKyS42wM0E_A=.96b2b620-9c30-4c14-b367-f53ba929eed5@github.com> References: <2mJ-7JL_PjE-BMboEkzX_Eb_hvccSdjiKyS42wM0E_A=.96b2b620-9c30-4c14-b367-f53ba929eed5@github.com> Message-ID: On Mon, 20 May 2024 13:03:36 GMT, Sean Mullan wrote: >> In XML parlance, a "processor" is an aggregation of parsers, serializers, and other things that contribute to the processing. So I think it could be either here, but you have a point and if it stays as "processor" then it should link #FacPro where the term is defined. > > It's the wording that doesn't sound right, before this you have "making" which doesn't sound right with "process". Maybe it needs two sentences. Thanks! Same as Alan, I thought you were talking about "processor" as well on the first glance, then realized you're referring to the parallel statements :-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1606995925 From prr at openjdk.org Mon May 20 18:50:06 2024 From: prr at openjdk.org (Phil Race) Date: Mon, 20 May 2024 18:50:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: <-eahuR7pahX1Zuu-n4btdItPet2ZOE8fX1qYl6sn2s4=.c37ac0ad-bf97-4778-8c8b-c137390c7e14@github.com> On Mon, 13 May 2024 10:49:30 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: >> >> Address review comments > > make/conf/module-loader-map.conf line 105: > >> 103: java.smartcardio \ >> 104: jdk.accessibility \ >> 105: jdk.attach \ > > The list of allowed modules has been rewritten from scratch, by looking at the set of modules containing at least one `native` method declaration. Should I understand this list to be the set of modules exempt from needing to specific that native access is allowed ? ie they always have native access without any warnings, and further that any attempt to enable warnings, or to disable native access for these modules is ignored ? > src/java.desktop/macosx/classes/com/apple/eio/FileManager.java line 61: > >> 59: } >> 60: >> 61: @SuppressWarnings({"removal", "restricted"}) > > There are several of these changes. One option might have been to just disable restricted warnings when building. But on a deeper look, I realized that in all these places we already disabled deprecation warnings for the use of security manager, so I also added a new suppression instead. Sounds reasonable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1607136237 PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1607136808 From prr at openjdk.org Mon May 20 18:50:04 2024 From: prr at openjdk.org (Phil Race) Date: Mon, 20 May 2024 18:50:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments Have you looked into / thought about how this will work for jpackaged apps ? I suspect that both the existing FFM usage and this will be options the application packager will need to supply when building the jpackaged app - the end user cannot pass in command line VM options. Seems there should be some testing of this as some kind of native access could be a common case for jpackaged apps. ------------- PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2066794950 From alanb at openjdk.org Mon May 20 18:54:05 2024 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 20 May 2024 18:54:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: <-eahuR7pahX1Zuu-n4btdItPet2ZOE8fX1qYl6sn2s4=.c37ac0ad-bf97-4778-8c8b-c137390c7e14@github.com> References: <-eahuR7pahX1Zuu-n4btdItPet2ZOE8fX1qYl6sn2s4=.c37ac0ad-bf97-4778-8c8b-c137390c7e14@github.com> Message-ID: On Mon, 20 May 2024 18:39:31 GMT, Phil Race wrote: >> make/conf/module-loader-map.conf line 105: >> >>> 103: java.smartcardio \ >>> 104: jdk.accessibility \ >>> 105: jdk.attach \ >> >> The list of allowed modules has been rewritten from scratch, by looking at the set of modules containing at least one `native` method declaration. > > Should I understand this list to be the set of modules exempt from needing to specific that native access is allowed ? > ie they always have native access without any warnings, and further that any attempt to enable warnings, or to disable native access for these modules is ignored ? Yes, this was added via JDK-8327218. The changes in this PR are just trimming down the list to only the modules that have native code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1607147983 From jjg at openjdk.org Mon May 20 20:21:16 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 20 May 2024 20:21:16 GMT Subject: RFR: 8332545: Fix handling of HTML5 entities in Markdown comments Message-ID: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Please review a small fix to address a crash when handling HTML5 entities in a Markdown doc comment. The path for the `entities.txt` (originally `entities.properties`) was not correctly imported when importing the latest version of `commonmark-java`. And, the makefiles need to be updated to include the `.txt` file in the image. (The interim module for the interim javadoc already had this fix.) A simple new test is provided, containing entities that previously caused `javadoc` to crash. ------------- Commit messages: - JDK-8332545: Fix handling of HTML5 entities in Markdown comments Changes: https://git.openjdk.org/jdk/pull/19317/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19317&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332545 Stats: 79 lines in 3 files changed: 77 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/19317.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19317/head:pull/19317 PR: https://git.openjdk.org/jdk/pull/19317 From prappo at openjdk.org Mon May 20 21:23:00 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Mon, 20 May 2024 21:23:00 GMT Subject: RFR: 8332545: Fix handling of HTML5 entities in Markdown comments In-Reply-To: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> References: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Message-ID: On Mon, 20 May 2024 20:17:10 GMT, Jonathan Gibbons wrote: > Please review a small fix to address a crash when handling HTML5 entities in a Markdown doc comment. > > The path for the `entities.txt` (originally `entities.properties`) was not correctly imported when importing the latest version of `commonmark-java`. And, the makefiles need to be updated to include the `.txt` file in the image. (The interim module for the interim javadoc already had this fix.) > > A simple new test is provided, containing entities that previously caused `javadoc` to crash. Assuming the test fails without the fix, but passes with it, looks good. ------------- Marked as reviewed by prappo (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19317#pullrequestreview-2067063183 From jjg at openjdk.org Mon May 20 22:18:00 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 20 May 2024 22:18:00 GMT Subject: RFR: 8332545: Fix handling of HTML5 entities in Markdown comments In-Reply-To: References: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Message-ID: On Mon, 20 May 2024 21:20:29 GMT, Pavel Rappo wrote: > Assuming the test fails without the fix, but passes with it, looks good. Confirmed the test fails without the fix (crash, as reported) and passes with the fix. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19317#issuecomment-2121306491 From darcy at openjdk.org Mon May 20 22:42:20 2024 From: darcy at openjdk.org (Joe Darcy) Date: Mon, 20 May 2024 22:42:20 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v5] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - Fix-up test. - Merge branch 'master' into JDK-8330188 - Adjust test for deprecated options. - Merge branch 'master' into JDK-8330188 - Update deprecated options test. - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Correct release date as observed in review feedback. - Improve javadoc of class file update. - ... and 1 more: https://git.openjdk.org/jdk/compare/d6b7f9b1...128f53a3 ------------- Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=04 Stats: 107 lines in 37 files changed: 46 ins; 7 del; 54 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From erikj at openjdk.org Mon May 20 23:24:01 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 20 May 2024 23:24:01 GMT Subject: RFR: 8332545: Fix handling of HTML5 entities in Markdown comments In-Reply-To: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> References: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Message-ID: On Mon, 20 May 2024 20:17:10 GMT, Jonathan Gibbons wrote: > Please review a small fix to address a crash when handling HTML5 entities in a Markdown doc comment. > > The path for the `entities.txt` (originally `entities.properties`) was not correctly imported when importing the latest version of `commonmark-java`. And, the makefiles need to be updated to include the `.txt` file in the image. (The interim module for the interim javadoc already had this fix.) > > A simple new test is provided, containing entities that previously caused `javadoc` to crash. Build change looks good. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19317#pullrequestreview-2067198212 From jjg at openjdk.org Tue May 21 00:43:13 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 21 May 2024 00:43:13 GMT Subject: RFR: 8332545: Fix handling of HTML5 entities in Markdown comments In-Reply-To: References: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Message-ID: On Mon, 20 May 2024 23:21:31 GMT, Erik Joelsson wrote: > Build change looks good. Thank you ------------- PR Comment: https://git.openjdk.org/jdk/pull/19317#issuecomment-2121488205 From jjg at openjdk.org Tue May 21 00:43:14 2024 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 21 May 2024 00:43:14 GMT Subject: Integrated: 8332545: Fix handling of HTML5 entities in Markdown comments In-Reply-To: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> References: <5qKhdDMOAE7eH05F6_lwRxGHpdg4RnvgC5LYJ-yvZzo=.eb1e2828-8a80-4620-a954-7ae9e9ec2a29@github.com> Message-ID: On Mon, 20 May 2024 20:17:10 GMT, Jonathan Gibbons wrote: > Please review a small fix to address a crash when handling HTML5 entities in a Markdown doc comment. > > The path for the `entities.txt` (originally `entities.properties`) was not correctly imported when importing the latest version of `commonmark-java`. And, the makefiles need to be updated to include the `.txt` file in the image. (The interim module for the interim javadoc already had this fix.) > > A simple new test is provided, containing entities that previously caused `javadoc` to crash. This pull request has now been integrated. Changeset: 6e805127 Author: Jonathan Gibbons URL: https://git.openjdk.org/jdk/commit/6e805127f8091d46205165746d7c59a40703958d Stats: 79 lines in 3 files changed: 77 ins; 0 del; 2 mod 8332545: Fix handling of HTML5 entities in Markdown comments Reviewed-by: prappo, erikj ------------- PR: https://git.openjdk.org/jdk/pull/19317 From iris at openjdk.org Tue May 21 03:16:09 2024 From: iris at openjdk.org (Iris Clark) Date: Tue, 21 May 2024 03:16:09 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v5] In-Reply-To: References: Message-ID: <0Zzab1jdMT4rriv9IrGmO080pZmZRidn3riJprruulg=.cc6c60a0-aeec-49b6-987b-8540dded850a@github.com> On Mon, 20 May 2024 22:42:20 GMT, Joe Darcy wrote: >> Get JDK 24 underway. > > Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: > > - Fix-up test. > - Merge branch 'master' into JDK-8330188 > - Adjust test for deprecated options. > - Merge branch 'master' into JDK-8330188 > - Update deprecated options test. > - Merge branch 'master' into JDK-8330188 > - Merge branch 'master' into JDK-8330188 > - Merge branch 'master' into JDK-8330188 > - Correct release date as observed in review feedback. > - Improve javadoc of class file update. > - ... and 1 more: https://git.openjdk.org/jdk/compare/d6b7f9b1...128f53a3 Still looks good. ------------- Marked as reviewed by iris (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18787#pullrequestreview-2067401131 From jianglizhou at google.com Tue May 21 05:17:45 2024 From: jianglizhou at google.com (Jiangli Zhou) Date: Mon, 20 May 2024 22:17:45 -0700 Subject: Hermetic Java project meeting In-Reply-To: <6090f2aa-1480-4706-9281-035579a933af@oracle.com> References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> <6090f2aa-1480-4706-9281-035579a933af@oracle.com> Message-ID: On Tue, May 7, 2024 at 5:26?AM Magnus Ihse Bursie < magnus.ihse.bursie at oracle.com> wrote: > On 2024-05-07 06:04, Jiangli Zhou wrote: > > On Tue, Apr 30, 2024 at 5:42?AM Magnus Ihse Bursie wrote: > > I am not sure why clang insisted on picking up ld and not lld. I remeber > trying with -fuse-ld=lld, and that it did not work either. > Unfortunately, I don't remember exactly what the problems were. > > I started reinstalling my Linux workstation yesterday, but something > went wrong, and it failed so hard that it got semi-bricked by the new > installation, so I need to redo everything from scratch. :-( After that > is done, I'll re-test. Hopefully this was just my old installation that > was too broken. > > I decided to spend the time to reinstall my machine. Now linking with > clang works. Kind of. For some reason, it still picks up binutils ld and > not lld, and then -l:libc++.a does not work, but when I replaced it with > -l:libstdc++.a it worked just fine. I guess we need to either forcefully > add -fuse-ld=lld to our clang compilation lines, or figure out if clang is > going to call the binutils or llvm ld, and select the right option. > https://lld.llvm.org/#using-lld has some information on using lld instead of the default linker. > I still find the logic for how clang and gcc locates the default linker to > be mostly magic. I guess I need to make a deep dive in understanding this > to be able to resolve this properly. > > The JDK and VM code has pre-existing assumptions about the JDK > directories and dynamic linking (e.g. the .so). > JLI_IsStaticJDK|JLI_SetStaticJDK|JVM_IsStaticJDK|JVM_SetStaticJDK is > needed for static JDK support to handle those cases correctly. > CreateExecutionEnvironment that I mentioned earlier is one of the > examples. > > I'm quite certain the issue that you are running into is due to the > incorrect static check/handling in CreateExecutionEnvironment. > > I'll have a look at that, thanks for the pointer. > > In my branch, I am only using compile-time #ifdef checks for static vs > dynamic. In the long run, the runtime checks that you have done are a > good thing, but at the moment they are just adding intrusive changes > without providing any benefit -- if we can't reuse .o files between > dynamic and static compilation, there is no point in introducing a > runtime check when we already have a working compile-time check. > > I haven't seen your branch/code. I'd suggest not going with the #ifdef > checks as that's the opposite direction of what we want to achieve. It > doesn't seem to be worth your effort to add more #ifdef checks in > order to do static linking build work, even those are for temporary > testing reasons. > > Okaaaaay... My understanding was that you wanted to push for the quickest > possible integration of building a static java launcher into mainline. > That's correct. Please see more details below. > To do that as fast as possible, we need to use the existing framework for > separating statically and dynamically linked libraries, which means doing > compile time checks using #ifdefs. > Using #ifdefs is not the most efficient path for us to get static Java launcher support in mainline. That's because most of the runtime changes for static Java support in hermetic-java-runtime branch are already done using `JLI_IsStaticJDK|JVM_IsStaticJDK` checks. We should not convert those to use #ifdefs then later convert the #ifdef back to runtime checks again during the integration work. As suggested and discussed earlier we can aim to get the static Java related changes into mainline incrementally. Following is a path that I think would work effectively and "fast" by limiting potentially wasted efforts: Step 1 - Get the makefile changes for linking `javastatic` without any of the runtime changes; Don't enable any build and testing for `javastatic` in this step yet Step 2 - Incrementally get the runtime changes reviewed and integrated into mainline; Enable building for `javastatic` as a test in github workflow when we can run HelloWorld using static launcher in mainline; Enable testing tier 1 for `javastatic` in workflow when we can run jtreg tests with the static launcher - could be done in a later step; Step 3 - Remove all STATIC_BUILD macros in JDK runtime code; Also cleanup the macros in tests (can be done later) CSR and JNI specification work to support JNI_OnLoad_ and friends for JNI dynamic library and builtin library Step 4 - Build (makefile) changes to support linking .a and .so libraries using the same set of .o objects, to avoid compiling the .c/.c++ source twice Those lay the foundation for the hermetic Java work in mainline. > Are you saying now that the priorities has changed, and that you want to > start by introducing your framework for the runtime lookup if we are static > or dynamic? > By "runtime lookup", I think you were referring to the JNI native library lookup. We can handle them as part of the step 2 above. I think for any of the runtime changes, we need to be able to build in the mainline (although initially not included in the github workflow). > > To be honest, I think your prototype is rather hacky in how you implement > this, and I reckon that it will require quite a lot of work to be accepted > into mainline. I also think you need a CSR for changing the Hotspot/JDK > behavior wrt this, which further adds to the process. > For CSR work, we can do that as part of step #3. Actually, for the builtin/dynamic library lookup support, I think the enhancements in hermetic-java-runtime are already close to the proper shape (not hacky). > If you want to go that route instead, then I'll put my work on hold until > you have gotten a working solution for the runtime lookup in mainline. I > gather this means that there is no real stress for me anymore. > Ron and Alan mentioned Tuesday morning PT may not work the best for you. Would you be open for a separate time to discuss the details on moving forward? Best, Jiangli > > /Magnus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thartmann at openjdk.org Tue May 21 07:14:10 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 21 May 2024 07:14:10 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 21:16:47 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > shenandoah verifier I'll send this through our testing and will report back once it passed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2121914071 From alanb at openjdk.org Tue May 21 07:23:07 2024 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 21 May 2024 07:23:07 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Mon, 20 May 2024 18:47:35 GMT, Phil Race wrote: > Have you looked into / thought about how this will work for jpackaged apps ? I suspect that both the existing FFM usage and this will be options the application packager will need to supply when building the jpackaged app - the end user cannot pass in command line VM options. Seems there should be some testing of this as some kind of native access could be a common case for jpackaged apps. I don't see any tests in test/jdk/tools/jpackage that creates an application that uses JNI code. Seems like a good idea to add this via another PR and it specify --java-options so that the application launcher enables native access. It could test jpackage using jlink too. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2121927727 From thartmann at openjdk.org Tue May 21 07:24:03 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 21 May 2024 07:24:03 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 21:16:47 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: > > shenandoah verifier I'm getting some conflicts when trying to apply this to master. Could you please merge the PR? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2121929550 From mcimadamore at openjdk.org Tue May 21 08:47:05 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Tue, 21 May 2024 08:47:05 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Tue, 21 May 2024 07:20:05 GMT, Alan Bateman wrote: > > Have you looked into / thought about how this will work for jpackaged apps ? I suspect that both the existing FFM usage and this will be options the application packager will need to supply when building the jpackaged app - the end user cannot pass in command line VM options. Seems there should be some testing of this as some kind of native access could be a common case for jpackaged apps. > > I don't see any tests in test/jdk/tools/jpackage that creates an application that uses JNI code. Seems like a good idea to add this via another PR and it specify --java-options so that the application launcher enables native access. It could test jpackage using jlink too. These are all good suggestions. I have not looked into jpackage, but yes, I would expect that the jpackage user would need to provide extra options when packaging the application. The same is true for creating JDK image jlink (which we use in the jextract build) - although, in that case the end user also has the possibility to pass options on the command line. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2122095444 From johan.vos at gluonhq.com Tue May 21 09:32:20 2024 From: johan.vos at gluonhq.com (Johan Vos) Date: Tue, 21 May 2024 11:32:20 +0200 Subject: InlineSecondarySupersTest only available in c2? Message-ID: Hi, While working on OpenJDK/Mobile, I had to apply a patch for Android and iOS that I believe might be broader than just the mobile platforms. I had compile issues in stubGenerator_aarch64.cpp:8470:13: error: use of undeclared identifier 'InlineSecondarySupersTest' I noticed that InlineSecondarySupersTest is only added via c2_globals.hpp . In my branch for the mobile port, I added a check around that code [1] and now it works when I want to build a minimal or a client variant. However, when I use the same configuration on Linux or MacOSX (--with-jvm-variants=client or minimal), it fails on those platforms as well (it works fine on the server variant, as that grabs c2_globals.hpp). Is this a more generic issue than just mobile? Thanks, - Johan [1] https://github.com/openjdk/jdk/commit/47377a2ad398eadd7acb8cccf1e95703c76328fe#diff-9112056f732229b18fec48fb0b20a3fe824de49d0abd41fbdb4202cfe70ad114R8468 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.holmes at oracle.com Tue May 21 10:25:56 2024 From: david.holmes at oracle.com (David Holmes) Date: Tue, 21 May 2024 20:25:56 +1000 Subject: InlineSecondarySupersTest only available in c2? In-Reply-To: References: Message-ID: Hi Johan, On 21/05/2024 7:32 pm, Johan Vos wrote: > Hi, > > While working on OpenJDK/Mobile, I had to apply a patch for Android and > iOS that I believe might be broader than just the mobile platforms. > I had compile issues in > stubGenerator_aarch64.cpp:8470:13: error: use of undeclared identifier > 'InlineSecondarySupersTest' > > I noticed that?InlineSecondarySupersTest is only added > via?c2_globals.hpp . In my branch for the mobile port, I added a check > around that code [1] and now it works when I want to build a minimal or > a client variant. However, when I use the same configuration on Linux or > MacOSX (--with-jvm-variants=client or minimal), it fails on those > platforms as well (it works fine on the server variant, as that grabs > c2_globals.hpp). > > Is this a more generic issue than just mobile? Yes I think so, but not a build-dev issue :) It was introduced by JDK-8180450: secondary_super_cache does not scale well back on April 16. It should be in #ifdef COMPILER2 as per ./hotspot/cpu/x86/stubGenerator_x86_64.cpp Cheers, David > Thanks, > > - Johan > > [1] > https://github.com/openjdk/jdk/commit/47377a2ad398eadd7acb8cccf1e95703c76328fe#diff-9112056f732229b18fec48fb0b20a3fe824de49d0abd41fbdb4202cfe70ad114R8468 From asemenyuk at openjdk.org Tue May 21 15:57:06 2024 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Tue, 21 May 2024 15:57:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments `jdk.jpackage` changes look good ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2122942586 From prr at openjdk.org Tue May 21 16:45:06 2024 From: prr at openjdk.org (Phil Race) Date: Tue, 21 May 2024 16:45:06 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: <2sHuToXAXHYrqtE31r7-wDvJ3JM0nQYujuLFAtqWQQI=.3c61631b-ecb1-4073-9b5f-6a379ab614cf@github.com> On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments client parts look fine. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2069134455 From asemenyuk at openjdk.org Tue May 21 16:59:04 2024 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Tue, 21 May 2024 16:59:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Tue, 21 May 2024 08:44:47 GMT, Maurizio Cimadamore wrote: > These are all good suggestions. I have not looked into jpackage, but yes, I would expect that the jpackage user would need to provide extra options when packaging the application. It would be good to document how jpackage users packaging apps with native access will be affected by this change. Primarily that they need to pass `--illegal-native-access` parameter to affected jpackage app launchers. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2123054154 From duke at openjdk.org Tue May 21 17:41:46 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Tue, 21 May 2024 17:41:46 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v11] In-Reply-To: References: Message-ID: On Tue, 21 May 2024 07:21:14 GMT, Tobias Hartmann wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision: >> >> shenandoah verifier > > I'm getting some conflicts when trying to apply this to master. Could you please merge the PR? Hi @TobiHartmann , merged with no issues for me. Could you please run the tests again? (I think Tony did run them, but can't hurt verifying again). Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2123122468 From duke at openjdk.org Tue May 21 17:41:46 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Tue, 21 May 2024 17:41:46 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v12] In-Reply-To: References: Message-ID: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... Volodymyr Paprotski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into ecc-montgomery - shenandoah verifier - comments from Sandhya - whitespace - add message back - whitespace - Use AffinePoint to exit Montgomery domain Style notes: Affine.equals() - Mismatched fields only appear to be used from testing, perhaps should be moved there instead Affine.getX(boolean)|getY(boolean) - "Passing flag is bad design" - cleanest/performant alternative to several instanceof checks - needed to convert Affine to Projective (need to stay in montgomery domain) ECOperations.PointMultiplier - changes could probably be restored to original (since ProjectivePoint handling no longer required) - consider these changes an improvement? (fewer nested classes) - was an inner-class but not using inner-class features (i.e. ecOps variable should be converted) - whitespace - Comments from Tony and Jatin - Comments from Jatin and Tony - ... and 7 more: https://git.openjdk.org/jdk/compare/12e8009b...b1a33004 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18583/files - new: https://git.openjdk.org/jdk/pull/18583/files/df4fe6fa..b1a33004 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18583&range=10-11 Stats: 190975 lines in 3949 files changed: 105304 ins; 64688 del; 20983 mod Patch: https://git.openjdk.org/jdk/pull/18583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18583/head:pull/18583 PR: https://git.openjdk.org/jdk/pull/18583 From jianglizhou at google.com Tue May 21 18:51:51 2024 From: jianglizhou at google.com (Jiangli Zhou) Date: Tue, 21 May 2024 11:51:51 -0700 Subject: Hermetic Java project meeting In-Reply-To: References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> <6090f2aa-1480-4706-9281-035579a933af@oracle.com> Message-ID: We had a discussion on static Java this morning. Outcome of today's discussion: For the first step in earlier outlined steps, there's a preference to have a minimum buildable and runnable (be able to run HelloWorld) `javastatic` as the initial integration point for the mainline. Following are the updated plan/steps: Step 1 - Get the makefile changes for linking `javastatic` with minimum needed runtime changes into mainline; `javastatic` is buildable and runnable - can run HelloWorld Can enable build and testing for `javastatic` in github workflow Step 2 - Incrementally get the runtime changes reviewed and integrated into mainline; Revert any of the #ifdef changes if they were introduced in the first step Enable testing tier 1 for `javastatic` in workflow when we can run jtreg tests with the static launcher - could be done in a later step; Step 3 - Remove all STATIC_BUILD macros in JDK runtime code; Also cleanup the macros in tests (can be done later) CSR and JNI specification work to support JNI_OnLoad_ and friends for JNI dynamic library and builtin library Step 4 - Build (makefile) changes to support linking .a and .so libraries using the same set of .o objects, to avoid compiling the .c/.c++ source twice According to Magnus, his #ifdef changes only affect about half a dozen files. Those #ifdef are inserted in places where the JLI_IsStaticJDK|JVM_IsStaticJDK checks are used in the hermetic-java-runtime branch. Magnus will send out his changes as PR draft for initial review for deciding on how to move forward with the non-makefile changes. If the #ifdef changes are not too disruptive, we could include those in the initial integration work. Then the followup runtime changes would revert the #ifdef changes. Best, Jiangli On Mon, May 20, 2024 at 10:17?PM Jiangli Zhou wrote: > On Tue, May 7, 2024 at 5:26?AM Magnus Ihse Bursie < > magnus.ihse.bursie at oracle.com> wrote: > >> On 2024-05-07 06:04, Jiangli Zhou wrote: >> >> On Tue, Apr 30, 2024 at 5:42?AM Magnus Ihse Bursie wrote: >> >> I am not sure why clang insisted on picking up ld and not lld. I remeber >> trying with -fuse-ld=lld, and that it did not work either. >> Unfortunately, I don't remember exactly what the problems were. >> >> I started reinstalling my Linux workstation yesterday, but something >> went wrong, and it failed so hard that it got semi-bricked by the new >> installation, so I need to redo everything from scratch. :-( After that >> is done, I'll re-test. Hopefully this was just my old installation that >> was too broken. >> >> I decided to spend the time to reinstall my machine. Now linking with >> clang works. Kind of. For some reason, it still picks up binutils ld and >> not lld, and then -l:libc++.a does not work, but when I replaced it with >> -l:libstdc++.a it worked just fine. I guess we need to either forcefully >> add -fuse-ld=lld to our clang compilation lines, or figure out if clang is >> going to call the binutils or llvm ld, and select the right option. >> > > https://lld.llvm.org/#using-lld has some information on using lld instead > of the default linker. > > >> I still find the logic for how clang and gcc locates the default linker >> to be mostly magic. I guess I need to make a deep dive in understanding >> this to be able to resolve this properly. >> >> The JDK and VM code has pre-existing assumptions about the JDK >> directories and dynamic linking (e.g. the .so). >> JLI_IsStaticJDK|JLI_SetStaticJDK|JVM_IsStaticJDK|JVM_SetStaticJDK is >> needed for static JDK support to handle those cases correctly. >> CreateExecutionEnvironment that I mentioned earlier is one of the >> examples. >> >> I'm quite certain the issue that you are running into is due to the >> incorrect static check/handling in CreateExecutionEnvironment. >> >> I'll have a look at that, thanks for the pointer. >> >> In my branch, I am only using compile-time #ifdef checks for static vs >> dynamic. In the long run, the runtime checks that you have done are a >> good thing, but at the moment they are just adding intrusive changes >> without providing any benefit -- if we can't reuse .o files between >> dynamic and static compilation, there is no point in introducing a >> runtime check when we already have a working compile-time check. >> >> I haven't seen your branch/code. I'd suggest not going with the #ifdef >> checks as that's the opposite direction of what we want to achieve. It >> doesn't seem to be worth your effort to add more #ifdef checks in >> order to do static linking build work, even those are for temporary >> testing reasons. >> >> Okaaaaay... My understanding was that you wanted to push for the quickest >> possible integration of building a static java launcher into mainline. >> > That's correct. Please see more details below. > >> To do that as fast as possible, we need to use the existing framework for >> separating statically and dynamically linked libraries, which means doing >> compile time checks using #ifdefs. >> > Using #ifdefs is not the most efficient path for us to get static Java > launcher support in mainline. That's because most of the runtime changes > for static Java support in hermetic-java-runtime branch are already done > using `JLI_IsStaticJDK|JVM_IsStaticJDK` checks. We should not convert those > to use #ifdefs then later convert the #ifdef back to runtime checks again > during the integration work. > > As suggested and discussed earlier we can aim to get the static Java > related changes into mainline incrementally. Following is a path that I > think would work effectively and "fast" by limiting potentially wasted > efforts: > > Step 1 - Get the makefile changes for linking `javastatic` without any of > the runtime changes; Don't enable any build and testing for `javastatic` in > this step yet > Step 2 - Incrementally get the runtime changes reviewed and integrated > into mainline; > Enable building for `javastatic` as a test in github > workflow when we can run HelloWorld using static launcher in mainline; > Enable testing tier 1 for `javastatic` in workflow when we > can run jtreg tests with the static launcher - could be done in a later > step; > Step 3 - Remove all STATIC_BUILD macros in JDK runtime code; Also cleanup > the macros in tests (can be done later) > CSR and JNI specification work to support > JNI_OnLoad_ and friends for JNI dynamic library and builtin > library > Step 4 - Build (makefile) changes to support linking .a and .so libraries > using the same set of .o objects, to avoid compiling the .c/.c++ source > twice > > Those lay the foundation for the hermetic Java work in mainline. > >> Are you saying now that the priorities has changed, and that you want to >> start by introducing your framework for the runtime lookup if we are static >> or dynamic? >> > By "runtime lookup", I think you were referring to the JNI native library > lookup. We can handle them as part of the step 2 above. > > I think for any of the runtime changes, we need to be able to build in the > mainline (although initially not included in the github workflow). > >> >> To be honest, I think your prototype is rather hacky in how you implement >> this, and I reckon that it will require quite a lot of work to be accepted >> into mainline. I also think you need a CSR for changing the Hotspot/JDK >> behavior wrt this, which further adds to the process. >> > > For CSR work, we can do that as part of step #3. Actually, for the > builtin/dynamic library lookup support, I think the enhancements in > hermetic-java-runtime are already close to the proper shape (not hacky). > > >> If you want to go that route instead, then I'll put my work on hold until >> you have gotten a working solution for the runtime lookup in mainline. I >> gather this means that there is no real stress for me anymore. >> > Ron and Alan mentioned Tuesday morning PT may not work the best for you. > Would you be open for a separate time to discuss the details on moving > forward? > > Best, > Jiangli > > >> >> /Magnus >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehw at openjdk.org Tue May 21 20:28:37 2024 From: joehw at openjdk.org (Joe Wang) Date: Tue, 21 May 2024 20:28:37 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a stricter default configuration [v12] In-Reply-To: References: Message-ID: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: add a note to module-info ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/55a86db3..dd7f6239 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=10-11 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From thartmann at openjdk.org Wed May 22 05:03:15 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 May 2024 05:03:15 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v12] In-Reply-To: References: Message-ID: On Tue, 21 May 2024 17:41:46 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision: > > - Merge remote-tracking branch 'origin/master' into ecc-montgomery > - shenandoah verifier > - comments from Sandhya > - whitespace > - add message back > - whitespace > - Use AffinePoint to exit Montgomery domain > > Style notes: > Affine.equals() > - Mismatched fields only appear to be used from testing, perhaps should be moved there instead > Affine.getX(boolean)|getY(boolean) > - "Passing flag is bad design" - cleanest/performant alternative to several instanceof checks > - needed to convert Affine to Projective (need to stay in montgomery domain) > ECOperations.PointMultiplier > - changes could probably be restored to original (since ProjectivePoint handling no longer required) > - consider these changes an improvement? (fewer nested classes) > - was an inner-class but not using inner-class features (i.e. ecOps variable should be converted) > - whitespace > - Comments from Tony and Jatin > - Comments from Jatin and Tony > - ... and 7 more: https://git.openjdk.org/jdk/compare/9ee91a9f...b1a33004 Thanks! I submitted testing and will report back once it passed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2123869579 From ihse at openjdk.org Wed May 22 07:47:15 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 22 May 2024 07:47:15 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> Message-ID: On Thu, 4 Apr 2024 20:52:59 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request incrementally with three additional commits since the last revision: >> >> - Use shorter name for the build tool >> - Review feedback from Erik J. >> - Remove dependency on CDS which isn't needed anymore > > src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties line 165: > >> 163: >> 164: runtime.link.info=Linking based on the current run-time image. >> 165: runtime.link.jprt.path.extra=(run-time image) > > Missing newline at last line. ... still missing... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1609457478 From ihse at openjdk.org Wed May 22 07:47:16 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 22 May 2024 07:47:16 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> Message-ID: On Wed, 22 May 2024 07:42:39 GMT, Magnus Ihse Bursie wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties line 165: >> >>> 163: >>> 164: runtime.link.info=Linking based on the current run-time image. >>> 165: runtime.link.jprt.path.extra=(run-time image) >> >> Missing newline at last line. > > ... still missing... Actually, this is a bit strange. I thought jcheck would look for missing newline at EOF, and that properties files were included in the check nowadays. I'll need to check this out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1609459326 From ihse at openjdk.org Wed May 22 08:11:14 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 22 May 2024 08:11:14 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> Message-ID: On Wed, 22 May 2024 07:44:08 GMT, Magnus Ihse Bursie wrote: >> ... still missing... > > Actually, this is a bit strange. I thought jcheck would look for missing newline at EOF, and that properties files were included in the check nowadays. I'll need to check this out. I did some testing and it turns out that this is indeed not checked. I believe this is a miss in the Skara reimplementation of jcheck. I've opened https://bugs.openjdk.org/browse/SKARA-2265 to track this. Nevertheless, it would be good if you could fix this. :) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1609491669 From ihse at openjdk.org Wed May 22 08:55:05 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 22 May 2024 08:55:05 GMT Subject: RFR: 8330542: Add jaxp-strict.properties in preparation for a stricter default configuration [v12] In-Reply-To: References: Message-ID: <8A-Z8Q-bmxb3P2_x64siGd3gN07jzf-nHxXiiV64G0A=.65e5be8d-1975-4840-b876-4038320dcf18@github.com> On Tue, 21 May 2024 20:28:37 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > add a note to module-info make/modules/java.xml/Copy.gmk line 35: > 33: $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ > 34: DEST := $(CONF_DST_DIR), \ > 35: FILES := $(wildcard $(TOPDIR)/src/java.xml/share/conf/jaxp*.properties*), \ I don't think you need, nor should have, the asterisk after the extension. You are only copying `.properties` files. Suggestion: FILES := $(wildcard $(TOPDIR)/src/java.xml/share/conf/jaxp*.properties), \ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1609565653 From ihse at openjdk.org Wed May 22 08:59:03 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 22 May 2024 08:59:03 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments Build changes look good. Thanks for trimming down NATIVE_ACCESS_MODULES. ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2070573791 From sgehwolf at openjdk.org Wed May 22 12:28:15 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 22 May 2024 12:28:15 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> Message-ID: <5sg6x5ksWId6kCGjU2K_2DqiXwKp7oNeUlSIpN1uwvY=.65635c9f-705a-4571-9047-5748d57dfeb0@github.com> On Wed, 22 May 2024 08:07:59 GMT, Magnus Ihse Bursie wrote: >> Actually, this is a bit strange. I thought jcheck would look for missing newline at EOF, and that properties files were included in the check nowadays. I'll need to check this out. > > I did some testing and it turns out that this is indeed not checked. I believe this is a miss in the Skara reimplementation of jcheck. I've opened https://bugs.openjdk.org/browse/SKARA-2265 to track this. > > Nevertheless, it would be good if you could fix this. :) Sure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1609856505 From sgehwolf at openjdk.org Wed May 22 13:23:25 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 22 May 2024 13:23:25 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v29] In-Reply-To: References: Message-ID: > Please review this patch which adds a jlink mode to the JDK which doesn't need the packaged modules being present. A.k.a run-time image based jlink. Fundamentally this patch adds an option to use `jlink` even though your JDK install might not come with the packaged modules (directory `jmods`). This is particularly useful to further reduce the size of a jlinked runtime. After the removal of the concept of a JRE, a common distribution mechanism is still the full JDK with all modules and packaged modules. However, packaged modules can incur an additional size tax. For example in a container scenario it could be useful to have a base JDK container including all modules, but without also delivering the packaged modules. This comes at a size advantage of `~25%`. Such a base JDK container could then be used to `jlink` application specific runtimes, further reducing the size of the application runtime image (App + JDK runtime; as a single image *or* separate bundles, depending on the app b eing modularized). > > The basic design of this approach is to add a jlink plugin for tracking non-class and non-resource files of a JDK install. I.e. files which aren't present in the jimage (`lib/modules`). This enables producing a `JRTArchive` class which has all the info of what constitutes the final jlinked runtime. > > Basic usage example: > > $ diff -u <(./bin/java --list-modules --limit-modules java.se) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules java.se) > $ diff -u <(./bin/java --list-modules --limit-modules jdk.jlink) <(../linux-x86_64-server-release/images/jdk/bin/java --list-modules --limit-modules jdk.jlink) > $ ls ../linux-x86_64-server-release/images/jdk/jmods > java.base.jmod java.net.http.jmod java.sql.rowset.jmod jdk.crypto.ec.jmod jdk.internal.opt.jmod jdk.jdi.jmod jdk.management.agent.jmod jdk.security.auth.jmod > java.compiler.jmod java.prefs.jmod java.transaction.xa.jmod jdk.dynalink.jmod jdk.internal.vm.ci.jmod jdk.jdwp.agent.jmod jdk.management.jfr.jmod jdk.security.jgss.jmod > java.datatransfer.jmod java.rmi.jmod java.xml.crypto.jmod jdk.editpad.jmod jdk.internal.vm.compiler.jmod jdk.jfr.jmod jdk.management.jmod jdk.unsupported.desktop.jmod > java.desktop.jmod java.scripting.jmod java.xml.jmod jdk.hotspot.agent.jmod jdk.internal.vm.compiler.manage... Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 110 commits: - Merge branch 'master' into jdk-8311302-jmodless-link - Fix new line in jlink.properties - Merge branch 'master' into jdk-8311302-jmodless-link - Simplify JLINK_JDK_EXTRA_OPTS var handling - Only add runtime track files for linkable runtimes - Generate the runtime image link diff at jlink time But only do that once the plugin-pipeline has run. The generation is enabled with the hidden option '--generate-linkable-runtime' and the resource pools available at jlink time are being used to generate the diff. - Merge branch 'master' into jdk-8311302-jmodless-link - Use shorter name for the build tool - Review feedback from Erik J. - Remove dependency on CDS which isn't needed anymore - ... and 100 more: https://git.openjdk.org/jdk/compare/4f1a10f8...e1e3f02f ------------- Changes: https://git.openjdk.org/jdk/pull/14787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14787&range=28 Stats: 3424 lines in 36 files changed: 3272 ins; 110 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/14787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14787/head:pull/14787 PR: https://git.openjdk.org/jdk/pull/14787 From sgehwolf at openjdk.org Wed May 22 13:23:25 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Wed, 22 May 2024 13:23:25 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v25] In-Reply-To: <5sg6x5ksWId6kCGjU2K_2DqiXwKp7oNeUlSIpN1uwvY=.65635c9f-705a-4571-9047-5748d57dfeb0@github.com> References: <2Hs5V_cOOhOtXxrKvM0ATWxJFO62xd3RtScyPEb5puI=.f16650ac-9812-40ed-a93c-a5dd4b396ad2@github.com> <5sg6x5ksWId6kCGjU2K_2DqiXwKp7oNeUlSIpN1uwvY=.65635c9f-705a-4571-9047-5748d57dfeb0@github.com> Message-ID: On Wed, 22 May 2024 12:25:09 GMT, Severin Gehwolf wrote: >> I did some testing and it turns out that this is indeed not checked. I believe this is a miss in the Skara reimplementation of jcheck. I've opened https://bugs.openjdk.org/browse/SKARA-2265 to track this. >> >> Nevertheless, it would be good if you could fix this. :) > > Sure. Should be fixed now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1609943363 From thartmann at openjdk.org Wed May 22 14:10:14 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 22 May 2024 14:10:14 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v12] In-Reply-To: References: Message-ID: On Tue, 21 May 2024 17:41:46 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision: > > - Merge remote-tracking branch 'origin/master' into ecc-montgomery > - shenandoah verifier > - comments from Sandhya > - whitespace > - add message back > - whitespace > - Use AffinePoint to exit Montgomery domain > > Style notes: > Affine.equals() > - Mismatched fields only appear to be used from testing, perhaps should be moved there instead > Affine.getX(boolean)|getY(boolean) > - "Passing flag is bad design" - cleanest/performant alternative to several instanceof checks > - needed to convert Affine to Projective (need to stay in montgomery domain) > ECOperations.PointMultiplier > - changes could probably be restored to original (since ProjectivePoint handling no longer required) > - consider these changes an improvement? (fewer nested classes) > - was an inner-class but not using inner-class features (i.e. ecOps variable should be converted) > - whitespace > - Comments from Tony and Jatin > - Comments from Jatin and Tony > - ... and 7 more: https://git.openjdk.org/jdk/compare/45457761...b1a33004 All tests passed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2124892444 From duke at openjdk.org Wed May 22 14:22:16 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Wed, 22 May 2024 14:22:16 GMT Subject: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v12] In-Reply-To: References: Message-ID: <2HF_LGpK7B6i1UcgJ8g9JgzGF27gVAHZkGnVQk-Fo4w=.98339735-cd89-4059-a449-6a4911e9af41@github.com> On Tue, 21 May 2024 17:41:46 GMT, Volodymyr Paprotski wrote: >> Performance. Before: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s >> >> Performance, no intrinsic: >> >> Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units >> SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s >> SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s >> SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s >> Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units >> o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s >> o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s >> Benchmark (isMontBench) Mode Cnt Score Error Units >> PolynomialP256Bench.benchMultiply true thrpt 3 1919.57... > > Volodymyr Paprotski has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision: > > - Merge remote-tracking branch 'origin/master' into ecc-montgomery > - shenandoah verifier > - comments from Sandhya > - whitespace > - add message back > - whitespace > - Use AffinePoint to exit Montgomery domain > > Style notes: > Affine.equals() > - Mismatched fields only appear to be used from testing, perhaps should be moved there instead > Affine.getX(boolean)|getY(boolean) > - "Passing flag is bad design" - cleanest/performant alternative to several instanceof checks > - needed to convert Affine to Projective (need to stay in montgomery domain) > ECOperations.PointMultiplier > - changes could probably be restored to original (since ProjectivePoint handling no longer required) > - consider these changes an improvement? (fewer nested classes) > - was an inner-class but not using inner-class features (i.e. ecOps variable should be converted) > - whitespace > - Comments from Tony and Jatin > - Comments from Jatin and Tony > - ... and 7 more: https://git.openjdk.org/jdk/compare/c0032e2c...b1a33004 Thanks Tobi! ------------- PR Comment: https://git.openjdk.org/jdk/pull/18583#issuecomment-2124924526 From duke at openjdk.org Wed May 22 16:30:14 2024 From: duke at openjdk.org (Volodymyr Paprotski) Date: Wed, 22 May 2024 16:30:14 GMT Subject: Integrated: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic In-Reply-To: References: Message-ID: On Tue, 2 Apr 2024 15:42:05 GMT, Volodymyr Paprotski wrote: > Performance. Before: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6443.934 ? 6.491 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6152.979 ? 4.954 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1895.410 ? 36.979 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1878.955 ? 45.487 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1357.810 ? 26.584 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1352.119 ? 23.547 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply false thrpt 3 1746.126 ? 10.970 ops/s > > Performance, no intrinsic: > > Benchmark (algorithm) (dataSize) (keyLength) (provider) Mode Cnt Score Error Units > SignatureBench.ECDSA.sign SHA256withECDSA 1024 256 thrpt 3 6529.839 ? 42.420 ops/s > SignatureBench.ECDSA.sign SHA256withECDSA 16384 256 thrpt 3 6199.747 ? 133.566 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 1024 256 thrpt 3 1973.676 ? 54.071 ops/s > SignatureBench.ECDSA.verify SHA256withECDSA 16384 256 thrpt 3 1932.127 ? 35.920 ops/s > Benchmark (algorithm) (keyLength) (kpgAlgorithm) (provider) Mode Cnt Score Error Units > o.o.b.j.c.full.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1355.788 ? 29.858 ops/s > o.o.b.j.c.small.KeyAgreementBench.EC.generateSecret ECDH 256 EC thrpt 3 1346.523 ? 28.722 ops/s > Benchmark (isMontBench) Mode Cnt Score Error Units > PolynomialP256Bench.benchMultiply true thrpt 3 1919.574 ? 10.591 ops/s > > Performance, **with intrinsics*... This pull request has now been integrated. Changeset: afed7d0b Author: Volodymyr Paprotski Committer: Sandhya Viswanathan URL: https://git.openjdk.org/jdk/commit/afed7d0b0593864e5595840a6b645c210ff28c7c Stats: 2409 lines in 36 files changed: 2093 ins; 156 del; 160 mod 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic Reviewed-by: ihse, ascarpino, sviswanathan ------------- PR: https://git.openjdk.org/jdk/pull/18583 From amenkov at openjdk.org Wed May 22 18:41:08 2024 From: amenkov at openjdk.org (Alex Menkov) Date: Wed, 22 May 2024 18:41:08 GMT Subject: Integrated: 8332096: hotspot-ide-project fails with this-escape In-Reply-To: <_S3BOhhYVz7pK7B1kVICha4LIQdFMi1FQtMvORlxlPk=.da9fe128-d62f-4eee-ae9e-6b51c04fedb7@github.com> References: <_S3BOhhYVz7pK7B1kVICha4LIQdFMi1FQtMvORlxlPk=.da9fe128-d62f-4eee-ae9e-6b51c04fedb7@github.com> Message-ID: On Fri, 10 May 2024 23:54:11 GMT, Alex Menkov wrote: > The change fixes `make hotspot-ide-project` which fails with > > \open\make\ide\visualstudio\hotspot\src\classes\build\tools\projectcreator\FileTreeCreator.java:54: warning: [this-escape] possible 'this' escape before subclass is fully initialized > attributes.push(new DirAttributes()); > ^ > error: warnings found and -Werror specified This pull request has now been integrated. Changeset: 37c47785 Author: Alex Menkov URL: https://git.openjdk.org/jdk/commit/37c477856d543163b60dd2b85a5e6ac35a752211 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8332096: hotspot-ide-project fails with this-escape Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/19186 From kcr at openjdk.org Wed May 22 21:45:10 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Wed, 22 May 2024 21:45:10 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Fri, 17 May 2024 13:38:25 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and `Runtime::loadLibrary` are now restricted methods >> * binding a JNI `native` method declaration to a native implementation is now considered a restricted operation >> >> This PR slightly changes the way in which the JDK deals with restricted methods, even for FFM API calls. In Java 22, the single `--enable-native-access` was used both to specify a set of modules for which native access should be allowed *and* to specify whether illegal native access (that is, native access occurring from a module not specified by `--enable-native-access`) should be treated as an error or a warning. More specifically, an error is only issued if the `--enable-native-access flag` is used at least once. >> >> Here, a new flag is introduced, namely `illegal-native-access=allow/warn/deny`, which is used to specify what should happen when access to a restricted method and/or functionality is found outside the set of modules specified with `--enable-native-access`. The default policy is `warn`, but users can select `allow` to suppress the warnings, or `deny` to cause `IllegalCallerException` to be thrown. This aligns the treatment of restricted methods with other mechanisms, such as `--illegal-access` and the more recent `--sun-misc-unsafe-memory-access`. >> >> Some changes were required in the package-info javadoc for `java.lang.foreign`, to reflect the changes in the command line flags described above. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Address review comments I tested this with JavaFX and everything is working as I would expect. Without any options, I get the expected warnings, one time per modules for the three `javafx.*` modules that use JNI. If I pass the `--enable-native-access` options at runtime, listing those three modules, there is no warning. Further, I confirm that if I pass that option to jlink or jpackage when creating a custom runtime, there is no warning. ------------- Marked as reviewed by kcr (Author). PR Review: https://git.openjdk.org/jdk/pull/19213#pullrequestreview-2072430338 From iklam at openjdk.org Wed May 22 21:53:28 2024 From: iklam at openjdk.org (Ioi Lam) Date: Wed, 22 May 2024 21:53:28 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time Message-ID: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> This PR tries store CONSTANT_FieldRef entries in the resolved state whenever it's safe to do so. I.e., when a constant pool entry in class `A` refers to a *non-static* field `B.F`, - `B` must be the same class as `A`; or - `B` is a supertype of `A`; or - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. Under these conditions, it's guaranteed that whenever `A` tries to use this entry at run time, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. Note that this ------------- Commit messages: - 8293980: Resolve CONSTANT_FieldRef at CDS dump time Changes: https://git.openjdk.org/jdk/pull/19355/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293980 Stats: 1134 lines in 30 files changed: 969 ins; 57 del; 108 mod Patch: https://git.openjdk.org/jdk/pull/19355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19355/head:pull/19355 PR: https://git.openjdk.org/jdk/pull/19355 From iklam at openjdk.org Thu May 23 03:35:19 2024 From: iklam at openjdk.org (Ioi Lam) Date: Thu, 23 May 2024 03:35:19 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2] In-Reply-To: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, > - `B` is the same class as `A`; or > - `B` is a supertype of `A`; or > - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. > > Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. > > Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. > > (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) > > ### Static CDS Archive > > This feature is implemented in three steps for static CDS archive dump: > > 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: > > @cp java/util/Objects 2 19 106 > > 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. > > 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. > > ### Dynamic CDS Archive > > When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. > > ### Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to unnecessarily generate code for paths that are never taken by the app... Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge branch 'master' into 8293980-resolve-fields-at-dumptime - 8293980: Resolve CONSTANT_FieldRef at CDS dump time ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19355/files - new: https://git.openjdk.org/jdk/pull/19355/files/6a3dc649..3900c568 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=00-01 Stats: 289 lines in 23 files changed: 123 ins; 139 del; 27 mod Patch: https://git.openjdk.org/jdk/pull/19355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19355/head:pull/19355 PR: https://git.openjdk.org/jdk/pull/19355 From iklam at openjdk.org Thu May 23 03:35:19 2024 From: iklam at openjdk.org (Ioi Lam) Date: Thu, 23 May 2024 03:35:19 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time In-Reply-To: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: <6z4OzxgiVgCOl0yboRFYbQ_sTDHplTN-w7gYAPixynY=.b8dc7862-054a-4e16-82ac-4c3cf72a8486@github.com> On Wed, 22 May 2024 21:48:44 GMT, Ioi Lam wrote: > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, > - `B` is the same class as `A`; or > - `B` is a supertype of `A`; or > - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. > > Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. > > Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. > > (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) > > ### Static CDS Archive > > This feature is implemented in three steps for static CDS archive dump: > > 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: > > @cp java/util/Objects 2 19 106 > > 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. > > 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. > > ### Dynamic CDS Archive > > When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. > > ### Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to unnecessarily generate code for paths that are never taken by the app... I pressed the wrong button and sent out the RFR mail too soon .... I have finished updating the PR description text. It's ready for review now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19355#issuecomment-2126167774 From alanb at openjdk.org Thu May 23 06:23:04 2024 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 23 May 2024 06:23:04 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Wed, 22 May 2024 21:42:14 GMT, Kevin Rushforth wrote: > Further, I confirm that if I pass that option to jlink or jpackage when creating a custom runtime, there is no warning. Great! What about jpackage without a custom runtime, wondering if --java-options can be tested. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2126320311 From ihse at openjdk.org Thu May 23 10:32:29 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 10:32:29 GMT Subject: RFR: 8332808: Always set java.io.tmpdir to a suitable value in the build Message-ID: We should pass a good value for java.io.tmpdir to all java invocations in the build, that redirect any temporary files to somewhere under the build directory. This bug was created as a result of the discussion regarding [JDK-8331348](https://bugs.openjdk.org/browse/JDK-8331348). ------------- Commit messages: - 8332808: Always set java.io.tmpdir to a suitable value in the build Changes: https://git.openjdk.org/jdk/pull/19362/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19362&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332808 Stats: 9 lines in 3 files changed: 7 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/19362.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19362/head:pull/19362 PR: https://git.openjdk.org/jdk/pull/19362 From ihse at openjdk.org Thu May 23 10:32:29 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 10:32:29 GMT Subject: RFR: 8332808: Always set java.io.tmpdir to a suitable value in the build In-Reply-To: References: Message-ID: On Thu, 23 May 2024 10:27:47 GMT, Magnus Ihse Bursie wrote: > We should pass a good value for java.io.tmpdir to all java invocations in the build, that redirect any temporary files to somewhere under the build directory. > > This bug was created as a result of the discussion regarding [JDK-8331348](https://bugs.openjdk.org/browse/JDK-8331348). And yes, the way we build up our java/javac command lines is really messy and need an overhaul. I'll come to it, at some point, I hope... ------------- PR Comment: https://git.openjdk.org/jdk/pull/19362#issuecomment-2126765313 From ihse at openjdk.org Thu May 23 11:39:18 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 11:39:18 GMT Subject: RFR: 8332808: Always set java.io.tmpdir to a suitable value in the build [v2] In-Reply-To: References: Message-ID: > We should pass a good value for java.io.tmpdir to all java invocations in the build, that redirect any temporary files to somewhere under the build directory. > > This bug was created as a result of the discussion regarding [JDK-8331348](https://bugs.openjdk.org/browse/JDK-8331348). Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: We should only explicitly append JAVA_FLAGS_TMPDIR for JAVAC and BUILD_JAVAC, not the JAVA invocations. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19362/files - new: https://git.openjdk.org/jdk/pull/19362/files/0e778b99..a9897ba3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19362&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19362&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/19362.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19362/head:pull/19362 PR: https://git.openjdk.org/jdk/pull/19362 From erikj at openjdk.org Thu May 23 12:40:07 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 23 May 2024 12:40:07 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2] In-Reply-To: <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> Message-ID: <1vK1vlFb91j3ilWmbMRr3PHu14ZkI8fWwU-JV4CcsQ0=.03c848b2-5424-4a6e-89fb-4b774d293fc1@github.com> On Thu, 23 May 2024 03:35:19 GMT, Ioi Lam wrote: >> ### Overview >> >> This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. >> >> I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, >> - `B` is the same class as `A`; or >> - `B` is a supertype of `A`; or >> - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. >> >> Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. >> >> Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. >> >> (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) >> >> ### Static CDS Archive >> >> This feature is implemented in three steps for static CDS archive dump: >> >> 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: >> >> @cp java/util/Objects 2 19 106 >> >> 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. >> >> 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. >> >> ### Dynamic CDS Archive >> >> When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. >> >> ### Limitations >> >> - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. >> - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to... > > Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - 8293980: Resolve CONSTANT_FieldRef at CDS dump time Build change looks good. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19355#pullrequestreview-2073844617 From erikj at openjdk.org Thu May 23 12:42:05 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 23 May 2024 12:42:05 GMT Subject: RFR: 8332808: Always set java.io.tmpdir to a suitable value in the build [v2] In-Reply-To: References: Message-ID: On Thu, 23 May 2024 11:39:18 GMT, Magnus Ihse Bursie wrote: >> We should pass a good value for java.io.tmpdir to all java invocations in the build, that redirect any temporary files to somewhere under the build directory. >> >> This bug was created as a result of the discussion regarding [JDK-8331348](https://bugs.openjdk.org/browse/JDK-8331348). > > Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: > > We should only explicitly append JAVA_FLAGS_TMPDIR for JAVAC and BUILD_JAVAC, not the JAVA invocations. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19362#pullrequestreview-2073850837 From kcr at openjdk.org Thu May 23 14:00:14 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Thu, 23 May 2024 14:00:14 GMT Subject: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v8] In-Reply-To: References: Message-ID: On Thu, 23 May 2024 06:20:51 GMT, Alan Bateman wrote: > > Further, I confirm that if I pass that option to jlink or jpackage when creating a custom runtime, there is no warning. > > Great! What about jpackage without a custom runtime, wondering if --java-options can be tested. Yes, pointing to an existing runtime works, too. In either mode (jpackage using an existing Java runtime vs running jlink to create a new one), the options specified by `jpackage --java-options` are written to the application's `.cfg` file and used when the application launcher is run. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19213#issuecomment-2127188783 From ihse at openjdk.org Thu May 23 14:39:07 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 14:39:07 GMT Subject: Integrated: 8332808: Always set java.io.tmpdir to a suitable value in the build In-Reply-To: References: Message-ID: On Thu, 23 May 2024 10:27:47 GMT, Magnus Ihse Bursie wrote: > We should pass a good value for java.io.tmpdir to all java invocations in the build, that redirect any temporary files to somewhere under the build directory. > > This bug was created as a result of the discussion regarding [JDK-8331348](https://bugs.openjdk.org/browse/JDK-8331348). This pull request has now been integrated. Changeset: 90758f67 Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/90758f6735620776fcb60da9e0e2c91a4f53aaf1 Stats: 9 lines in 3 files changed: 6 ins; 0 del; 3 mod 8332808: Always set java.io.tmpdir to a suitable value in the build Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/19362 From magnus.ihse.bursie at oracle.com Thu May 23 16:21:10 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Thu, 23 May 2024 18:21:10 +0200 Subject: JDK-8170635 -- adding a base library to java In-Reply-To: References: <7b083ada-a538-406e-aac0-bd5e0dad5353@oracle.com> Message-ID: <3f1a66f5-ec58-4f16-9b23-27648d7eb68e@oracle.com> On 2024-05-16 11:34, Suchismith Roy wrote: > Hi Magnus > Could you provide an existing PR/implementation I can refer from ? > There is no such previous all-encompassing library to just "copy". In fact, the core problem here is that we are even missing such a place to put common code. This is not a suitable beginner's bug in the JDK. Solving this is as much about politics and policy as about a technical implementation. /Magnus > Thanks > Suchismith Roy > > *From: *build-dev on behalf of Suchismith > Roy > *Date: *Wednesday, 8 May 2024 at 11:47?PM > *To: *Magnus Ihse Bursie , Thomas St?fe > > *Cc: *build-dev at openjdk.org > *Subject: *[EXTERNAL] RE: JDK-8170635 -- adding a base library to java > > Thanks for the reply @Magnus Ihse Bursie Is there any example of PRs > which create such libraries that I can refer to ? Is OSAL similar to > how os.?cpp is defined and respective platforms implement them ? From: > Magnus Ihse Bursie > > ZjQcmQRYFpfptBannerStart > > *This Message Is From an External Sender * > > This message came from outside your organization. > > > > Report?Suspicious > > ZjQcmQRYFpfptBannerEnd > > Thanks for the reply @Magnus Ihse Bursie > > Is there any example of PRs which create such libraries that I can > refer to ? > Is OSAL similar to how os.cpp is defined and respective platforms > implement them ? > > *From: *Magnus Ihse Bursie > *Date: *Tuesday, 7 May 2024 at 6:18?PM > *To: *Thomas St?fe , Suchismith Roy > > *Cc: *build-dev at openjdk.org > *Subject: *[EXTERNAL] Re: JDK-8170635 -- adding a base library to java > > On 2024-05-06 16:36, Thomas St?fe wrote: > > > Not sure if you meant to address this mail to a specific person. I > > assume with proposal you mean this: > > > https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ? > > > > If yes, my proposal was to move dladdr out of the OpenJDK code base > > into an independent library that would be maintained by IBM, > > hopefully, and would be a prerequisite for building the JDK. > > If no, whose proposal did you mean? > > Oh, this is an old bug you're picking up Suchismith! > > I read through the discussion from 2016. It seems that the suggestion to > make an external 3rd party library was only supported by Thomas, and > that the general agreement among the other participants was that we > should have a general, base-level "OSAL" (OS abstraction library) in the > JDK, that could be used by both Hotspot and libjli, as well as other JDK > libraries. > > Creating such a library would be a much larger effort than just adding a > AIX implementation of dladdr to it, if it existed. The current structure > of the JDK does not readily lend itself to such a library, neither in > terms of source code layout nor build system. > > With that said, I do think it would be good if we had such a library. > There are more cases than the AIX dladdr issue that is duplicated, like > jio_snprintf() and friends. This has actually caused some headaches when > doing static builds, since duplication of these functions are not > allowed when creating a single linked instance. (The current duplication > in dynamic libraries is just ugly and bad programming, not a compilation > error.) > > But it is a much larger question than just fixing an AIX issue. > > /Magnus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihse at openjdk.org Thu May 23 16:33:14 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 16:33:14 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: > As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. > > We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge branch 'master' into hotspot-assembler-functions - Fix copyright headers - Fix building on macos/aarch64 - Use % instead of @ due to arm assembler - 8331921: Hotspot assembler files should use common logic to setup exported functions ------------- Changes: https://git.openjdk.org/jdk/pull/19138/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19138&range=01 Stats: 604 lines in 22 files changed: 124 ins; 347 del; 133 mod Patch: https://git.openjdk.org/jdk/pull/19138.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19138/head:pull/19138 PR: https://git.openjdk.org/jdk/pull/19138 From ihse at openjdk.org Thu May 23 16:33:15 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 23 May 2024 16:33:15 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions In-Reply-To: References: Message-ID: On Wed, 8 May 2024 13:30:59 GMT, Magnus Ihse Bursie wrote: > As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. > > We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. Ping? Any takers? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19138#issuecomment-2127585577 From sgehwolf at openjdk.org Thu May 23 16:45:14 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Thu, 23 May 2024 16:45:14 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23] In-Reply-To: References: <_sbNFJXG7ghwsfNfxaGvvoDQ7-UtWpnhGnygKsFTsgQ=.623700db-7306-4b34-9e05-ca9059797e39@github.com> Message-ID: <0p024fM1f37tPV49K78xyyJ01uEUh5I1XcsXoJBK0_Q=.4c2e6cc4-71d0-4d6f-a3a3-13bba0ab2a84@github.com> On Thu, 16 May 2024 13:47:20 GMT, Alan Bateman wrote: >>> If I understand you correctly, this would be no longer a build-time only approach to produce the "linkable runtime"? It would be some-kind of jlink-option driven approach (as it would run some code that should only run when producing a linkable runtime is requested)? Other than that, it should be fine as the previous iteration basically did that but at a different phase. Also note that the previous iteration used a build-only jlink plugin so as to satisfy the build-time only approach, yet it ran as part of the plugin-pipeline which wasn't desired either. But it was something similar to what you seem to be describing now. Did I get something wrong? >> >> I think it continues to build time, it's just using some hidden jlink option. So yes, it similar to a previous iteration except that it doesn't run as a plugin the pipeline and the delta goes to the lib directory. >> >> Let's see what @mlchung says. You've put a lot of work into this so let's see if we can converge to avoid too many more rounds. > >> @AlanBateman @mlchung The latest update now uses the `jlink` build time option `--generate-linkable-runtime` to add needed resources to the `jimage` when a runtime linkable JDK image is being asked for using the configure option. This now runs outside the plugin-pipeline. I think this is what you meant. Sorry it took longer to get back to this... > > I think you've got this to a good place and I think the overall solution is good. It may be that JDK should move to this by default in the future, and at the same time re-visit the restriction on generating an image containing jdk.jlink, but let's see if any issues come up. > > I've added myself as Reviewer to the CSR and I'm working through the code changes. @AlanBateman > I'm working through the code changes. Do you think you'll be able to review this next week? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2127614784 From coleenp at openjdk.org Thu May 23 17:27:02 2024 From: coleenp at openjdk.org (Coleen Phillimore) Date: Thu, 23 May 2024 17:27:02 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: <4wZKU1O0bhLIOzNh-35n9ts8E-4VmF2GaMGiO0-ZME0=.94559bff-dd74-4ceb-8946-775a06a02c10@github.com> On Thu, 23 May 2024 16:33:14 GMT, Magnus Ihse Bursie wrote: >> As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. >> >> We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - Merge branch 'master' into hotspot-assembler-functions > - Fix copyright headers > - Fix building on macos/aarch64 > - Use % instead of @ due to arm assembler > - 8331921: Hotspot assembler files should use common logic to setup exported functions This looks like a very nice cleanup. ------------- Marked as reviewed by coleenp (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19138#pullrequestreview-2074610785 From alanb at openjdk.org Thu May 23 18:55:14 2024 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 23 May 2024 18:55:14 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23] In-Reply-To: <0p024fM1f37tPV49K78xyyJ01uEUh5I1XcsXoJBK0_Q=.4c2e6cc4-71d0-4d6f-a3a3-13bba0ab2a84@github.com> References: <_sbNFJXG7ghwsfNfxaGvvoDQ7-UtWpnhGnygKsFTsgQ=.623700db-7306-4b34-9e05-ca9059797e39@github.com> <0p024fM1f37tPV49K78xyyJ01uEUh5I1XcsXoJBK0_Q=.4c2e6cc4-71d0-4d6f-a3a3-13bba0ab2a84@github.com> Message-ID: On Thu, 23 May 2024 16:42:39 GMT, Severin Gehwolf wrote: > Do you think you'll be able to review this next week? Yes, I want to help you get this one over the line. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2127828050 From matsaave at openjdk.org Thu May 23 20:53:03 2024 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Thu, 23 May 2024 20:53:03 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2] In-Reply-To: <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> Message-ID: <6vxtp58v6Nz74xdb5BbmEjDqvk5IDeRlUjJ6sDNFSC0=.2d8868a2-30f6-4e7e-a0cc-8a4b47998508@github.com> On Thu, 23 May 2024 03:35:19 GMT, Ioi Lam wrote: >> ### Overview >> >> This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. >> >> I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, >> - `B` is the same class as `A`; or >> - `B` is a supertype of `A`; or >> - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. >> >> Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. >> >> Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. >> >> (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) >> >> ### Static CDS Archive >> >> This feature is implemented in three steps for static CDS archive dump: >> >> 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: >> >> @cp java/util/Objects 2 19 106 >> >> 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. >> >> 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. >> >> ### Dynamic CDS Archive >> >> When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. >> >> ### Limitations >> >> - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. >> - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to... > > Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - 8293980: Resolve CONSTANT_FieldRef at CDS dump time After making a quick first pass over this, I have some comments about the constant pool and cpcache code. src/hotspot/share/oops/constantPool.cpp line 301: > 299: objArrayOop rr = resolved_references(); > 300: if (rr != nullptr) { > 301: ConstantPool* orig_pool = ArchiveBuilder::current()->get_source_addr(this); Are the changes below necessary? I think the original was fine but I may be missing the point of this change. src/hotspot/share/oops/constantPool.cpp line 464: > 462: if (cache() != nullptr) { > 463: // cache() is null if this class is not yet linked. > 464: remove_resolved_field_entries_if_non_deterministic(); These methods look like they can belong to the constant pool cache instead. Can cpCache call the ClassLinker code instead so this can be part of `cache()->remove_unshareable_info()`? src/hotspot/share/oops/constantPool.cpp line 520: > 518: int cp_index = rfi->constant_pool_index(); > 519: bool archived = false; > 520: bool resolved = rfi->is_resolved(Bytecodes::_putfield) || Is one of these meant to be `is_resolved(Bytecodes::get_field)` ? src/hotspot/share/oops/resolvedFieldEntry.hpp line 65: > 63: _tos_state = other._tos_state; > 64: _flags = other._flags; > 65: _get_code = other._get_code; The fields `_get_code` and `_put_code` are normally set atomically, does this need to be the case when copying as well? ------------- PR Review: https://git.openjdk.org/jdk/pull/19355#pullrequestreview-2074929387 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1612265561 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1612288001 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1612277435 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1612261360 From iklam at openjdk.org Thu May 23 22:11:05 2024 From: iklam at openjdk.org (Ioi Lam) Date: Thu, 23 May 2024 22:11:05 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2] In-Reply-To: <6vxtp58v6Nz74xdb5BbmEjDqvk5IDeRlUjJ6sDNFSC0=.2d8868a2-30f6-4e7e-a0cc-8a4b47998508@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> <6vxtp58v6Nz74xdb5BbmEjDqvk5IDeRlUjJ6sDNFSC0=.2d8868a2-30f6-4e7e-a0cc-8a4b47998508@github.com> Message-ID: On Thu, 23 May 2024 20:28:49 GMT, Matias Saavedra Silva wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: >> >> - Merge branch 'master' into 8293980-resolve-fields-at-dumptime >> - 8293980: Resolve CONSTANT_FieldRef at CDS dump time > > src/hotspot/share/oops/constantPool.cpp line 301: > >> 299: objArrayOop rr = resolved_references(); >> 300: if (rr != nullptr) { >> 301: ConstantPool* orig_pool = ArchiveBuilder::current()->get_source_addr(this); > > Are the changes below necessary? I think the original was fine but I may be missing the point of this change. It's just for consistency. "source" is the terminology used in the comments in archiveBuilder.cpp. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1612386810 From mikael at openjdk.org Thu May 23 23:27:09 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Thu, 23 May 2024 23:27:09 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) Message-ID: Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. Testing: tier1 ------------- Commit messages: - 8332849: Update doc/testing.{md,html} (spelling and stale information) Changes: https://git.openjdk.org/jdk/pull/19375/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19375&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332849 Stats: 46 lines in 2 files changed: 0 ins; 28 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/19375.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19375/head:pull/19375 PR: https://git.openjdk.org/jdk/pull/19375 From iris at openjdk.org Fri May 24 03:58:05 2024 From: iris at openjdk.org (Iris Clark) Date: Fri, 24 May 2024 03:58:05 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) In-Reply-To: References: Message-ID: On Thu, 23 May 2024 23:22:51 GMT, Mikael Vidstedt wrote: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2075624618 From joehw at openjdk.org Fri May 24 05:26:40 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 24 May 2024 05:26:40 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13] In-Reply-To: References: Message-ID: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: add a template instead of a property file; remove implNote; update test and make script accordingly. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/dd7f6239..0de8ad69 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=12 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=11-12 Stats: 299 lines in 6 files changed: 133 ins; 155 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From joehw at openjdk.org Fri May 24 05:40:04 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 24 May 2024 05:40:04 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13] In-Reply-To: References: Message-ID: <5Zo9U4clIGAtBQms45XLX7T2lBJzIerrJMpLQNSgqmo=.2a7bae6a-76fe-4626-ae0a-8a01fe55250e@github.com> On Fri, 24 May 2024 05:26:40 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > add a template instead of a property file; remove implNote; update test and make script accordingly. Update: the plan has changed from providing a configuration file to a template. Module description, test and make file are updated accordingly. Thanks Erik for the new make file! ------------- PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2128568806 From joehw at openjdk.org Fri May 24 05:40:05 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 24 May 2024 05:40:05 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v12] In-Reply-To: <8A-Z8Q-bmxb3P2_x64siGd3gN07jzf-nHxXiiV64G0A=.65e5be8d-1975-4840-b876-4038320dcf18@github.com> References: <8A-Z8Q-bmxb3P2_x64siGd3gN07jzf-nHxXiiV64G0A=.65e5be8d-1975-4840-b876-4038320dcf18@github.com> Message-ID: On Wed, 22 May 2024 08:52:42 GMT, Magnus Ihse Bursie wrote: >> Joe Wang has updated the pull request incrementally with one additional commit since the last revision: >> >> add a note to module-info > > make/modules/java.xml/Copy.gmk line 35: > >> 33: $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ >> 34: DEST := $(CONF_DST_DIR), \ >> 35: FILES := $(wildcard $(TOPDIR)/src/java.xml/share/conf/jaxp*.properties*), \ > > I don't think you need, nor should have, the asterisk after the extension. You are only copying `.properties` files. > > Suggestion: > > FILES := $(wildcard $(TOPDIR)/src/java.xml/share/conf/jaxp*.properties), \ Thanks Magnus! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1612802098 From ihse at openjdk.org Fri May 24 08:54:07 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 24 May 2024 08:54:07 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13] In-Reply-To: References: Message-ID: On Fri, 24 May 2024 05:26:40 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > add a template instead of a property file; remove implNote; update test and make script accordingly. I would recommend naming the new file `jaxp-strict.properties.template` instead. This would follow the pattern we have used in the JDK, and I think it is much better at providing clarify as to what this file actually is -- a template for a `.properties` file. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2128979310 From ihse at openjdk.org Fri May 24 08:55:06 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 24 May 2024 08:55:06 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: On Thu, 23 May 2024 16:33:14 GMT, Magnus Ihse Bursie wrote: >> As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. >> >> We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - Merge branch 'master' into hotspot-assembler-functions > - Fix copyright headers > - Fix building on macos/aarch64 > - Use % instead of @ due to arm assembler > - 8331921: Hotspot assembler files should use common logic to setup exported functions Thanks Coleen! Any second reviewer? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19138#issuecomment-2128984554 From ihse at openjdk.org Fri May 24 09:11:06 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 24 May 2024 09:11:06 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) In-Reply-To: References: Message-ID: <6sah3EOU28IkFzMxEb-KLyS2bkPcakBc4qECajVK73s=.20472a0f-cbb6-4697-b1a3-345b4a07b62c@github.com> On Thu, 23 May 2024 23:22:51 GMT, Mikael Vidstedt wrote: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 Thanks! ?? ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2076318537 From djelinski at openjdk.org Fri May 24 09:18:01 2024 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 24 May 2024 09:18:01 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) In-Reply-To: References: Message-ID: <0evadK1RvoenJ-xlzqYhxK1PRcUsUUco6QaJLSuCFT4=.857742a7-9b2b-4161-95ce-f1589e1293b4@github.com> On Thu, 23 May 2024 23:22:51 GMT, Mikael Vidstedt wrote: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 doc/testing.html line 366: > 364: to setting JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8, but using > 365: the keyword format means that the JTREG variable is parsed > 366: and verified for correctness, so JTREG="TIMEOUT_FACTOR=8" this was a deliberate typo ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19375#discussion_r1613155418 From alanb at openjdk.org Fri May 24 11:46:07 2024 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 24 May 2024 11:46:07 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13] In-Reply-To: References: Message-ID: On Fri, 24 May 2024 05:26:40 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > add a template instead of a property file; remove implNote; update test and make script accordingly. Marked as reviewed by alanb (Reviewer). Magnus's suggestion for the suffix to be .properties.template makes sense, consistent with the one .template that the JDK currently includes in the run-time image. Overall this looks okay, I'm happy that the implNote update is removed from the proposal as it read too much like the introducing a new supported interface and would have been confusing to have two configurations in the conf directory. ------------- PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2076667358 PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2129320078 From lujaniuk at openjdk.org Fri May 24 12:20:25 2024 From: lujaniuk at openjdk.org (Ludvig Janiuk) Date: Fri, 24 May 2024 12:20:25 GMT Subject: RFR: 8332885: Clarify failure_handler self-tests Message-ID: Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. ------------- Commit messages: - 8332885 Clarify failure_handler self-tests Changes: https://git.openjdk.org/jdk/pull/19393/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19393&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332885 Stats: 15 lines in 2 files changed: 15 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19393.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19393/head:pull/19393 PR: https://git.openjdk.org/jdk/pull/19393 From erikj at openjdk.org Fri May 24 12:50:03 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 May 2024 12:50:03 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: On Thu, 23 May 2024 16:33:14 GMT, Magnus Ihse Bursie wrote: >> As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. >> >> We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - Merge branch 'master' into hotspot-assembler-functions > - Fix copyright headers > - Fix building on macos/aarch64 > - Use % instead of @ due to arm assembler > - 8331921: Hotspot assembler files should use common logic to setup exported functions Looks good from a build perspective. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19138#pullrequestreview-2076832025 From erikj at openjdk.org Fri May 24 12:54:07 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 May 2024 12:54:07 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) In-Reply-To: References: Message-ID: On Thu, 23 May 2024 23:22:51 GMT, Mikael Vidstedt wrote: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 Changes requested by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2076839326 From erikj at openjdk.org Fri May 24 12:54:09 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 May 2024 12:54:09 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) In-Reply-To: <0evadK1RvoenJ-xlzqYhxK1PRcUsUUco6QaJLSuCFT4=.857742a7-9b2b-4161-95ce-f1589e1293b4@github.com> References: <0evadK1RvoenJ-xlzqYhxK1PRcUsUUco6QaJLSuCFT4=.857742a7-9b2b-4161-95ce-f1589e1293b4@github.com> Message-ID: On Fri, 24 May 2024 09:15:51 GMT, Daniel Jeli?ski wrote: >> Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. >> >> Testing: tier1 > > doc/testing.html line 366: > >> 364: to setting JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8, but using >> 365: the keyword format means that the JTREG variable is parsed >> 366: and verified for correctness, so JTREG="TIMEOUT_FACTOR=8" > > this was a deliberate typo Indeed, these two were intentional to demonstrate the error handling of the JTREG make variable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19375#discussion_r1613429776 From joehw at openjdk.org Fri May 24 16:36:32 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 24 May 2024 16:36:32 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: References: Message-ID: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Updated on 5/23/2024 > > Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: rename the template to jaxp-strict.properties.template ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/0de8ad69..714095d1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=13 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=12-13 Stats: 10 lines in 4 files changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From joehw at openjdk.org Fri May 24 16:47:04 2024 From: joehw at openjdk.org (Joe Wang) Date: Fri, 24 May 2024 16:47:04 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template Thanks Magnus, Alan. Renamed the template to jaxp-strict.properties.template. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2129975324 From lmesnik at openjdk.org Fri May 24 17:23:01 2024 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 24 May 2024 17:23:01 GMT Subject: RFR: 8332885: Clarify failure_handler self-tests In-Reply-To: References: Message-ID: On Fri, 24 May 2024 12:16:25 GMT, Ludvig Janiuk wrote: > Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. Marked as reviewed by lmesnik (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19393#pullrequestreview-2077481241 From erikj at openjdk.org Fri May 24 19:30:04 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 May 2024 19:30:04 GMT Subject: RFR: 8332885: Clarify failure_handler self-tests In-Reply-To: References: Message-ID: <4WTtBtlrkbn2oagshFrdXjgeIO-Zbp9eob7HkOzOEgU=.01122e2f-61fe-48ee-9db9-eedd9eb4e21c@github.com> On Fri, 24 May 2024 12:16:25 GMT, Ludvig Janiuk wrote: > Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. test/failure_handler/README line 115: > 113: generated artifacts and cannot be run as part of a CI. They are tests which timeout, crash, > 114: fail in various ways and you can check the failure_handler output yourself. They might also > 115: leave processes running on your machine so be extra careful about cleaning up. These lines are longer than the text blocks in the rest of this file. Could you adjust formatting to match? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19393#discussion_r1613935457 From lancea at openjdk.org Fri May 24 19:32:06 2024 From: lancea at openjdk.org (Lance Andersen) Date: Fri, 24 May 2024 19:32:06 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2077722644 From darcy at openjdk.org Fri May 24 19:46:15 2024 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 24 May 2024 19:46:15 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v6] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Fix-up test. - Merge branch 'master' into JDK-8330188 - Adjust test for deprecated options. - Merge branch 'master' into JDK-8330188 - Update deprecated options test. - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - ... and 3 more: https://git.openjdk.org/jdk/compare/ebc520e8...2a023349 ------------- Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=05 Stats: 107 lines in 37 files changed: 46 ins; 7 del; 54 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From mikael at openjdk.org Fri May 24 21:05:27 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 24 May 2024 21:05:27 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: Message-ID: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: Revert change to deliberately misspelled variables ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19375/files - new: https://git.openjdk.org/jdk/pull/19375/files/859e52d1..88e930e1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19375&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19375&range=00-01 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/19375.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19375/head:pull/19375 PR: https://git.openjdk.org/jdk/pull/19375 From mikael at openjdk.org Fri May 24 21:54:12 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 24 May 2024 21:54:12 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: <0evadK1RvoenJ-xlzqYhxK1PRcUsUUco6QaJLSuCFT4=.857742a7-9b2b-4161-95ce-f1589e1293b4@github.com> Message-ID: <1DPAzPx00fxIaZLGs-xRak5ayLRqikRL1PhQJRB8hcw=.1e22f082-7968-42fc-a78e-a81d1ea77030@github.com> On Fri, 24 May 2024 12:50:59 GMT, Erik Joelsson wrote: >> doc/testing.html line 366: >> >>> 364: to setting JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8, but using >>> 365: the keyword format means that the JTREG variable is parsed >>> 366: and verified for correctness, so JTREG="TIMEOUT_FACTOR=8" >> >> this was a deliberate typo > > Indeed, these two were intentional to demonstrate the error handling of the JTREG make variable. Well that's embarrassing.. Thank you for the catch! Fixed (reverted). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19375#discussion_r1614063368 From erikj at openjdk.org Fri May 24 22:13:00 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 24 May 2024 22:13:00 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: Message-ID: <2mQnIKNKGsqB8uCKQCMoycalwf9vm2Gp_HUTIo1B6Ek=.4d44daff-a9de-4a9a-8f76-dc5c412633ee@github.com> On Fri, 24 May 2024 21:05:27 GMT, Mikael Vidstedt wrote: >> Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. >> >> Testing: tier1 > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Revert change to deliberately misspelled variables Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2078118971 From ihse at openjdk.org Fri May 24 23:19:03 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 24 May 2024 23:19:03 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template LGTM ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2078188172 From darcy at openjdk.org Fri May 24 23:53:54 2024 From: darcy at openjdk.org (Joe Darcy) Date: Fri, 24 May 2024 23:53:54 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v7] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Add symbol files current with JDK 23 build 24. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18787/files - new: https://git.openjdk.org/jdk/pull/18787/files/2a023349..5586ce5d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=05-06 Stats: 1635 lines in 12 files changed: 1633 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From djelinski at openjdk.org Sat May 25 05:09:02 2024 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Sat, 25 May 2024 05:09:02 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: Message-ID: On Fri, 24 May 2024 21:05:27 GMT, Mikael Vidstedt wrote: >> Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. >> >> Testing: tier1 > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Revert change to deliberately misspelled variables LGTM ------------- Marked as reviewed by djelinski (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2078586910 From iklam at openjdk.org Sat May 25 06:48:26 2024 From: iklam at openjdk.org (Ioi Lam) Date: Sat, 25 May 2024 06:48:26 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, > - `B` is the same class as `A`; or > - `B` is a supertype of `A`; or > - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. > > Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. > > Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. > > (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) > > ### Static CDS Archive > > This feature is implemented in three steps for static CDS archive dump: > > 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: > > @cp java/util/Objects 2 19 106 > > 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. > > 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. > > ### Dynamic CDS Archive > > When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. > > ### Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to unnecessarily generate code for paths that are never taken by the app... Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: - Fixed typo in previous commit - Merge branch 'master' into 8293980-resolve-fields-at-dumptime - @matias9927 comments - moved remove_resolved_field_entries_if_non_deterministic() to cpCache - Merge branch 'master' into 8293980-resolve-fields-at-dumptime - 8293980: Resolve CONSTANT_FieldRef at CDS dump time ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19355/files - new: https://git.openjdk.org/jdk/pull/19355/files/3900c568..89184c33 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=01-02 Stats: 13691 lines in 428 files changed: 7998 ins; 3129 del; 2564 mod Patch: https://git.openjdk.org/jdk/pull/19355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19355/head:pull/19355 PR: https://git.openjdk.org/jdk/pull/19355 From iklam at openjdk.org Sat May 25 06:48:27 2024 From: iklam at openjdk.org (Ioi Lam) Date: Sat, 25 May 2024 06:48:27 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v2] In-Reply-To: <6vxtp58v6Nz74xdb5BbmEjDqvk5IDeRlUjJ6sDNFSC0=.2d8868a2-30f6-4e7e-a0cc-8a4b47998508@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <7Kk3VF3qMR0IdptWLG1GGiWLbDm1BfCP2zBh7s6n3WE=.f245c5a2-cc27-4331-a401-1eaea41262ed@github.com> <6vxtp58v6Nz74xdb5BbmEjDqvk5IDeRlUjJ6sDNFSC0=.2d8868a2-30f6-4e7e-a0cc-8a4b47998508@github.com> Message-ID: On Thu, 23 May 2024 20:50:47 GMT, Matias Saavedra Silva wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: >> >> - Merge branch 'master' into 8293980-resolve-fields-at-dumptime >> - 8293980: Resolve CONSTANT_FieldRef at CDS dump time > > src/hotspot/share/oops/constantPool.cpp line 464: > >> 462: if (cache() != nullptr) { >> 463: // cache() is null if this class is not yet linked. >> 464: remove_resolved_field_entries_if_non_deterministic(); > > These methods look like they can belong to the constant pool cache instead. Can cpCache call the ClassLinker code instead so this can be part of `cache()->remove_unshareable_info()`? I moved remove_resolved_field_entries_if_non_deterministic() to cpCache as you suggested. I removed the functions for indy and method, as dumptime resolution for those types of entries is not yet implemented. > src/hotspot/share/oops/constantPool.cpp line 520: > >> 518: int cp_index = rfi->constant_pool_index(); >> 519: bool archived = false; >> 520: bool resolved = rfi->is_resolved(Bytecodes::_putfield) || > > Is one of these meant to be `is_resolved(Bytecodes::get_field)` ? Fixed. > src/hotspot/share/oops/resolvedFieldEntry.hpp line 65: > >> 63: _tos_state = other._tos_state; >> 64: _flags = other._flags; >> 65: _get_code = other._get_code; > > The fields `_get_code` and `_put_code` are normally set atomically, does this need to be the case when copying as well? This is done inside while the ResolvedFieldEntries are being prepared during class rewriting. All access is single threaded so there's no need for atomic operations. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1614389410 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1614389465 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1614390838 From iris at openjdk.org Sat May 25 23:53:01 2024 From: iris at openjdk.org (Iris Clark) Date: Sat, 25 May 2024 23:53:01 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: Message-ID: On Fri, 24 May 2024 21:05:27 GMT, Mikael Vidstedt wrote: >> Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. >> >> Testing: tier1 > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Revert change to deliberately misspelled variables Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19375#pullrequestreview-2079262776 From aph-open at littlepinkcloud.com Mon May 27 08:37:05 2024 From: aph-open at littlepinkcloud.com (Andrew Haley) Date: Mon, 27 May 2024 09:37:05 +0100 Subject: InlineSecondarySupersTest only available in c2? In-Reply-To: References: Message-ID: On 5/21/24 10:32, Johan Vos wrote: > While working on OpenJDK/Mobile, I had to apply a patch for Android and iOS that I believe might be broader than just the mobile platforms. > I had compile issues in > stubGenerator_aarch64.cpp:8470:13: error: use of undeclared identifier 'InlineSecondarySupersTest' > > I noticed that?InlineSecondarySupersTest is only added via?c2_globals.hpp . In my branch for the mobile port, I added a check around that code [1] and now it works when I want to build a minimal or a client variant. However, when I use the same configuration on Linux or MacOSX (--with-jvm-variants=client or minimal), it fails on those platforms as well (it works fine on the server variant, as that grabs c2_globals.hpp). The patch for the equivalent code in C1 is in progress. I'll make sure it works for minimal VM. -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671 From lujaniuk at openjdk.org Mon May 27 09:37:07 2024 From: lujaniuk at openjdk.org (Ludvig Janiuk) Date: Mon, 27 May 2024 09:37:07 GMT Subject: RFR: 8332885: Clarify failure_handler self-tests In-Reply-To: <4WTtBtlrkbn2oagshFrdXjgeIO-Zbp9eob7HkOzOEgU=.01122e2f-61fe-48ee-9db9-eedd9eb4e21c@github.com> References: <4WTtBtlrkbn2oagshFrdXjgeIO-Zbp9eob7HkOzOEgU=.01122e2f-61fe-48ee-9db9-eedd9eb4e21c@github.com> Message-ID: On Fri, 24 May 2024 19:26:29 GMT, Erik Joelsson wrote: >> Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. > > test/failure_handler/README line 115: > >> 113: generated artifacts and cannot be run as part of a CI. They are tests which timeout, crash, >> 114: fail in various ways and you can check the failure_handler output yourself. They might also >> 115: leave processes running on your machine so be extra careful about cleaning up. > > These lines are longer than the text blocks in the rest of this file. Could you adjust formatting to match? Sure, thanks for noticing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19393#discussion_r1615787886 From lujaniuk at openjdk.org Mon May 27 09:46:31 2024 From: lujaniuk at openjdk.org (Ludvig Janiuk) Date: Mon, 27 May 2024 09:46:31 GMT Subject: RFR: 8332885: Clarify failure_handler self-tests [v2] In-Reply-To: References: Message-ID: > Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. Ludvig Janiuk has updated the pull request incrementally with three additional commits since the last revision: - styling - typo - reflow ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19393/files - new: https://git.openjdk.org/jdk/pull/19393/files/26a7be5c..a9d2cab2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19393&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19393&range=00-01 Stats: 7 lines in 1 file changed: 1 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/19393.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19393/head:pull/19393 PR: https://git.openjdk.org/jdk/pull/19393 From lujaniuk at openjdk.org Mon May 27 09:46:31 2024 From: lujaniuk at openjdk.org (Ludvig Janiuk) Date: Mon, 27 May 2024 09:46:31 GMT Subject: Integrated: 8332885: Clarify failure_handler self-tests In-Reply-To: References: Message-ID: On Fri, 24 May 2024 12:16:25 GMT, Ludvig Janiuk wrote: > Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. This pull request has now been integrated. Changeset: 08891553 Author: Ludvig Janiuk URL: https://git.openjdk.org/jdk/commit/08891553bbd3d71337d8a94c75051db74e15903f Stats: 16 lines in 2 files changed: 16 ins; 0 del; 0 mod 8332885: Clarify failure_handler self-tests Reviewed-by: lmesnik ------------- PR: https://git.openjdk.org/jdk/pull/19393 From sgehwolf at openjdk.org Mon May 27 12:28:22 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Mon, 27 May 2024 12:28:22 GMT Subject: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23] In-Reply-To: References: <_sbNFJXG7ghwsfNfxaGvvoDQ7-UtWpnhGnygKsFTsgQ=.623700db-7306-4b34-9e05-ca9059797e39@github.com> <0p024fM1f37tPV49K78xyyJ01uEUh5I1XcsXoJBK0_Q=.4c2e6cc4-71d0-4d6f-a3a3-13bba0ab2a84@github.com> Message-ID: On Thu, 23 May 2024 18:52:53 GMT, Alan Bateman wrote: > Yes, I want to help you get this one over the line. Thanks! Appreciate that. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14787#issuecomment-2133375454 From ihse at openjdk.org Mon May 27 15:44:03 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 27 May 2024 15:44:03 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: <1U5j3aT_NThjKvJYcJMyhmQBW9cg5aXjZ7R_G74-4PQ=.46ae3afb-10bd-4d5d-8800-ceb7181281d7@github.com> On Thu, 23 May 2024 16:33:14 GMT, Magnus Ihse Bursie wrote: >> As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. >> >> We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - Merge branch 'master' into hotspot-assembler-functions > - Fix copyright headers > - Fix building on macos/aarch64 > - Use % instead of @ due to arm assembler > - 8331921: Hotspot assembler files should use common logic to setup exported functions Can I have a second Hotspot reviewer on this? Or are the reviews from Coleen and Erik good enough? ------------- PR Comment: https://git.openjdk.org/jdk/pull/19138#issuecomment-2133719877 From dholmes at openjdk.org Tue May 28 02:44:07 2024 From: dholmes at openjdk.org (David Holmes) Date: Tue, 28 May 2024 02:44:07 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: On Thu, 23 May 2024 16:33:14 GMT, Magnus Ihse Bursie wrote: >> As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. >> >> We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - Merge branch 'master' into hotspot-assembler-functions > - Fix copyright headers > - Fix building on macos/aarch64 > - Use % instead of @ due to arm assembler > - 8331921: Hotspot assembler files should use common logic to setup exported functions What testing has been done in our CI? The changes seem quite reasonable but it would be easy to overlook a small difference, so the proof of this is in the building and testing. One query below, but hitting approve. Thanks make/hotspot/lib/CompileJvm.gmk line 53: > 51: -I$(TOPDIR)/src/hotspot/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \ > 52: -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS) \ > 53: -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE) \ What does the second line evaluate to on Windows? Does it duplicate the prior line? ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19138#pullrequestreview-2081640019 PR Review Comment: https://git.openjdk.org/jdk/pull/19138#discussion_r1616510889 From ihse at openjdk.org Tue May 28 11:19:03 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 28 May 2024 11:19:03 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v2] In-Reply-To: References: Message-ID: On Tue, 28 May 2024 02:39:01 GMT, David Holmes wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: >> >> - Merge branch 'master' into hotspot-assembler-functions >> - Fix copyright headers >> - Fix building on macos/aarch64 >> - Use % instead of @ due to arm assembler >> - 8331921: Hotspot assembler files should use common logic to setup exported functions > > make/hotspot/lib/CompileJvm.gmk line 53: > >> 51: -I$(TOPDIR)/src/hotspot/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \ >> 52: -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS) \ >> 53: -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE) \ > > What does the second line evaluate to on Windows? Does it duplicate the prior line? Yes, it does. It is a bit unfortunate, but it is also hard to avoid with the limited expressions that are available in Make syntax. (It can be done but at the cost of decreased readability.) It is completely harmless, though, and we have the same construct in other places in the build system. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19138#discussion_r1617044188 From ihse at openjdk.org Tue May 28 11:35:36 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 28 May 2024 11:35:36 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v3] In-Reply-To: References: Message-ID: > As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. > > We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Merge branch 'master' into hotspot-assembler-functions - Merge branch 'master' into hotspot-assembler-functions - Fix copyright headers - Fix building on macos/aarch64 - Use % instead of @ due to arm assembler - 8331921: Hotspot assembler files should use common logic to setup exported functions ------------- Changes: https://git.openjdk.org/jdk/pull/19138/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19138&range=02 Stats: 604 lines in 22 files changed: 124 ins; 347 del; 133 mod Patch: https://git.openjdk.org/jdk/pull/19138.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19138/head:pull/19138 PR: https://git.openjdk.org/jdk/pull/19138 From ihse at openjdk.org Tue May 28 11:40:09 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 28 May 2024 11:40:09 GMT Subject: RFR: 8331921: Hotspot assembler files should use common logic to setup exported functions [v3] In-Reply-To: References: Message-ID: <5CZPU7xD2DJ8D45elq-8b5STV9TJ14-4aLlUMpTMI5s=.ab8a5712-7b46-4c70-9758-685f3f9782ff@github.com> On Tue, 28 May 2024 02:41:42 GMT, David Holmes wrote: > What testing has been done in our CI? I have run tier-1. And, as I said, I had also made the typical build change test: comparing the build results bit-for-bit. On macOS and Windows, there were no differences. On linux, there were a few technical changes in the symbol table, but that should not really affect the code. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19138#issuecomment-2134999226 From ihse at openjdk.org Tue May 28 11:40:10 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 28 May 2024 11:40:10 GMT Subject: Integrated: 8331921: Hotspot assembler files should use common logic to setup exported functions In-Reply-To: References: Message-ID: On Wed, 8 May 2024 13:30:59 GMT, Magnus Ihse Bursie wrote: > As seen in [JDK-8331541](https://bugs.openjdk.org/browse/JDK-8331541), if we are not consistently setting all assembler directives correctly, we can get errors that are not detected by the linker. > > We should stop duplicating this code and create a unified macro to properly setup functions, and use it everywhere. This pull request has now been integrated. Changeset: cabe3374 Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/cabe337400a0bd61d73bf3ca66e16266267299c7 Stats: 604 lines in 22 files changed: 124 ins; 347 del; 133 mod 8331921: Hotspot assembler files should use common logic to setup exported functions Reviewed-by: coleenp, erikj, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/19138 From matsaave at openjdk.org Tue May 28 14:42:07 2024 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Tue, 28 May 2024 14:42:07 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: On Sat, 25 May 2024 06:48:26 GMT, Ioi Lam wrote: >> ### Overview >> >> This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. >> >> I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, >> - `B` is the same class as `A`; or >> - `B` is a supertype of `A`; or >> - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. >> >> Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. >> >> Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. >> >> (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) >> >> ### Static CDS Archive >> >> This feature is implemented in three steps for static CDS archive dump: >> >> 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: >> >> @cp java/util/Objects 2 19 106 >> >> 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. >> >> 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. >> >> ### Dynamic CDS Archive >> >> When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. >> >> ### Limitations >> >> - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. >> - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to... > > Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: > > - Fixed typo in previous commit > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - @matias9927 comments - moved remove_resolved_field_entries_if_non_deterministic() to cpCache > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - 8293980: Resolve CONSTANT_FieldRef at CDS dump time Changes look good, thanks! ------------- Marked as reviewed by matsaave (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19355#pullrequestreview-2083038736 From mullan at openjdk.org Tue May 28 14:58:12 2024 From: mullan at openjdk.org (Sean Mullan) Date: Tue, 28 May 2024 14:58:12 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template Just some wording suggestions. src/java.xml/share/conf/jaxp-strict.properties.template line 36: > 34: # This property determines whether XSLT and XPath extension functions are allowed. > 35: # The value type is boolean and the default value is true (allowing > 36: # extension functions). The following entry would override the default value and I prefer the latter wording suggestion as in other places like the Limits section, you use present tense, which I also think sounds better. s/would/will/ or s/would override/overrides/ s/disallow/disallows/ src/java.xml/share/conf/jaxp-strict.properties.template line 44: > 42: # Overriding the default parser: > 43: # > 44: # This property allows using a third party implementation to override the default s/using a third party implementation/a third party implementation/ src/java.xml/share/conf/jaxp-strict.properties.template line 60: > 58: # strict -- indicates that the resolver should throw a CatalogException > 59: # > 60: # The following setting would cause the resolve to throw a CatalogException when s/would/will/ or s/would cause/causes/ s/resolve/CatalogResolver/ ? src/java.xml/share/conf/jaxp-strict.properties.template line 67: > 65: # Implementation Specific Properties - DTD > 66: # > 67: # This property instructs the parsers to: deny, ignore or allow DTD processing. s/to:/to/ src/java.xml/share/conf/jaxp-strict.properties.template line 68: > 66: # > 67: # This property instructs the parsers to: deny, ignore or allow DTD processing. > 68: # The following setting would cause the parser to reject DTD by throwing an exception. s/would/will/ or s/would cause/causes/ s/DTD/DTDs/ src/java.xml/share/conf/jaxp.properties line 1: > 1: ################################################################################ Similar wording suggestions as in the `jaxp-strict.properties.template` file. ------------- PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2083052633 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617388223 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617389854 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617392917 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617394277 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617395992 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1617407662 From naoto at openjdk.org Tue May 28 16:06:12 2024 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 28 May 2024 16:06:12 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: <__L9xATnjfcEu_zrbjjbL1Pf_01AuhcmeHOY1XEwXxI=.89c23772-de9c-48d5-9707-7650039e28fc@github.com> On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template LGTM test/jaxp/javax/xml/jaxp/unittest/common/config/ConfigFileTest.java line 41: > 39: * @run driver common.config.ConfigFileTest 0 // verifies jaxp.properties > 40: * @run driver common.config.ConfigFileTest 1 // verifies jaxp-strict.properties.template > 41: * @summary verifies the default JAXP configuration file jaxp.properties and Summary would read better after the @test tag ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2079802647 PR Review Comment: https://git.openjdk.org/jdk/pull/18831#discussion_r1615343327 From magnus.ihse.bursie at oracle.com Tue May 28 16:08:56 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Tue, 28 May 2024 18:08:56 +0200 Subject: Hermetic Java project meeting In-Reply-To: References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> Message-ID: <4b53e45f-5c26-4f22-a9dc-5276910e6430@oracle.com> On 2024-05-07 06:04, Jiangli Zhou wrote: >> I did think I correctly changed every dynamic check that you had added >> to a compile-time check, so it bewilders me somewhat when you say that >> jvm.cfg is not needed in your branch. >> >> Can you verify and confirm that the static launcher actually works in >> your branch, if there is no "lib/jvm.cfg" present? >> In my /leyden/build/linux-x86_64-server-slowdebug/images/jdk directory: > > $ mv lib/jvm.cfg lib/jvm.cfg.no_used > $ find . | grep jvm.cfg > ./lib/jvm.cfg.no_used > > $ bin/javastatic -cp HelloWorld > HelloWorld I was very much mislead by this. I was sure I hade made some mistake when I picked out the changes you have made for static builds (and removed all the other changes, e.g. for the hermetic jar files), since you said this worked for you. I have been scrutinizing the difference between your branch and mine, over and over again, without understanding what the difference could be. Finally I did what I should have done at the very beginning, and actually tested building and running your branch. It did not work either. So why did you claim it worked? I kept digging, and I found out the reason. You had indeed implemented a fix for this, but only on Linux. I was testing on macOS. (It is also not implemented for Windows, but since I'm still struggling to find a way to create proper static builds there it is less of a problem for now.) My branch worked just as well as your on Linux. I have now fixed so it works on macOS too. With this hurdle out of the way, I can get back to doing real work on the patch. Unfortunately this detour took far too much time. :-( /Magnus -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehw at openjdk.org Tue May 28 16:27:24 2024 From: joehw at openjdk.org (Joe Wang) Date: Tue, 28 May 2024 16:27:24 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v15] In-Reply-To: References: Message-ID: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Updated on 5/23/2024 > > Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: update properties files with wording suggestions; move summary to after the test tag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18831/files - new: https://git.openjdk.org/jdk/pull/18831/files/714095d1..abc1e88b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=14 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18831&range=13-14 Stats: 21 lines in 3 files changed: 2 ins; 2 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/18831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18831/head:pull/18831 PR: https://git.openjdk.org/jdk/pull/18831 From joehw at openjdk.org Tue May 28 16:27:24 2024 From: joehw at openjdk.org (Joe Wang) Date: Tue, 28 May 2024 16:27:24 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14] In-Reply-To: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> References: <-xQutVfz6r3JPZZnkO71_iimpzxhNvdoX8cpz8E7-X8=.5867b83a-ec89-4c69-ac7c-6bc11caeb93e@github.com> Message-ID: On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > rename the template to jaxp-strict.properties.template Thanks Sean, Naoto! Updated accordingly. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18831#issuecomment-2135662540 From mullan at openjdk.org Tue May 28 16:46:05 2024 From: mullan at openjdk.org (Sean Mullan) Date: Tue, 28 May 2024 16:46:05 GMT Subject: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v15] In-Reply-To: References: Message-ID: On Tue, 28 May 2024 16:27:24 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 >> >> Updated on 5/16/2024 >> >> Design change: >> The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. >> >> Updated on 5/18/2024 >> >> Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. >> >> Updated on 5/23/2024 >> >> Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. > > Joe Wang has updated the pull request incrementally with one additional commit since the last revision: > > update properties files with wording suggestions; move summary to after the test tag Marked as reviewed by mullan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/18831#pullrequestreview-2083391002 From mikael at openjdk.org Tue May 28 17:10:08 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Tue, 28 May 2024 17:10:08 GMT Subject: RFR: 8332849: Update doc/testing.{md,html} (spelling and stale information) [v2] In-Reply-To: References: Message-ID: On Fri, 24 May 2024 21:05:27 GMT, Mikael Vidstedt wrote: >> Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. >> >> Testing: tier1 > > Mikael Vidstedt has updated the pull request incrementally with one additional commit since the last revision: > > Revert change to deliberately misspelled variables Thank you for all the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19375#issuecomment-2135734935 From mikael at openjdk.org Tue May 28 17:10:09 2024 From: mikael at openjdk.org (Mikael Vidstedt) Date: Tue, 28 May 2024 17:10:09 GMT Subject: Integrated: 8332849: Update doc/testing.{md, html} (spelling and stale information) In-Reply-To: References: Message-ID: On Thu, 23 May 2024 23:22:51 GMT, Mikael Vidstedt wrote: > Update the testing doc to remove some stale information (AOT_MODULES, removed in [JDK-8264805](https://bugs.openjdk.org/browse/JDK-8264805)) and fix some spelling issues. > > Testing: tier1 This pull request has now been integrated. Changeset: da6aa2a8 Author: Mikael Vidstedt URL: https://git.openjdk.org/jdk/commit/da6aa2a86c86ba5fce747b36dcb2d6001cfcc44e Stats: 43 lines in 2 files changed: 0 ins; 28 del; 15 mod 8332849: Update doc/testing.{md,html} (spelling and stale information) Reviewed-by: iris, ihse, erikj, djelinski ------------- PR: https://git.openjdk.org/jdk/pull/19375 From jianglizhou at google.com Tue May 28 18:00:24 2024 From: jianglizhou at google.com (Jiangli Zhou) Date: Tue, 28 May 2024 11:00:24 -0700 Subject: Hermetic Java project meeting In-Reply-To: <4b53e45f-5c26-4f22-a9dc-5276910e6430@oracle.com> References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> <4b53e45f-5c26-4f22-a9dc-5276910e6430@oracle.com> Message-ID: On Tue, May 28, 2024 at 9:09?AM Magnus Ihse Bursie < magnus.ihse.bursie at oracle.com> wrote: > On 2024-05-07 06:04, Jiangli Zhou wrote: > > I did think I correctly changed every dynamic check that you had added > to a compile-time check, so it bewilders me somewhat when you say that > jvm.cfg is not needed in your branch. > > Can you verify and confirm that the static launcher actually works in > your branch, if there is no "lib/jvm.cfg" present? > In my /leyden/build/linux-x86_64-server-slowdebug/images/jdk directory: > > $ mv lib/jvm.cfg lib/jvm.cfg.no_used $ find . | grep jvm.cfg > ./lib/jvm.cfg.no_used $ bin/javastatic -cp HelloWorld HelloWorld > > I was very much mislead by this. I was sure I hade made some mistake when > I picked out the changes you have made for static builds (and removed all > the other changes, e.g. for the hermetic jar files), since you said this > worked for you. I have been scrutinizing the difference between your branch > and mine, over and over again, without understanding what the difference > could be. > > Finally I did what I should have done at the very beginning, and actually > tested building and running your branch. > > It did not work either. > > So why did you claim it worked? I kept digging, and I found out the > reason. You had indeed implemented a fix for this, but only on Linux. I was > testing on macOS. (It is also not implemented for Windows, but since I'm > still struggling to find a way to create proper static builds there it is > less of a problem for now.) > > My branch worked just as well as your on Linux. I have now fixed so it > works on macOS too. With this hurdle out of the way, I can get back to > doing real work on the patch. Unfortunately this detour took far too much > time. :-( > Mystery solved! Yes, our prototype was for linux-x64 only (communicated in https://mail.openjdk.org/pipermail/leyden-dev/2023-February/000106.html and our discussion meetings). I think I was not clear that you were testing on macOS. The supported platform was also discussed in the hermetic Java meetings. My understanding was that we can focus on Linux (or unix-like) initially. Let's get the initial integration point support for Linux. Glad to see that you are making progress! Please let me know if you are running into any other issues. Best, Jiangli > /Magnus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehw at openjdk.org Tue May 28 19:29:11 2024 From: joehw at openjdk.org (Joe Wang) Date: Tue, 28 May 2024 19:29:11 GMT Subject: Integrated: 8330542: Template for Creating Strict JAXP Configuration File In-Reply-To: References: Message-ID: <6Fc9SynPKR0GhTm0dc3ScBGlQh-OXUuNMpmaBO4Pnmw=.59ba1002-bf02-49c6-8d1e-de431e305867@github.com> On Wed, 17 Apr 2024 23:24:06 GMT, Joe Wang wrote: > Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more restricted configuration than previous versions such as JDK 22 > > Updated on 5/16/2024 > > Design change: > The design is changed to include in the JDK two configuration files that are the default jaxp.properties and jaxp-strict.properties, instead of three, dropping jaxp-compat.properties. > > Updated on 5/18/2024 > > Withdraw changes to jaxp.properties. The original idea was to match jaxp-strict.properties with regard to the properties. However, that change impact the configuration process, resulting in tests that verify the process to fail. > > Updated on 5/23/2024 > > Provide a template `jaxp-strict.template` instead of a properties file. This template can be used to create custom configuration files. This pull request has now been integrated. Changeset: 91caec07 Author: Joe Wang URL: https://git.openjdk.org/jdk/commit/91caec07cb2e4d98d4366f5627f55834282caa94 Stats: 287 lines in 5 files changed: 263 ins; 7 del; 17 mod 8330542: Template for Creating Strict JAXP Configuration File Reviewed-by: lancea, erikj, alanb, ihse, mullan, naoto ------------- PR: https://git.openjdk.org/jdk/pull/18831 From darcy at openjdk.org Wed May 29 04:52:33 2024 From: darcy at openjdk.org (Joe Darcy) Date: Wed, 29 May 2024 04:52:33 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v8] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: - Correct release year. - Merge branch 'master' into JDK-8330188 - Add symbol files current with JDK 23 build 24. - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Fix-up test. - Merge branch 'master' into JDK-8330188 - Adjust test for deprecated options. - Merge branch 'master' into JDK-8330188 - Update deprecated options test. - ... and 6 more: https://git.openjdk.org/jdk/compare/0f3e2cc3...45e1c040 ------------- Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=07 Stats: 1742 lines in 49 files changed: 1679 ins; 7 del; 56 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From heidinga at openjdk.org Wed May 29 13:13:07 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Wed, 29 May 2024 13:13:07 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: On Sat, 25 May 2024 06:48:26 GMT, Ioi Lam wrote: >> ### Overview >> >> This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. >> >> I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, >> - `B` is the same class as `A`; or >> - `B` is a supertype of `A`; or >> - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. >> >> Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. >> >> Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. >> >> (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) >> >> ### Static CDS Archive >> >> This feature is implemented in three steps for static CDS archive dump: >> >> 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: >> >> @cp java/util/Objects 2 19 106 >> >> 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. >> >> 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. >> >> ### Dynamic CDS Archive >> >> When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. >> >> ### Limitations >> >> - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. >> - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to... > > Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: > > - Fixed typo in previous commit > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - @matias9927 comments - moved remove_resolved_field_entries_if_non_deterministic() to cpCache > - Merge branch 'master' into 8293980-resolve-fields-at-dumptime > - 8293980: Resolve CONSTANT_FieldRef at CDS dump time make/GenerateLinkOptData.gmk line 68: > 66: # - The classlist can be influenced by locale. Always set it to en/US. > 67: # - Run with -Xint, as the compiler can speculatively resolve constant pool entries. > 68: # - ForkJoinPool parallelism can cause constant pool resolution to be non-dererministic. Minor typo Suggestion: # - ForkJoinPool parallelism can cause constant pool resolution to be non-deterministic. src/hotspot/share/cds/classListParser.cpp line 848: > 846: if (preresolve_fmi) { > 847: ClassPrelinker::preresolve_field_and_method_cp_entries(THREAD, ik, &preresolve_list); > 848: } Can you clarify the approach here? As I read the code, `ClassPrelinker::preresolve_class_cp_entries` will walk the whole constant pool looking for unresolved class entries that match and then resolve them. `ClassPrelinker::preresolve_field_and_method_cp_entries` walks all methods bytecode by bytecode to resolve them. Doesn't the `preresolve_list` already tell us which CP entries need to be resolved and the cp tag tell us the type of resolution to do? Can we not do this in a single pass over the cp rather than walking method bytecodes? Is the reason for this approach to avoid always resolving FieldMethodRefs for both get and put and only do them if there's a corresponding bytecode? src/hotspot/share/oops/instanceKlass.cpp line 2560: > 2558: // The ConstantPool is cleaned in a separate pass in ArchiveBuilder::make_klasses_shareable(), > 2559: // so no need to do it here. > 2560: //constants()->remove_unshareable_info(); Should this be deleted rather than commented out? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1617547809 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1618836313 PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1617818205 From ihse at openjdk.org Wed May 29 15:07:31 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 29 May 2024 15:07:31 GMT Subject: RFR: 8333189: Make sure clang on linux uses lld as linker Message-ID: When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. ------------- Commit messages: - 8333189: Make sure clang on linux uses lld as linker Changes: https://git.openjdk.org/jdk/pull/19456/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19456&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333189 Stats: 10 lines in 4 files changed: 8 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/19456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19456/head:pull/19456 PR: https://git.openjdk.org/jdk/pull/19456 From jiangli at openjdk.org Wed May 29 15:14:03 2024 From: jiangli at openjdk.org (Jiangli Zhou) Date: Wed, 29 May 2024 15:14:03 GMT Subject: RFR: 8333189: Make sure clang on linux uses lld as linker In-Reply-To: References: Message-ID: On Wed, 29 May 2024 15:01:27 GMT, Magnus Ihse Bursie wrote: > When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. Marked as reviewed by jiangli (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19456#pullrequestreview-2085708768 From ihse at openjdk.org Wed May 29 16:03:04 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 29 May 2024 16:03:04 GMT Subject: RFR: 8333189: Make sure clang on linux uses lld as linker In-Reply-To: References: Message-ID: On Wed, 29 May 2024 15:10:58 GMT, Jiangli Zhou wrote: >> When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. > > Marked as reviewed by jiangli (Reviewer). @jianglizhou Did you verify that this works on your system? Apparently your environment and mine has differed, since you have been able to build with clang without this patch. If you did not, I'd appreciate if you could take it for a spin, so I know I won't break anything in environments similar to your. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19456#issuecomment-2137761321 From iklam at openjdk.org Wed May 29 16:07:20 2024 From: iklam at openjdk.org (Ioi Lam) Date: Wed, 29 May 2024 16:07:20 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v4] In-Reply-To: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: > ### Overview > > This PR archives `CONSTANT_FieldRef` entries in the _resolved_ state when it's safe to do so. > > I.e., when a `CONSTANT_FieldRef` constant pool entry in class `A` refers to a *non-static* field `B.F`, > - `B` is the same class as `A`; or > - `B` is a supertype of `A`; or > - `B` is one of the [vmClasses](https://github.com/openjdk/jdk/blob/3d4185a9ce482cc655a4c67f39cb2682b02ae4fe/src/hotspot/share/classfile/vmClasses.hpp), and `A` is loaded by the boot class loader. > > Under these conditions, it's guaranteed that whenever `A` tries to use this entry at runtime, `B` is guaranteed to have already been resolved in A's system dictionary, to the same value as resolved during dump time. > > Therefore, we can safely archive the `ResolvedFieldEntry` in class `A` that refers to `B.F`. > > (Note that we do not archive the `CONSTANT_FieldRef` entries for static fields, as the resolution of such entries can lead to class initialization at runtime. We plan to handle them in a future RFE.) > > ### Static CDS Archive > > This feature is implemented in three steps for static CDS archive dump: > > 1. At the end of the training run, `ClassListWriter` iterates over all loaded classes and writes the indices of their resolved `Class` and `FieldRef` constant pool entries into the classlist file, with the `@cp` prefix. E.g., the following means that the constant pool entries at indices 2, 19 and 106 were resolved during the training run: > > @cp java/util/Objects 2 19 106 > > 2. When creating the static CDS archive from the classlist file, `ClassListParser` processes the `@cp` entries and resolves all the indicated entries. > > 3. Inside the `ArchiveBuilder::make_klasses_shareable()` function, we iterate over all entries in all archived `ConstantPools`. When we see a _resolved_ entry that does not satisfy the safety requirements as stated in _Overview_, we revert it back to the unresolved state. > > ### Dynamic CDS Archive > > When dumping the dynamic CDS archive, `ClassListWriter` and `ClassListParser` are not used, so steps 1 and 2 are skipped. We only perform step 3 when the archive is being written. > > ### Limitations > > - For safety, we limit this optimization to only classes loaded by the boot, platform, and app class loaders. This may be relaxed in the future. > - We archive only the constant pool entries that are actually resolved during the training run. We don't speculatively resolve other entries, as doing so may cause C2 to unnecessarily generate code for paths that are never taken by the app... Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: @DanHeidinga comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19355/files - new: https://git.openjdk.org/jdk/pull/19355/files/89184c33..17a1ce62 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19355&range=02-03 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/19355.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19355/head:pull/19355 PR: https://git.openjdk.org/jdk/pull/19355 From iklam at openjdk.org Wed May 29 16:07:22 2024 From: iklam at openjdk.org (Ioi Lam) Date: Wed, 29 May 2024 16:07:22 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: On Wed, 29 May 2024 12:53:57 GMT, Dan Heidinga wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: >> >> - Fixed typo in previous commit >> - Merge branch 'master' into 8293980-resolve-fields-at-dumptime >> - @matias9927 comments - moved remove_resolved_field_entries_if_non_deterministic() to cpCache >> - Merge branch 'master' into 8293980-resolve-fields-at-dumptime >> - 8293980: Resolve CONSTANT_FieldRef at CDS dump time > > src/hotspot/share/cds/classListParser.cpp line 848: > >> 846: if (preresolve_fmi) { >> 847: ClassPrelinker::preresolve_field_and_method_cp_entries(THREAD, ik, &preresolve_list); >> 848: } > > Can you clarify the approach here? > > As I read the code, `ClassPrelinker::preresolve_class_cp_entries` will walk the whole constant pool looking for unresolved class entries that match and then resolve them. `ClassPrelinker::preresolve_field_and_method_cp_entries` walks all methods bytecode by bytecode to resolve them. > > Doesn't the `preresolve_list` already tell us which CP entries need to be resolved and the cp tag tell us the type of resolution to do? Can we not do this in a single pass over the cp rather than walking method bytecodes? > > Is the reason for this approach to avoid always resolving FieldMethodRefs for both get and put and only do them if there's a corresponding bytecode? `preresolve_list` has the original CP indices (E.g., `putfield #123` as stored in the classfile), but in HotSpot, after bytecode rewriting, the u2 following the bytecode is changed to an index into the `cpcache()->_resolved_field_entries` array, so it becomes something like `putfield #45`. So we need to know how to convert the `123` index to the `45` index. We could walk `_resolved_field_entries` to find the `ResolvedFieldEntry` whose `_cpool_index` is `123`. However, before the `ResolvedFieldEntry` is resolved, we don't know which bytecode is used to resolve it, so we don't know whether it's for a static field or non-static field. Since we want to filter out the static fields in the PR, we need to: - walk the bytecodes to find only getfield/putfield bytecodes - these bytecodes will give us an index to the `_resolved_field_entries` array - from there, we discover the original CP index - then we see if this index is set to true in `preresolve_list` There's also a compatibility issue -- it's possible to have static and non-static field access using the same CP index: class Hack { static int myField; int foo(boolean flag) { try { if (flag) { // throw IncompatibleClassChangeError return /* pseudo code*/ getfield this.myField; } else { // OK return /* pseudo code*/ getstatic Hack.myField; } } catch (Throwable) { return 5678; } } So we must call `InterpreterRuntime::resolve_get_put()` which performs all the checks for access rights, static-vs-non-static, etc. This call requires a Method parameter, so we must walk all the Methods to find an appropriate one. Perhaps it's possible to refactor the `InterpreterRuntime` code to avoid passing in a Method, but I am hesitant to do that with code that deals with access right checks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1619144592 From erikj at openjdk.org Wed May 29 16:32:02 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 29 May 2024 16:32:02 GMT Subject: RFR: 8333189: Make sure clang on linux uses lld as linker In-Reply-To: References: Message-ID: On Wed, 29 May 2024 15:01:27 GMT, Magnus Ihse Bursie wrote: > When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19456#pullrequestreview-2085891828 From jiangli at openjdk.org Wed May 29 17:27:01 2024 From: jiangli at openjdk.org (Jiangli Zhou) Date: Wed, 29 May 2024 17:27:01 GMT Subject: RFR: 8333189: Make sure clang on linux uses lld as linker In-Reply-To: References: Message-ID: On Wed, 29 May 2024 15:10:58 GMT, Jiangli Zhou wrote: >> When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. > > Marked as reviewed by jiangli (Reviewer). > @jianglizhou Did you verify that this works on your system? Apparently your environment and mine has differed, since you have been able to build with clang without this patch. If you did not, I'd appreciate if you could take it for a spin, so I know I won't break anything in environments similar to your. I just tested a build for linux x86_64 with clang in our build environment. Your change doesn't appear to cause any breakage so far. Thanks for being cautious. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19456#issuecomment-2137917052 From ihse at openjdk.org Wed May 29 19:54:10 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 29 May 2024 19:54:10 GMT Subject: Integrated: 8333189: Make sure clang on linux uses lld as linker In-Reply-To: References: Message-ID: <74bovb7RlPm5ap8Vjc3ge_WupaxeHkL778qyV7eDJNk=.b3551cb0-d0dc-4ed4-97c0-c76f4e9d6b4a@github.com> On Wed, 29 May 2024 15:01:27 GMT, Magnus Ihse Bursie wrote: > When compiling with clang on linux, clang can decide to pick up the bfd linker instead of lld, the LLVM linker. This will invalidate assumptions about command lines that are passed on to the linker. We should use -fuse-ld=lld to force clang to always pick lld as the linker, so we can be sure that the command lines will work. This pull request has now been integrated. Changeset: 789ac8b2 Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/789ac8b2768671ec83a7ed4a72c5fe27a1734c5e Stats: 10 lines in 4 files changed: 8 ins; 0 del; 2 mod 8333189: Make sure clang on linux uses lld as linker Reviewed-by: jiangli, erikj ------------- PR: https://git.openjdk.org/jdk/pull/19456 From heidinga at openjdk.org Thu May 30 04:18:06 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Thu, 30 May 2024 04:18:06 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: On Wed, 29 May 2024 16:03:35 GMT, Ioi Lam wrote: > We could walk `_resolved_field_entries` to find the `ResolvedFieldEntry` whose `_cpool_index` is `123`. However, before the `ResolvedFieldEntry` is resolved, we don't know which bytecode is used to resolve it, so we don't know whether it's for a static field or non-static field. Since we want to filter out the static fields in the PR, we need to: > > * walk the bytecodes to find only getfield/putfield bytecodes > * these bytecodes will give us an index to the `_resolved_field_entries` array > * from there, we discover the original CP index > * then we see if this index is set to true in `preresolve_list` Something's been bothering me about this explanation and I think I've put my finger on it. As you show, the same CP entry can be referenced by both `getstatic` & `getfield` bytecodes though only one will successfully resolve. Walking the bytecodes doesn't actually tell us anything - the resolution status should be different for instance vs static fields which means we're should always be safe to attempt the resolution of fields as instance fields provided we ignore errors. > So we must call `InterpreterRuntime::resolve_get_put()` which performs all the checks for access rights, static-vs-non-static, etc. This call requires a Method parameter, so we must walk all the Methods to find an appropriate one. The Method parameter is necessary for puts to final fields - either `` for static finals or an `` method for instance finals. In either case, the we don't actually resolve the field for puts so it doesn't matter if we pass the "correct" method or not during pre resolution as it will never successfully complete. I think we'd be OK to send any method we want to that call when doing preresolution provided we ignore the errors ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1619844681 From magnus.ihse.bursie at oracle.com Thu May 30 13:03:14 2024 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Thu, 30 May 2024 15:03:14 +0200 Subject: Hermetic Java project meeting In-Reply-To: References: <65fdda77-1291-437e-b000-ca0307cf8084@oracle.com> <779749fa-8427-4b48-b897-5210b36d5be8@oracle.com> <6090f2aa-1480-4706-9281-035579a933af@oracle.com> Message-ID: On 2024-05-21 20:51, Jiangli Zhou wrote: > Magnus will send out his changes as PR draft for initial review for > deciding on how to move forward with the non-makefile changes. This is now published in https://github.com/openjdk/jdk/pull/19478. /Magnus From ihse at openjdk.org Thu May 30 15:07:25 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 30 May 2024 15:07:25 GMT Subject: RFR: 8333282: Better warning if newly build JDK fails to run Message-ID: If the newly built JDK fails to run ("DOA"), we will get a strange error message about jdk.compiler-gendata errors from make. The reason is not at all obvious. Instead, we should make a simple check that we can actually use the new JDK before starting to use it for the first time, and report clearly to the user if this is not the case. ------------- Commit messages: - 8333282: Better warning if newly build JDK fails to run Changes: https://git.openjdk.org/jdk/pull/19484/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19484&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333282 Stats: 72 lines in 2 files changed: 66 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/19484.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19484/head:pull/19484 PR: https://git.openjdk.org/jdk/pull/19484 From erikj at openjdk.org Thu May 30 16:28:02 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 May 2024 16:28:02 GMT Subject: RFR: 8333282: Better warning if newly build JDK fails to run In-Reply-To: References: Message-ID: On Thu, 30 May 2024 15:02:38 GMT, Magnus Ihse Bursie wrote: > If the newly built JDK fails to run ("DOA"), we will get a strange error message about jdk.compiler-gendata errors from make. The reason is not at all obvious. > > Instead, we should make a simple check that we can actually use the new JDK before starting to use it for the first time, and report clearly to the user if this is not the case. This doesn't look right to me. Why is the verification checking `javac` specifically? I would have thought checking `java` would be the natural launcher of choice. We use the buildjdk for multiple things, and the jdk.compiler/javadoc gendata targets aren't guaranteed to be the first ones to run. There is generate-link-opt-data, buildtools-modules as well as any jmod target. Looking deeper into this, it seems we introduced the target `runnable-buildjdk` at some point, but forgot to update a bunch of other places to just use this target so we have this pattern of checking CREATE_BUILDJDK and CREATING_BUILDJDK repeated for multiple different targets which should probably just be using `runnable-buildjdk` as prereq. The `runnable-buildjdk` target would also be the right place to inject this verification, but for that to work, we need to fix all the other targets that should be depending on it. ------------- PR Review: https://git.openjdk.org/jdk/pull/19484#pullrequestreview-2088797438 From darcy at openjdk.org Thu May 30 16:44:21 2024 From: darcy at openjdk.org (Joe Darcy) Date: Thu, 30 May 2024 16:44:21 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v9] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Update symbol files for JDK 23 build 25. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18787/files - new: https://git.openjdk.org/jdk/pull/18787/files/45e1c040..0d15aaf4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=07-08 Stats: 341 lines in 4 files changed: 340 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From ihse at openjdk.org Thu May 30 16:45:04 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 30 May 2024 16:45:04 GMT Subject: RFR: 8333282: Better warning if newly build JDK fails to run In-Reply-To: References: Message-ID: <-fBV7iLyKNr3NwRpBKYuPKtqNUvcX95Cyto-8wOTi_o=.d621bf41-d063-42b0-875d-d19f13fa61ad@github.com> On Thu, 30 May 2024 15:02:38 GMT, Magnus Ihse Bursie wrote: > If the newly built JDK fails to run ("DOA"), we will get a strange error message about jdk.compiler-gendata errors from make. The reason is not at all obvious. > > Instead, we should make a simple check that we can actually use the new JDK before starting to use it for the first time, and report clearly to the user if this is not the case. I had completely missed the `runnable-buildjdk` target. Yes, that was basically what I was trying to re-create. It might be a race condition, but this particular place was always where I have hit problems first if there is an issue with the newly built JDK. It used to be `generate-link-opt-data`, but my guess is that this is further down the dependency chain now, since the symbol changes to use the current JDK. I agree with your general analysis though. We should add the test to `runnable-buildjdk` (that's the easy part), and make sure we use it everywhere that we should (there I might need some help to look if I miss some places). ------------- PR Comment: https://git.openjdk.org/jdk/pull/19484#issuecomment-2140213983 From darcy at openjdk.org Thu May 30 17:11:31 2024 From: darcy at openjdk.org (Joe Darcy) Date: Thu, 30 May 2024 17:11:31 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v10] In-Reply-To: References: Message-ID: > Get JDK 24 underway. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits: - Merge branch 'master' into JDK-8330188 - Update symbol files for JDK 23 build 25. - Correct release year. - Merge branch 'master' into JDK-8330188 - Add symbol files current with JDK 23 build 24. - Merge branch 'master' into JDK-8330188 - Merge branch 'master' into JDK-8330188 - Fix-up test. - Merge branch 'master' into JDK-8330188 - Adjust test for deprecated options. - ... and 8 more: https://git.openjdk.org/jdk/compare/32636dcc...39a028c3 ------------- Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=09 Stats: 2082 lines in 50 files changed: 2019 ins; 7 del; 56 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From iris at openjdk.org Thu May 30 17:49:04 2024 From: iris at openjdk.org (Iris Clark) Date: Thu, 30 May 2024 17:49:04 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v10] In-Reply-To: References: Message-ID: On Thu, 30 May 2024 17:11:31 GMT, Joe Darcy wrote: >> Get JDK 24 underway. > > Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits: > > - Merge branch 'master' into JDK-8330188 > - Update symbol files for JDK 23 build 25. > - Correct release year. > - Merge branch 'master' into JDK-8330188 > - Add symbol files current with JDK 23 build 24. > - Merge branch 'master' into JDK-8330188 > - Merge branch 'master' into JDK-8330188 > - Fix-up test. > - Merge branch 'master' into JDK-8330188 > - Adjust test for deprecated options. > - ... and 8 more: https://git.openjdk.org/jdk/compare/32636dcc...39a028c3 Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/18787#pullrequestreview-2089018766 From liach at openjdk.org Thu May 30 18:42:06 2024 From: liach at openjdk.org (Chen Liang) Date: Thu, 30 May 2024 18:42:06 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v9] In-Reply-To: References: Message-ID: <_kfO09TJdTBjXUELlNSPOSGVckqS7Y9zQGFJa7mxhms=.c13df261-10fb-40da-969a-530a8a7ce1dc@github.com> On Thu, 30 May 2024 16:44:21 GMT, Joe Darcy wrote: >> Get JDK 24 underway. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Update symbol files for JDK 23 build 25. src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-N.sym.txt line 1: > 1: # Just curious, does CreateSymbols not track module migrations, now that jdk.incubator.foreign is completely merged into java.base? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18787#discussion_r1621274290 From jlahoda at openjdk.org Thu May 30 19:13:05 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 30 May 2024 19:13:05 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v9] In-Reply-To: <_kfO09TJdTBjXUELlNSPOSGVckqS7Y9zQGFJa7mxhms=.c13df261-10fb-40da-969a-530a8a7ce1dc@github.com> References: <_kfO09TJdTBjXUELlNSPOSGVckqS7Y9zQGFJa7mxhms=.c13df261-10fb-40da-969a-530a8a7ce1dc@github.com> Message-ID: On Thu, 30 May 2024 18:39:19 GMT, Chen Liang wrote: >> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: >> >> Update symbol files for JDK 23 build 25. > > src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-N.sym.txt line 1: > >> 1: # > > Just curious, does CreateSymbols not track module migrations, now that jdk.incubator.foreign is completely merged into java.base? When writing these symbol files, CreateSymbols does not keep track where a given package was in a given version, and puts packages to files based on the first version where the package was first introduced. Technically, it should not matter, as the assignment of classes/packages to modules is not based on the file from which the description of the class was read. So, so far, it didn't seem necessary to keep track of package movement for writing of these files. But it is feasible to do so, if the need arises. (When writing ct.sym, it keeps track of the exact package module for every version, of course.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18787#discussion_r1621320340 From ihse at openjdk.org Thu May 30 19:20:24 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 30 May 2024 19:20:24 GMT Subject: RFR: 8333301: Remove static builds using --enable-static-build Message-ID: The original way of building static libraries in the JDK was to use the configure argument --enable-static-build, which set the value of the make variable STATIC_BUILD. (Note that this is not the same as the source code definition STATIC_BUILD, which will be set by other means as well.) This method only ever worked on macOS, and has long since stopped working. It was originally introduced for the Mobile Project, but I've now learn that not even they use it anymore. It just adds clutter to the build system, and should be removed. ------------- Commit messages: - 8333301: Remove static builds using --enable-static-build Changes: https://git.openjdk.org/jdk/pull/19487/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19487&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333301 Stats: 218 lines in 14 files changed: 4 ins; 206 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/19487.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19487/head:pull/19487 PR: https://git.openjdk.org/jdk/pull/19487 From darcy at openjdk.org Thu May 30 20:39:34 2024 From: darcy at openjdk.org (Joe Darcy) Date: Thu, 30 May 2024 20:39:34 GMT Subject: RFR: 8330182: Start of release updates for JDK 24 [v11] In-Reply-To: References: Message-ID: <9w0ZJ6HUb9FK1G3UPRCWic-VHDD-vcCE4Bu5dKmPWI0=.c8bad1d1-9c37-490b-a6d0-f1fa95521906@github.com> > Get JDK 24 underway. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Temporarily problem list java.lang.instrument tests until jar generation is fixed. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18787/files - new: https://git.openjdk.org/jdk/pull/18787/files/39a028c3..6a6499dd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=09-10 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18787/head:pull/18787 PR: https://git.openjdk.org/jdk/pull/18787 From iklam at openjdk.org Fri May 31 00:25:02 2024 From: iklam at openjdk.org (Ioi Lam) Date: Fri, 31 May 2024 00:25:02 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> Message-ID: <2cV0qix4YBr6H58RLaKdtiRmmiQ222IFHGH8kw-bWCY=.278bc880-4b3e-481c-90df-dd45a94f7822@github.com> On Thu, 30 May 2024 04:15:24 GMT, Dan Heidinga wrote: >> `preresolve_list` has the original CP indices (E.g., `putfield #123` as stored in the classfile), but in HotSpot, after bytecode rewriting, the u2 following the bytecode is changed to an index into the `cpcache()->_resolved_field_entries` array, so it becomes something like `putfield #45`. So we need to know how to convert the `123` index to the `45` index. >> >> We could walk `_resolved_field_entries` to find the `ResolvedFieldEntry` whose `_cpool_index` is `123`. However, before the `ResolvedFieldEntry` is resolved, we don't know which bytecode is used to resolve it, so we don't know whether it's for a static field or non-static field. Since we want to filter out the static fields in the PR, we need to: >> >> - walk the bytecodes to find only getfield/putfield bytecodes >> - these bytecodes will give us an index to the `_resolved_field_entries` array >> - from there, we discover the original CP index >> - then we see if this index is set to true in `preresolve_list` >> >> There's also a compatibility issue -- it's possible to have static and non-static field access using the same CP index: >> >> >> class Hack { >> static int myField; >> int foo(boolean flag) { >> try { >> if (flag) { >> // throw IncompatibleClassChangeError >> return /* pseudo code*/ getfield this.myField; >> } else { >> // OK >> return /* pseudo code*/ getstatic Hack.myField; >> } >> } catch (Throwable) { >> return 5678; >> } >> } >> >> >> So we must call `InterpreterRuntime::resolve_get_put()` which performs all the checks for access rights, static-vs-non-static, etc. This call requires a Method parameter, so we must walk all the Methods to find an appropriate one. >> >> Perhaps it's possible to refactor the `InterpreterRuntime` code to avoid passing in a Method, but I am hesitant to do that with code that deals with access right checks. > >> We could walk `_resolved_field_entries` to find the `ResolvedFieldEntry` whose `_cpool_index` is `123`. However, before the `ResolvedFieldEntry` is resolved, we don't know which bytecode is used to resolve it, so we don't know whether it's for a static field or non-static field. Since we want to filter out the static fields in the PR, we need to: >> >> * walk the bytecodes to find only getfield/putfield bytecodes >> * these bytecodes will give us an index to the `_resolved_field_entries` array >> * from there, we discover the original CP index >> * then we see if this index is set to true in `preresolve_list` > > Something's been bothering me about this explanation and I think I've put my finger on it. As you show, the same CP entry can be referenced by both `getstatic` & `getfield` bytecodes though only one will successfully resolve. Walking the bytecodes doesn't actually tell us anything - the resolution status should be different for instance vs static fields which means we're should always be safe to attempt the resolution of fields as instance fields provided we ignore errors. > >> So we must call `InterpreterRuntime::resolve_get_put()` which performs all the checks for access rights, static-vs-non-static, etc. This call requires a Method parameter, so we must walk all the Methods to find an appropriate one. > > The Method parameter is necessary for puts to final fields - either `` for static finals or an `` method for instance finals. In either case, the we don't actually resolve the field for puts so it doesn't matter if we pass the "correct" method or not during pre resolution as it will never successfully complete. I think we'd be OK to send any method we want to that call when doing preresolution provided we ignore the errors If you look at the version in the Leyden repo, there are many different types of references that are handled in `ClassPrelinker::maybe_resolve_fmi_ref` https://github.com/openjdk/leyden/blob/4faa72029abb86b55cb33b00acf9f3a18ade4b77/src/hotspot/share/cds/classPrelinker.cpp#L307 My goal is to defer all the safety checks to `InterpreterRuntime::resolve_xxx` so that we don't need to think about what is safe to pre-resolve, and what is not. Some of the checks are very complex (see linkResolver.cpp as well) and may change as the language evolve. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1621541729 From heidinga at openjdk.org Fri May 31 12:24:08 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Fri, 31 May 2024 12:24:08 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: <2cV0qix4YBr6H58RLaKdtiRmmiQ222IFHGH8kw-bWCY=.278bc880-4b3e-481c-90df-dd45a94f7822@github.com> References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <2cV0qix4YBr6H58RLaKdtiRmmiQ222IFHGH8kw-bWCY=.278bc880-4b3e-481c-90df-dd45a94f7822@github.com> Message-ID: On Fri, 31 May 2024 00:22:37 GMT, Ioi Lam wrote: >>> We could walk `_resolved_field_entries` to find the `ResolvedFieldEntry` whose `_cpool_index` is `123`. However, before the `ResolvedFieldEntry` is resolved, we don't know which bytecode is used to resolve it, so we don't know whether it's for a static field or non-static field. Since we want to filter out the static fields in the PR, we need to: >>> >>> * walk the bytecodes to find only getfield/putfield bytecodes >>> * these bytecodes will give us an index to the `_resolved_field_entries` array >>> * from there, we discover the original CP index >>> * then we see if this index is set to true in `preresolve_list` >> >> Something's been bothering me about this explanation and I think I've put my finger on it. As you show, the same CP entry can be referenced by both `getstatic` & `getfield` bytecodes though only one will successfully resolve. Walking the bytecodes doesn't actually tell us anything - the resolution status should be different for instance vs static fields which means we're should always be safe to attempt the resolution of fields as instance fields provided we ignore errors. >> >>> So we must call `InterpreterRuntime::resolve_get_put()` which performs all the checks for access rights, static-vs-non-static, etc. This call requires a Method parameter, so we must walk all the Methods to find an appropriate one. >> >> The Method parameter is necessary for puts to final fields - either `` for static finals or an `` method for instance finals. In either case, the we don't actually resolve the field for puts so it doesn't matter if we pass the "correct" method or not during pre resolution as it will never successfully complete. I think we'd be OK to send any method we want to that call when doing preresolution provided we ignore the errors > > If you look at the version in the Leyden repo, there are many different types of references that are handled in `ClassPrelinker::maybe_resolve_fmi_ref` > > https://github.com/openjdk/leyden/blob/4faa72029abb86b55cb33b00acf9f3a18ade4b77/src/hotspot/share/cds/classPrelinker.cpp#L307 > > My goal is to defer all the safety checks to `InterpreterRuntime::resolve_xxx` so that we don't need to think about what is safe to pre-resolve, and what is not. Some of the checks are very complex (see linkResolver.cpp as well) and may change as the language evolve. The current algorithm says: for each bytecode in each method: switch(bytecode) { case getfield: case outfield: InterpreterRuntime::resolve_get_put(bc, raw_index, mh, cp, false /*initialize_holder*/, CHECK); break; .... } What I'm proposing is: for each ResolvedFieldEntry bool success = InterpreterRuntime::resolve_get_put(getfield, raw_index, nullptr /* mh */, cp, false /*initialize_holder*/, CHECK); if (success) { // also resolve for put InterpreterRuntime::resolve_get_put(putfield, raw_index, nullptr /* mh */, cp, false /*initialize_holder*/, CHECK); } The method is not critical as the current algorithm attempts resolution with multiple methods. The resolution logic already has to handle this for normal execution and "knows" not to resolve entries (like puts of field fields) regardless of the method as they need to do additional runtime checks. The same will apply to invoke bytecodes later.... it feels safer to do only what the bytecodes in some method have asked for but the runtime already has to be robust against different kinds of gets/puts or invokes targeting the same cp entries. If you really want to only resolve the exact cases (ie: gets not puts, etc) that were resolved in the training run, then we need to write out as part of the classicist more explicitly what needs to be resolved: ie: @cp_resolved_gets 4, 7 8 @cp_resolved_puts 7 8 10 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1622343820 From sgehwolf at openjdk.org Fri May 31 14:33:02 2024 From: sgehwolf at openjdk.org (Severin Gehwolf) Date: Fri, 31 May 2024 14:33:02 GMT Subject: RFR: 8333301: Remove static builds using --enable-static-build In-Reply-To: References: Message-ID: <9T-m8cUCdsKn69wAgHPCIGi-oZ6bF-197kVuORzxdCs=.2929771f-6805-422f-b9b1-4191ee67bb9e@github.com> On Thu, 30 May 2024 19:14:43 GMT, Magnus Ihse Bursie wrote: > The original way of building static libraries in the JDK was to use the configure argument --enable-static-build, which set the value of the make variable STATIC_BUILD. (Note that this is not the same as the source code definition STATIC_BUILD, which will be set by other means as well.) > > This method only ever worked on macOS, and has long since stopped working. It was originally introduced for the Mobile Project, but I've now learn that not even they use it anymore. > > It just adds clutter to the build system, and should be removed. Looks OK to me. ------------- Marked as reviewed by sgehwolf (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19487#pullrequestreview-2091001402 From erikj at openjdk.org Fri May 31 17:04:00 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 31 May 2024 17:04:00 GMT Subject: RFR: 8333301: Remove static builds using --enable-static-build In-Reply-To: References: Message-ID: On Thu, 30 May 2024 19:14:43 GMT, Magnus Ihse Bursie wrote: > The original way of building static libraries in the JDK was to use the configure argument --enable-static-build, which set the value of the make variable STATIC_BUILD. (Note that this is not the same as the source code definition STATIC_BUILD, which will be set by other means as well.) > > This method only ever worked on macOS, and has long since stopped working. It was originally introduced for the Mobile Project, but I've now learn that not even they use it anymore. > > It just adds clutter to the build system, and should be removed. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19487#pullrequestreview-2091321250 From iklam at openjdk.org Fri May 31 18:46:04 2024 From: iklam at openjdk.org (Ioi Lam) Date: Fri, 31 May 2024 18:46:04 GMT Subject: RFR: 8293980: Resolve CONSTANT_FieldRef at CDS dump time [v3] In-Reply-To: References: <6tYcoQdH8mEhbBRUoAcOi3Gue7Lz9qIjJh3GpcLKGGE=.0b286773-cc03-434e-88ca-2c9cc5efce67@github.com> <2cV0qix4YBr6H58RLaKdtiRmmiQ222IFHGH8kw-bWCY=.278bc880-4b3e-481c-90df-dd45a94f7822@github.com> Message-ID: On Fri, 31 May 2024 12:21:09 GMT, Dan Heidinga wrote: >> If you look at the version in the Leyden repo, there are many different types of references that are handled in `ClassPrelinker::maybe_resolve_fmi_ref` >> >> https://github.com/openjdk/leyden/blob/4faa72029abb86b55cb33b00acf9f3a18ade4b77/src/hotspot/share/cds/classPrelinker.cpp#L307 >> >> My goal is to defer all the safety checks to `InterpreterRuntime::resolve_xxx` so that we don't need to think about what is safe to pre-resolve, and what is not. Some of the checks are very complex (see linkResolver.cpp as well) and may change as the language evolve. > > The current algorithm says: > > for each bytecode in each method: > switch(bytecode) { > case getfield: > case outfield: > InterpreterRuntime::resolve_get_put(bc, raw_index, mh, cp, false /*initialize_holder*/, CHECK); > break; > .... > } > > What I'm proposing is: > > for each ResolvedFieldEntry > bool success = InterpreterRuntime::resolve_get_put(getfield, raw_index, nullptr /* mh */, cp, false /*initialize_holder*/, CHECK); > if (success) { > // also resolve for put > InterpreterRuntime::resolve_get_put(putfield, raw_index, nullptr /* mh */, cp, false /*initialize_holder*/, CHECK); > } > > > The `method` parameter is not critical as the "current" algorithm attempts resolution with multiple methods - once for each method that references the ResolvedFieldEntry. The resolution logic already has to handle dealing with different rules for different types of methods (ie `` & ``) for normal execution and "knows" not to resolve entries (like puts of field fields) regardless of the method as they need to do additional runtime checks on every access. > > The same will apply to invoke bytecodes later.... it feels safer to do only what the bytecodes in some method have asked for but the runtime already has to be robust against different kinds of gets/puts or invokes targeting the same cp entries. By eagerly resolving we're not giving up any safety. > > If you really want to only resolve the exact cases (ie: gets not puts, etc) that were resolved in the training run, then we need to write out as part of the classlist more explicitly what needs to be resolved: > ie: > > @cp_resolved_gets 4, 7 8 > @cp_resolved_puts 7 8 10 This makes sense. I will try to prototype it in the Leyden repo and then update this PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19355#discussion_r1622828712