Re: RFR: 8286176: Add JNI_VERSION_19 to jni.h and JNI spec

2022-06-14 Thread David Holmes
On Sat, 11 Jun 2022 15:42:34 GMT, Alan Bateman wrote: > JNI is updated in Java 19 so we need to define JNI_VERSION_19 and change > GetVersion to return this version. > > test/hotspot/jtreg/native_sanity/JniVersion.java is updated to check that > JNI_VERSION_19 is returned. The native library

Re: RFR: 8288378: [BACKOUT] DST not applying properly with zone id offset set with TZ env variable

2022-06-13 Thread David Holmes
On Tue, 14 Jun 2022 00:56:47 GMT, Naoto Sato wrote: > Backing out a fix that is causing a T1 failure. > > This reverts commit 9b6d0a7e94fd18d302c559bec6f785d71a919a88. Backout looks accurate - thanks. - Marked as reviewed by dholmes (Reviewer). PR:

Integrated: 8279047: Remove expired flags in JDK 20

2022-06-10 Thread David Holmes
On Fri, 10 Jun 2022 13:23:51 GMT, David Holmes wrote: > Expired Flags in 20: > > - FilterSpuriousWakeups > - MinInliningThreshold > - PrefetchFieldsAhead > > No remaining usages in code or tests. > > - UseHeavyMonitors (expired in PRODUCT ONLY) > > As th

Re: RFR: 8279047: Remove expired flags in JDK 20

2022-06-10 Thread David Holmes
On Sat, 11 Jun 2022 05:48:14 GMT, Alan Bateman wrote: >> Expired Flags in 20: >> >> - FilterSpuriousWakeups >> - MinInliningThreshold >> - PrefetchFieldsAhead >> >> No remaining usages in code or tests. >> >> - UseHeavyMonitors (expired in PRODUCT ONLY) >> >> As this flag now only exists

Re: RFR: 8279047: Remove expired flags in JDK 20

2022-06-10 Thread David Holmes
On Fri, 10 Jun 2022 15:57:40 GMT, Vladimir Kozlov wrote: >> Expired Flags in 20: >> >> - FilterSpuriousWakeups >> - MinInliningThreshold >> - PrefetchFieldsAhead >> >> No remaining usages in code or tests. >> >> - UseHeavyMonitors (expired in PRODUCT ONLY) >> >> As this flag now only exists

RFR: 8279047: Remove expired flags in JDK 20

2022-06-10 Thread David Holmes
Expired Flags in 20: - FilterSpuriousWakeups - MinInliningThreshold - PrefetchFieldsAhead No remaining usages in code or tests. - UseHeavyMonitors (expired in PRODUCT ONLY) As this flag now only exists for debug builds it has to be a "develop" flag rather than product. There are then changes

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v3]

2022-06-01 Thread David Holmes
On Wed, 1 Jun 2022 06:04:14 GMT, Alan Bateman wrote: >> This patch adds an alternative virtual thread implementation where each >> virtual thread is backed by an OS thread. It doesn't scale but it can be >> used by ports that don't have continuations support in the VM. Aside from >>

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v4]

2022-05-31 Thread David Holmes
On Wed, 1 Jun 2022 03:18:44 GMT, Joe Darcy wrote: >> Time to start getting ready for JDK 20... > > Joe Darcy 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

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2022-05-31 Thread David Holmes
On Tue, 31 May 2022 15:10:38 GMT, Adam Sotona wrote: >> This is continuation of PR #4256 >> >> The patch simply rounds up the specified stack size to multiple of the >> system page size, on systems where necessary. >> The patch is based on the original PR/branch, with reflected remaining >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2022-05-31 Thread David Holmes
On Tue, 31 May 2022 08:37:19 GMT, Adam Sotona wrote: > This is continuation of PR #4256 > > The patch simply rounds up the specified stack size to multiple of the system > page size, on systems where necessary. > The patch is based on the original PR/branch, with reflected remaining >

Re: Integrated: 8286562: GCC 12 reports some compiler warnings

2022-05-27 Thread David Holmes
The new assertion in src/hotspot/share/utilities/globalDefinitions.hpp inline const char* type2name(BasicType t) { assert((uint)t < T_CONFLICT + 1, "invalid type"); return type2name_tab[t]; } is failing with test compiler/jvmci/errors/TestInvalidDebugInfo.java I have filed:

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v2]

2022-05-27 Thread David Holmes
On Thu, 26 May 2022 23:05:32 GMT, Joe Darcy wrote: >> Time to start getting ready for JDK 20... > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Marked as reviewed by dholmes (Reviewer).

Re: RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread David Holmes
On Thu, 14 Apr 2022 05:09:14 GMT, Joe Darcy wrote: > Time to start getting ready for JDK 20... One comment below. I ignored the sym files. Everything else appears okay. Thanks. src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java line 312: > 310: int V18 = 0 << 16 |

Re: RFR: 8287137: Problemlist failing x86_32 tests after Loom integration [v3]

2022-05-24 Thread David Holmes
On Mon, 23 May 2022 18:25:23 GMT, Aleksey Shipilev wrote: >> [JDK-8284161](https://bugs.openjdk.java.net/browse/JDK-8284161) broke a lot >> of x86_32 code. The x86_32 porting is done under >> [JDK-8286642](https://bugs.openjdk.java.net/browse/JDK-8286642). Meanwhile, >> we can problemlist the

Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]

2022-05-18 Thread David Holmes
On Wed, 18 May 2022 07:40:43 GMT, Thomas Stuefe wrote: >> src/java.base/share/native/libjli/java.c line 1631: >> >>> 1629: const char *arg = jargv[i]; >>> 1630: if (arg[0] == '-' && arg[1] == 'J') { >>> 1631: assert(arg[2] != '\0' && "Invalid JAVA_ARGS or >>>

Re: RFR: 8286694: Incorrect argument processing in java launcher

2022-05-18 Thread David Holmes
On Tue, 17 May 2022 13:54:59 GMT, Yasumasa Suenaga wrote: >> You forced me to look at this in depth. The values are set via the build >> system. In the build system it is impossible to get just -J because the -J >> is only added as a prefix for an existing string. So basically this is >>

Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]

2022-05-18 Thread David Holmes
On Tue, 17 May 2022 13:55:43 GMT, Yasumasa Suenaga wrote: >> GCC 12 reports as following: > > Yasumasa Suenaga 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

Re: RFR: 8286694: Incorrect argument processing in java launcher

2022-05-16 Thread David Holmes
On Fri, 13 May 2022 08:56:59 GMT, Yasumasa Suenaga wrote: > GCC 12 reports as following: You forced me to look at this in depth. The values are set via the build system. In the build system it is impossible to get just -J because the -J is only added as a prefix for an existing string. So

Re: RFR: 8286694: Incorrect argument processing in java launcher

2022-05-16 Thread David Holmes
On Fri, 13 May 2022 08:56:59 GMT, Yasumasa Suenaga wrote: > GCC 12 reports as following: src/java.base/share/native/libjli/java.c line 1632: > 1630: if (JLI_IsTraceLauncher()) { > 1631: printf("Empty option: jargv[%d]\n", i); > 1632: } I'd

Re: RFR: 8286694: Incorrect argument processing in java launcher

2022-05-16 Thread David Holmes
On Fri, 13 May 2022 08:56:59 GMT, Yasumasa Suenaga wrote: > GCC 12 reports as following: I don't recall what "builtin arguments" means. Can you tell me how we would actually hit this conditions such that we string dup and the null string? Or are you saying this is actually an unreachable

Re: RFR: 8286744: failure_handler: dmesg command on macos fails to collect data due to permission issues [v2]

2022-05-16 Thread David Holmes
On Mon, 16 May 2022 07:54:09 GMT, Jaikiran Pai wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> copyright year > > Thank you Daniel and Lance for the reviews. > > Would anyone from the build team like to provide

Re: RFR: 8286694: Incorrect argument processing in java launcher

2022-05-16 Thread David Holmes
On Fri, 13 May 2022 08:56:59 GMT, Yasumasa Suenaga wrote: > GCC 12 reports as following: Simply considering the compiler warning shouldn't `(arg+2) == NULL` actually be `arg[2] = '\0'` ? as we are looking to see if this arg is only three characters: '-', 'J' and '\0' - PR:

Re: RFR: 8286368: Cleanup problem lists after loom integration [v2]

2022-05-15 Thread David Holmes
On Mon, 16 May 2022 02:25:26 GMT, Leonid Mesnik wrote: >> test/hotspot/jtreg/ProblemList-Xcomp.txt line 38: >> >>> 36: serviceability/sa/TestJhsdbJstackMixed.java 8248675 linux-aarch64 >>> 37: >>> 38: compiler/c2/irTests/TestSkeletonPredicates.java 8286361 generic-all >> >> @lmesnik This line

Re: RFR: 8286368: Cleanup problem lists after loom integration [v2]

2022-05-15 Thread David Holmes
On Tue, 10 May 2022 19:16:34 GMT, Leonid Mesnik wrote: >> 8286368: Cleanup problem lists after loom integration > > Leonid Mesnik has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains two commits: > > - Merge > - 8286368: Cleanup

Re: RFR: 8286681: ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold

2022-05-13 Thread David Holmes
On Fri, 13 May 2022 13:02:52 GMT, Jie Fu wrote: >> I assume you are running the tests with: >>make run-tests TEST_OPTS_JAVA_OPTIONS="-XX:+UseShenandoahGC" >> in which case, all of the tests you select to run will be run with that GC. >> >> What you have is not wrong but wouldn't be a

Re: RFR: 8283689: Update the foreign linker VM implementation [v10]

2022-05-12 Thread David Holmes
On Thu, 12 May 2022 08:23:11 GMT, Nick Gasson wrote: >> src/hotspot/cpu/aarch64/foreign_globals_aarch64.cpp line 3: >> >>> 1: /* >>> 2: * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights >>> reserved. >>> 3: * Copyright (c) 2019, 2021, Arm Limited. All rights reserved. >>

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings [v4]

2022-05-11 Thread David Holmes
On Wed, 11 May 2022 16:00:32 GMT, Maxim Kartashev wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> adjust API level to Windows 8 for security.cpp and do some cleanup > > This change seem to have made this

Re: RFR: 8286560: Remove user parameter from jdk.internal.perf.Perf.attach()

2022-05-11 Thread David Holmes
On Wed, 11 May 2022 23:08:32 GMT, Ioi Lam wrote: > The API `jdk.internal.perf.Perf.::attach(String user, int lvmid)` is never > used. It should be removed, and all the handling of a specified user name > should be removed. Nice cleanup! I checked back in JDK 7 and couldn't find any use of

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread David Holmes
On Wed, 11 May 2022 20:27:42 GMT, Patricio Chilano Mateo wrote: >> I went ahead and implemented this suggestion. Now we block async exceptions >> in on_entry, and unblock in on_exit. > > Is it possible for these upcalls to be nested? If yes, we could add a boolean > to context to avoid

Re: RFR: 8283689: Update the foreign linker VM implementation [v10]

2022-05-11 Thread David Holmes
On Wed, 11 May 2022 17:51:31 GMT, Jorn Vernee wrote: >> Hi, >> >> This PR updates the VM implementation of the foreign linker, by bringing >> over commits from the panama-foreign repo. >> >> This is split off from the main JEP integration for 19, since we have >> limited resources to handle

Re: RFR: 8284550: test failure_handler is not properly invoking jhsdb jstack, resulting in failure to produce a stack when a test times out

2022-05-08 Thread David Holmes
On Sun, 8 May 2022 21:57:20 GMT, Leonid Mesnik wrote: > …resulting in failure to produce a stack when a test times out Looks good. Thanks, David - Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8588

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings [v4]

2022-05-06 Thread David Holmes
On Wed, 4 May 2022 08:00:08 GMT, Matthias Baesken wrote: >> Currently we set _WIN32_WINNT at various places in the codebase; this is >> used to target a minimum Windows version we want to support. See also for >> more detailled information : >>

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings [v4]

2022-05-04 Thread David Holmes
On Wed, 4 May 2022 08:00:08 GMT, Matthias Baesken wrote: >> Currently we set _WIN32_WINNT at various places in the codebase; this is >> used to target a minimum Windows version we want to support. See also for >> more detailled information : >>

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings [v3]

2022-05-03 Thread David Holmes
On Tue, 3 May 2022 07:10:58 GMT, Matthias Baesken wrote: >> Currently we set _WIN32_WINNT at various places in the codebase; this is >> used to target a minimum Windows version we want to support. See also for >> more detailled information : >>

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings

2022-04-28 Thread David Holmes
On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used > to target a minimum Windows version we want to support. See also for more > detailled information : >

Re: Improve `finally` block exception handling

2022-04-28 Thread David Holmes
On 21/04/2022 7:30 am, some-java-user-99206970363698485...@vodafonemail.de wrote: Thanks a lot for your feedback! My original message was a bit vague in parts, sorry for that. The proposal consists of the following: 1. Forbidding usage of `break`, `continue`, `yield` and `return` in `finally`

Re: RFR: JDK-8285730: unify _WIN32_WINNT settings

2022-04-27 Thread David Holmes
On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used > to target a minimum Windows version we want to support. See also for more > detailled information : >

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0 [v3]

2022-04-25 Thread David Holmes
On Mon, 25 Apr 2022 14:26:17 GMT, Harold Seigel wrote: >> Please review this small fix for JDK-8284642. The fix was tested by running >> Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux >> x64. Additionally, the modified test and the test in the bug report were >>

Re: RFR: 8285366: Fix typos in serviceability

2022-04-23 Thread David Holmes
On Thu, 21 Apr 2022 18:08:05 GMT, Kevin Walls wrote: >> But on the other hand we have `javax.script.Invocable`. :-) >> >> Codespell suggested this change, and I based my decision to keep it based on >> [Merriam-Webster](https://www.merriam-webster.com/dictionary/invocable) not >> even

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]

2022-04-22 Thread David Holmes
On Fri, 22 Apr 2022 18:10:27 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/lang/System.java line 780: >> >>> 778: * The property may be set on the command line to the value >>> 779: * {@code UTF-8}. Setting the property to a value other than >>> {@code UTF-8} >>>

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]

2022-04-22 Thread David Holmes
On Fri, 22 Apr 2022 18:14:18 GMT, Naoto Sato wrote: >> Promoting the internal system properties for `System.out` and `System.err` >> so that users can override the encoding used for those streams to `UTF-8`, >> aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. > > Naoto

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0 [v2]

2022-04-22 Thread David Holmes
On Fri, 22 Apr 2022 18:14:27 GMT, Harold Seigel wrote: >> Please review this small fix for JDK-8284642. The fix was tested by running >> Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux >> x64. Additionally, the modified test and the test in the bug report were >>

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0

2022-04-21 Thread David Holmes
On Wed, 13 Apr 2022 12:24:46 GMT, Harold Seigel wrote: > Please review this small fix for JDK-8284642. The fix was tested by running > Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux > x64. Additionally, the modified test and the test in the bug report were run >

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0

2022-04-18 Thread David Holmes
On Wed, 13 Apr 2022 12:24:46 GMT, Harold Seigel wrote: > Please review this small fix for JDK-8284642. The fix was tested by running > Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux > x64. Additionally, the modified test and the test in the bug report were run >

Re: Improve `finally` block exception handling

2022-04-17 Thread David Holmes
Hello, On 18/04/2022 5:43 am, some-java-user-99206970363698485...@vodafonemail.de wrote: Hello, are there any plans to improve exception handling in combination with `finally` blocks? I'm not aware of anything, nor what that anything could realistically be. You make only one suggestion

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0

2022-04-16 Thread David Holmes
On Wed, 13 Apr 2022 12:24:46 GMT, Harold Seigel wrote: > Please review this small fix for JDK-8284642. The fix was tested by running > Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux > x64. Additionally, the modified test and the test in the bug report were run >

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v3]

2022-04-11 Thread David Holmes
On Mon, 11 Apr 2022 10:13:40 GMT, Claes Redestad wrote: > checkExactAccessMode -> checkAccessModeThenIsDirect Don't you still want "Exact" in there? That "access" check seems odd anyway as it only checks for one form of mismatch - should it not also check for `!exact &&

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v24]

2022-04-11 Thread David Holmes
On Mon, 11 Apr 2022 12:04:41 GMT, Maurizio Cimadamore wrote: >> src/hotspot/share/prims/scopedMemoryAccess.cpp line 141: >> >>> 139: >>> 140: /* >>> 141: * This function performs a thread-local handshake against all threads >>> running at the time >> >> Nit: thread-local?? > > I was

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-04-11 Thread David Holmes
On Mon, 11 Apr 2022 14:55:32 GMT, Thomas Schatzl wrote: >> Hi all, >> >> can I have reviews for this change that adds dedicated filler objects to >> the VM? >> >> Currently, when formatting areas of dead objects all gcs use instances of >> j.l.Object and int-arrays. >> >> This has the

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v24]

2022-04-11 Thread David Holmes
On Mon, 4 Apr 2022 14:57:30 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-424 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-10 Thread David Holmes
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v13]

2022-04-10 Thread David Holmes
On Fri, 8 Apr 2022 22:17:23 GMT, Srinivas Vamsi Parasa wrote: >> Optimizes the divideUnsigned() and remainderUnsigned() methods in >> java.lang.Integer and java.lang.Long classes using x86 intrinsics. This >> change shows 3x improvement for Integer methods and upto 25% improvement for >>

Re: [External] : Re: jpackage Windows support for 4 digits version

2022-03-25 Thread David Holmes
On 25/03/2022 5:14 am, Alexey Semenyuk wrote: Hi Sverre, Oh, I misunderstood the problem. I though the issue was with parsing WiX version string, but the problem is that jpackage doesn't like the value of --version cli parameter. On windows this value should satisfy constrains of MSI

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-24 Thread David Holmes
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap src/java.base/share/classes/java/util/Collections.java line 5836: > 5834: * @param the type of keys maintained by this map > 5835: * @param the type of mapped

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-24 Thread David Holmes
On Thu, 24 Mar 2022 07:01:43 GMT, XenoAmess wrote: >> src/java.base/share/classes/java/util/Collections.java line 5822: >> >>> 5820: * @param the type of keys maintained by this map >>> 5821: * @param the type of mapped values >>> 5822: * @return initial

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread David Holmes
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap src/java.base/share/classes/java/util/Collections.java line 5822: > 5820: * @param the type of keys maintained by this map > 5821: * @param the type of mapped

Re: RFR: JDK-8283416: Update java.lang.invoke.MethodHandle to use sealed classes

2022-03-22 Thread David Holmes
On 22/03/2022 4:56 pm, Rémi Forax wrote: On Tue, 22 Mar 2022 04:38:15 GMT, ExE Boss wrote: javac should be changed to allow fully qualified access to private inner classes in the permits clause of an enclosing class. This is not how private works, private means accessible between the '{'

Re: RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v2]

2022-03-22 Thread David Holmes
On Tue, 22 Mar 2022 12:08:01 GMT, Fei Yang wrote: >> make/autoconf/libraries.m4 line 152: >> >>> 150: fi >>> 151: >>> 152: # Programs which use C11 or C++11 atomics, like #include , >> >> Use of C++ atomics is not allowed in hotspot code base. See the style guide: >>

Re: RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v3]

2022-03-22 Thread David Holmes
On Tue, 22 Mar 2022 11:50:13 GMT, Fei Yang wrote: >> This PR implements JEP 422: Linux/RISC-V Port [1]. >> The PR starts as a squashed merge of the >> https://openjdk.java.net/projects/riscv-port branch. >> >> This has been tested with jtreg tier{1,2,3,4} and jcstress on HiFive >> Unmatched

Re: RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v2]

2022-03-21 Thread David Holmes
On Tue, 22 Mar 2022 03:31:16 GMT, Fei Yang wrote: >> This PR implements JEP 422: Linux/RISC-V Port [1]. >> The PR starts as a squashed merge of the >> https://openjdk.java.net/projects/riscv-port branch. >> >> This has been tested with jtreg tier{1,2,3,4} and jcstress on HiFive >> Unmatched

Re: RFR: 8283426: Fix 'exeption' typo

2022-03-20 Thread David Holmes
On Sun, 20 Mar 2022 13:30:01 GMT, Andrey Turbanov wrote: > Fix repeated typo `exeption` Looks good. Thanks for cleaning this up. - Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7879

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread David Holmes
On Fri, 18 Mar 2022 02:39:23 GMT, Mikael Vidstedt wrote: >> Note: this PR replaces the one I messed up earlier. >> >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5:

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread David Holmes
way? Best Regards Cheng -Original Message- From: core-libs-dev On Behalf Of David Holmes Sent: March 17, 2022 7:46 PM To: Raffaello Giulietti ; core-libs-dev@openjdk.java.net Subject: [EXTERNAL] Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v4]

2022-03-17 Thread David Holmes
On Thu, 17 Mar 2022 16:23:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread David Holmes
On Thu, 17 Mar 2022 20:56:34 GMT, Mikael Vidstedt wrote: > Note: this PR replaces the one I messed up earlier. > > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error:

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread David Holmes
Run with -Xlog:class+init=info to see the classes that get initialized and in what order. David On 18/03/2022 5:53 am, Raffaello Giulietti wrote: Hi again, here's code that shows that initialization doesn't happen during lookup but only upon invoking the method handle. (I'm on Java 17.)

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread David Holmes
On Wed, 16 Mar 2022 21:10:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread David Holmes
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: RFR: 8253495: CDS generates non-deterministic output

2022-03-10 Thread David Holmes
On 11/03/2022 4:50 pm, Thomas Stuefe wrote: On Fri, 11 Mar 2022 05:59:00 GMT, David Holmes wrote: Thanks for pointing this out. I ran more tests and found that on certain platforms, there are other structures that have problems with uninitialized gaps. I ended up changing `os::malloc

Re: RFR: 8253495: CDS generates non-deterministic output

2022-03-10 Thread David Holmes
On 11/03/2022 4:40 pm, Ioi Lam wrote: On Fri, 11 Mar 2022 05:59:00 GMT, David Holmes wrote: I ended up changing `os::malloc()` to zero the buffer when running with -Xshare:dump. Hopefully one extra check of `if (DumpSharedSpaces)` doesn't matter too much for regular VM executions because

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread David Holmes
I can't find this comment in the PR so replying via email ... On 11/03/2022 9:24 am, Ioi Lam wrote: On Wed, 9 Mar 2022 07:47:19 GMT, Thomas Stuefe wrote: Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: Fixed zero build

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver

2022-03-10 Thread David Holmes
On Wed, 9 Mar 2022 22:52:41 GMT, Mandy Chung wrote: > A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be >

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread David Holmes
On Thu, 10 Mar 2022 19:41:03 GMT, Ioi Lam wrote: >> I think he already did. I'm quoting: >> >>> However, the CDS archive also contains a heap dump, which includes Java >>> HashMaps. If I allow those 3 Java threads to start, some HashMaps in the >>> module graph will have unstable ordering. I

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread David Holmes
On Thu, 10 Mar 2022 12:50:58 GMT, Magnus Ihse Bursie wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed zero build > > Well, previously we'd get different dumps on different runs. If that was an > issue, surely it

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-10 Thread David Holmes
On Thu, 10 Mar 2022 12:11:06 GMT, Magnus Ihse Bursie wrote: >> The "heap dump" aspect of this is not something I'm familiar with, but if >> the threads don't affect the list of classes dumped, they surely must affect >> what is in the heap dump otherwise their execution would not be an issue.

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver

2022-03-09 Thread David Holmes
On Wed, 9 Mar 2022 22:52:41 GMT, Mandy Chung wrote: > A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be >

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-09 Thread David Holmes
On Wed, 9 Mar 2022 05:10:44 GMT, Ioi Lam wrote: >> This patch makes the result of "java -Xshare:dump" deterministic: >> - Disabled new Java threads from launching. This is harmless. See comments >> in jvm.cpp >> - Fixed a problem in hashtable ordering in heapShared.cpp >> - BasicHashtableEntry

Re: RFR: 8253495: CDS generates non-deterministic output [v2]

2022-03-08 Thread David Holmes
On Wed, 9 Mar 2022 05:10:44 GMT, Ioi Lam wrote: >> This patch makes the result of "java -Xshare:dump" deterministic: >> - Disabled new Java threads from launching. This is harmless. See comments >> in jvm.cpp >> - Fixed a problem in hashtable ordering in heapShared.cpp >> - BasicHashtableEntry

Re: RFR: 8282628: Potential memory leak in sun.font.FontConfigManager.getFontConfig()

2022-03-08 Thread David Holmes
On Tue, 8 Mar 2022 09:18:01 GMT, Sergey Bylokhov wrote: >> Please review this small patch that fixes a potential memory leak that >> exception return fails to release allocated `cacheDirs` >> >> Test: >> >> - [x] jdk_desktop on Linux x86_64 > >

Re: RFR: 8282628: Potential memory leak in sun.font.FontConfigManager.getFontConfig()

2022-03-08 Thread David Holmes
On Tue, 8 Mar 2022 09:20:19 GMT, Sergey Bylokhov wrote: >> Please review this small patch that fixes a potential memory leak that >> exception return fails to release allocated `cacheDirs` >> >> Test: >> >> - [x] jdk_desktop on Linux x86_64 > >

Re: Wrong behavior of standard IO library when interacting with Samba (very serious)

2022-03-07 Thread David Holmes
On 7/03/2022 6:28 pm, Alan Bateman wrote: On 07/03/2022 05:33, Glavo wrote: I am a Java application developer. I noticed that when my program runs on Windows in a samba shared folder (mounted as a drive, or accessed via a UNC path), the Java standard IO library has some unusual behavior. Note

Re: RFR: 8282657: Code cleanup: removing double semicolons at the end of lines

2022-03-04 Thread David Holmes
On Fri, 28 Jan 2022 14:39:31 GMT, Matteo Baccan wrote: > Hi > > I have reviewed the code for removing double semicolons at the end of lines > > all the best > matteo I eyeballed the diff file and all seems okay. Thanks, David - Marked as reviewed by dholmes (Reviewer). PR:

Re: RFR: 8282628: Potential memory leak in sun.font.FontConfigManager.getFontConfig()

2022-03-04 Thread David Holmes
On Fri, 4 Mar 2022 21:54:57 GMT, Zhengyu Gu wrote: > The macros are used to hide the different syntax of c and c++ to avoid > polluting code here, it seems to be a common pattern in client code. That's to allow for general use by C or C++ source files. But you are only needing this in a C

Re: RFR: 8282628: Potential memory leak in sun.font.FontConfigManager.getFontConfig()

2022-03-04 Thread David Holmes
On Fri, 4 Mar 2022 13:25:12 GMT, Zhengyu Gu wrote: > Please review this small patch that fixes a potential memory leak that > exception return fails to release allocated `cacheDirs` > > Test: > > - [x] jdk_desktop on Linux x86_64 I would have just inlined JNU_CHECK_EXCEPTION and added the

Re: RFR: 8282608: RawNativeLibraryImpl can't be passed to NativeLibraries::findEntry0 [v2]

2022-03-03 Thread David Holmes
On Thu, 3 Mar 2022 23:29:31 GMT, Mandy Chung wrote: >> This fixes a bug in JDK-8282515 that `NativeLibraries::findEntry0` reads the >> handle from the given native library instance with the field ID for >> `NativeLibraryImpl::handle` which is wrong for `RawNativeLibraryImpl`. The >>

Re: PriorityQueue PR requiring review

2022-03-03 Thread David Holmes
in the PR (once properly setup) goes to the mailing list anyway. https://openjdk.java.net/contribute/ Cheers, David best regards, Julian Waters On Thu, Mar 3, 2022 at 8:57 PM David Holmes <mailto:david.hol...@oracle.com>> wrote: On 3/03/2022 10:47 pm, Julian Waters wrote:

Re: PriorityQueue PR requiring review

2022-03-03 Thread David Holmes
the proposed API addition on the mailing list first. I have a fairly good idea what the outcome of that discussion will be but ... :) Cheers, David best regards, Julian On Thu, Mar 3, 2022 at 8:45 PM David Holmes <mailto:david.hol...@oracle.com>> wrote: Hi Julian, On 3/03/2022

Re: PriorityQueue PR requiring review

2022-03-03 Thread David Holmes
Sorry Julian, I see now you were the person aiding the person who created the PR. David On 3/03/2022 10:45 pm, David Holmes wrote: Hi Julian, On 3/03/2022 10:33 pm, Jules W. wrote: Hi all, A new PR that adds methods to PriorityQueue was created some time ago at https://github.com/openjdk

Re: PriorityQueue PR requiring review

2022-03-03 Thread David Holmes
Hi Julian, On 3/03/2022 10:33 pm, Jules W. wrote: Hi all, A new PR that adds methods to PriorityQueue was created some time ago at https://github.com/openjdk/jdk/pull/6938 but has no corresponding issue. As I'm not too familiar with this part of the JDK I'm querying this mailing list for

Re: Future.isCancelled and thread interruption

2022-02-28 Thread David Holmes
Hi, On 1/03/2022 4:17 am, Pushkar N Kulkarni wrote: "Future.cancel(true)" cancels the receiver Future and also attempts to interrupt the executor thread that is running this task. However, not all threads may be interrupted. An exception are threads that executing one of the "restart-able

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
ying on the behavior of implicitly killing all threads and not have another cleanup mechanism On Sun, Feb 27, 2022, 5:16 PM David Holmes <mailto:david.hol...@oracle.com>> wrote: On 28/02/2022 3:20 am, Ethan McCue wrote: > I think continuations could work for the sin

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
On 28/02/2022 3:20 am, Ethan McCue wrote: I think continuations could work for the single threaded case, depending on their behavior with "finally" blocks. I'm sure there are more caveats once we add another thread to the mix though. System.exit is a nuclear Thread.interrupt, so replicating that

Re: RFR: 8281525: Enable Zc:strictStrings flag in Visual Studio build

2022-02-22 Thread David Holmes
On Mon, 21 Feb 2022 19:55:14 GMT, Daniel Jeliński wrote: > Please review this PR that enables > [Zc:strictStrings](https://docs.microsoft.com/en-us/cpp/build/reference/zc-strictstrings-disable-string-literal-type-conversion?view=msvc-170) > compiler flag, which makes assigning a string literal

Re: Unused static constant MathContext.DEFAULT_DIGITS

2022-02-18 Thread David Holmes
On 18/02/2022 7:55 pm, Andrey Turbanov wrote: Hello. I noticed unused field java.math.MathContext#DEFAULT_DIGITS https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/math/MathContext.java#L61 As I can see, it was already unused in the initial OpenJDK source. Does VM use

Re: RFR: JDK-8281766: Update java.lang.reflect.Parameter to implement Member

2022-02-15 Thread David Holmes
On Tue, 15 Feb 2022 01:13:43 GMT, Joe Darcy wrote: > Retrofitting of Parameter to implement Member, an interface already > implemented by similar reflective modeling classes. > > Since Parameter is final, there is little compatibility impact from adding a > new method. > > Please also review

Re: RFR: JDK-8281766: Update java.lang.reflect.Parameter to implement Member

2022-02-14 Thread David Holmes
Hi Joe, On 15/02/2022 11:22 am, Joe Darcy wrote: Retrofitting of Parameter to implement Member, an interface already implemented by similar reflective modeling classes. But a parameter is not a Member! David Since Parameter is final, there is little compatibility impact from adding a new

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread David Holmes
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread David Holmes
On Thu, 10 Feb 2022 15:39:53 GMT, Leo Korinth wrote: > Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Forgot to mention copyright years need updating before integrating! Thanks. - PR:

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread David Holmes
On Thu, 10 Feb 2022 15:39:53 GMT, Leo Korinth wrote: > Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Looks fine. The proof of these changes is in compiling the files - how did you test the non-gc-test

Re: RFR: JDK-8221642: AccessibleObject::setAccessible throws NPE when invoked by JNI code with no java frame on stack

2022-01-30 Thread David Holmes
On Fri, 28 Jan 2022 17:50:19 GMT, Mandy Chung wrote: > `AccessibleObject::setAccessible` and `trySetAccessible` methods should only > allow access to public member of a public type that is unconditionally > exported consistent with the access check as described in the class > specification,

  1   2   3   4   5   6   7   8   9   10   >