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

2022-05-13 Thread Alan Bateman
On Fri, 13 May 2022 06:47:20 GMT, Jie Fu wrote: >> test/jdk/java/foreign/TestIntrinsics.java line 48: >> >>> 46: * -XX:+UseShenandoahGC >>> 47: * TestIntrinsics >>> 48: */ >> >> Is this needed? The parameters looks the same as the first test description >> so if you are testing with +Sh

Re: RFR: 8286279: [vectorapi] Only check index of masked lanes if offset is out of array boundary for masked store [v2]

2022-05-13 Thread Xiaohong Gong
On Fri, 13 May 2022 01:35:40 GMT, Xiaohong Gong wrote: >> Checking whether the indexes of masked lanes are inside of the valid memory >> boundary is necessary for masked vector memory access. However, this could >> be saved if the given offset is inside of the vector range that could make >> s

Re: RFR: 8286559: Re-examine synchronization of mark and reset methods on InflaterInputStream [v2]

2022-05-13 Thread Jaikiran Pai
> Can I please get a review of this change that addresses > https://bugs.openjdk.java.net/browse/JDK-8286559? > > The commit here removes the `synchronized` on `mark` and `reset` methods of > `InflaterInputStream`. The `mark` method is a no-op method and the `reset` > method only always throws

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

2022-05-13 Thread Jie Fu
On Fri, 13 May 2022 06:56:23 GMT, Alan Bateman 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. Yes, you're right. > What you have is not wrong but wou

Re: RFR: JDK-8286604: Update InputStream and OutputStream to use @implSpec [v2]

2022-05-13 Thread Alan Bateman
On Thu, 12 May 2022 20:04:33 GMT, Joe Darcy wrote: >> While doing a CSR review of another issue, I noticed some cases in >> InputStream and OutputStream what would benefit from being upgraded to >> implSpec and related javadoc tags. >> >> The "A subclass must provide an implementation of this

Re: RFR: 8286559: Re-examine synchronization of mark and reset methods on InflaterInputStream [v2]

2022-05-13 Thread Alan Bateman
On Fri, 13 May 2022 07:14:30 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change that addresses >> https://bugs.openjdk.java.net/browse/JDK-8286559? >> >> The commit here removes the `synchronized` on `mark` and `reset` methods of >> `InflaterInputStream`. The `mark` method i

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v4]

2022-05-13 Thread Jatin Bhateja
> Hi All, > > Patch adds the planned support for new vector operations and APIs targeted > for [JEP 426: Vector API (Fourth > Incubator).](https://bugs.openjdk.java.net/browse/JDK-8280173) > > Following is the brief summary of changes:- > > 1) Extends the scope of existing lanewise API for fo

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v3]

2022-05-13 Thread Jatin Bhateja
On Thu, 12 May 2022 22:40:50 GMT, Vladimir Ivanov wrote: >> Jatin Bhateja has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 11 commits: >> >> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8284960 >> - 8284960:

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v4]

2022-05-13 Thread Jatin Bhateja
On Thu, 12 May 2022 22:48:26 GMT, Vladimir Ivanov wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8284960: Review comments resolution. > > src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 7953: > >> 7951: St

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v6]

2022-05-13 Thread Adam Sotona
> Please review this patch adding new lint option, **lossy-conversions**, to > javac to warn about type casts in compound assignments with possible lossy > conversions. > > The new lint warning is shown if the type of the right-hand operand of a > compound assignment is not assignment compatibl

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

2022-05-13 Thread Uwe Schindler
On Fri, 13 May 2022 08:25:01 GMT, Uwe Schindler wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 65 commits: >> >> - Merge branch 'master' into foreign-preview >> - Merge branch 'master' into foreign

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

2022-05-13 Thread Uwe Schindler
On Thu, 12 May 2022 15:45:01 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] - https://openjd

Re: RFR: 8283667: [vectorapi] Vectorization for masked load with IOOBE with predicate feature [v3]

2022-05-13 Thread Xiaohong Gong
On Thu, 12 May 2022 16:07:54 GMT, Paul Sandoz wrote: >> Xiaohong Gong has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename "use_predicate" to "needs_predicate" > > Yes, the tests were run in debug mode. The reporting of the missing con

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

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 08:29:13 GMT, Uwe Schindler wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 65 commits: >> >> - Merge branch 'master' into foreign-preview >> - Merge branch 'master' into foreign

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

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 08:33:11 GMT, Uwe Schindler wrote: >> src/java.base/share/classes/java/nio/channels/FileChannel.java line 1045: >> >>> 1043: * >>> 1044: * @throws UnsupportedOperationException >>> 1045: * If an unsupported map mode is specified. >> >> I think this sho

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v11]

2022-05-13 Thread Maurizio Cimadamore
On Thu, 12 May 2022 10:54:16 GMT, Jan Lahoda wrote: >> This is a (preliminary) patch for javac implementation for the third preview >> of pattern matching for switch (type patterns in switches). >> >> Draft JLS: >> http://cr.openjdk.java.net/~gbierman/PatternSwitchPlusRecordPatterns/PatternSwit

Re: RFR: 8283667: [vectorapi] Vectorization for masked load with IOOBE with predicate feature [v4]

2022-05-13 Thread Xiaohong Gong
> Currently the vector load with mask when the given index happens out of the > array boundary is implemented with pure java scalar code to avoid the IOOBE > (IndexOutOfBoundaryException). This is necessary for architectures that do > not support the predicate feature. Because the masked load is

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-13 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * > src/hotspot/share/jfr/

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v2]

2022-05-13 Thread Thomas Stuefe
On Thu, 12 May 2022 18:09:40 GMT, Severin Gehwolf wrote: >> Please review this change to the cgroup v1 subsystem which makes it more >> resilient on some of the stranger systems. Unfortunately, I wasn't able to >> re-create a similar system as the reporter. The idea of using the longest >> sub

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v2]

2022-05-13 Thread Lance Andersen
On Wed, 30 Mar 2022 10:26:56 GMT, Lance Andersen wrote: >>> Hello Volker, An additional thing that we might have to consider here is >>> whether adding this javadoc change to `InflaterInputStream` is ever going >>> to "show up" to end user applications. What I mean is, I think in many >>> case

RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base

2022-05-13 Thread Jorn Vernee
Address possible lossy conversion warning in `ProgrammableInvoker`. Testing: `run-test-jdk_foreign`, testing with patch from https://github.com/openjdk/jdk/pull/8599 to see if the warning is gone. - Commit messages: - Address possible lossy conversion warning in ProgrammableInvoker

Re: RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base

2022-05-13 Thread Daniel Fuchs
On Fri, 13 May 2022 10:04:36 GMT, Jorn Vernee wrote: > Address possible lossy conversion warning in `ProgrammableInvoker`. > > Testing: `run-test-jdk_foreign`, testing with patch from > https://github.com/openjdk/jdk/pull/8599 to see if the warning is gone. src/java.base/share/classes/jdk/inte

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

2022-05-13 Thread Uwe Schindler
On Fri, 13 May 2022 09:43:55 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 1164: >> >>> 1162: } >>> 1163: if (unmapper != null) { >>> 1164: AbstractMemorySegmentImpl segment = new >>> MappedMemorySegmentImpl(unma

Re: RFR: 8285485: Fix typos in corelibs

2022-05-13 Thread Magnus Ihse Bursie
On Wed, 27 Apr 2022 16:18:15 GMT, Naoto Sato wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins_zh_CN.properties >> line 188: >> >>> 186: main.plugin.module=\u63D2\u4EF6\u6A21\u5757 >>> 187: >>> 188: main.plugin.category=\u7C7B\u522B >> >> what's this? > > Removing the tr

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread ExE Boss
On Thu, 10 Mar 2022 08:52:17 GMT, Сергей Цыпанов wrote: >> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with >> smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when >> called with vararg of size 0, 1, 2. >> >> In general replacement of `Arrays.asList(

Re: RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 10:59:19 GMT, Daniel Fuchs wrote: >> Address possible lossy conversion warning in `ProgrammableInvoker`. >> >> Testing: `run-test-jdk_foreign`, testing with patch from >> https://github.com/openjdk/jdk/pull/8599 to see if the warning is gone. > > src/java.base/share/classes/

Re: RFR: 8285485: Fix typos in corelibs

2022-05-13 Thread Magnus Ihse Bursie
On Wed, 27 Apr 2022 16:50:30 GMT, Pavel Rappo wrote: >> I ran `codespell` on modules owned by core-libs, and accepted those changes >> where it indeed discovered real typos. >> >> I will update copyright years using a script before pushing (otherwise like >> every second change would be a copy

Re: RFR: 8285485: Fix typos in corelibs

2022-05-13 Thread Magnus Ihse Bursie
On Wed, 27 Apr 2022 15:45:12 GMT, Roger Riggs wrote: >> I ran `codespell` on modules owned by core-libs, and accepted those changes >> where it indeed discovered real typos. >> >> I will update copyright years using a script before pushing (otherwise like >> every second change would be a copy

Re: RFR: 8285485: Fix typos in corelibs

2022-05-13 Thread Magnus Ihse Bursie
On Wed, 27 Apr 2022 17:11:34 GMT, Pavel Rappo wrote: >> I ran `codespell` on modules owned by core-libs, and accepted those changes >> where it indeed discovered real typos. >> >> I will update copyright years using a script before pushing (otherwise like >> every second change would be a copy

Re: RFR: 8285485: Fix typos in corelibs [v2]

2022-05-13 Thread Magnus Ihse Bursie
> I ran `codespell` on modules owned by core-libs, and accepted those changes > where it indeed discovered real typos. > > I will update copyright years using a script before pushing (otherwise like > every second change would be a copyright update, making reviewing much > harder). > > The lon

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v11]

2022-05-13 Thread Jan Lahoda
On Fri, 13 May 2022 09:29:20 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Updating naming to more closely follow the spec: total patterns are >> renamed to unconditional patterns, unre

Re: RFR: 8285485: Fix typos in corelibs [v3]

2022-05-13 Thread Magnus Ihse Bursie
> I ran `codespell` on modules owned by core-libs, and accepted those changes > where it indeed discovered real typos. > > I will update copyright years using a script before pushing (otherwise like > every second change would be a copyright update, making reviewing much > harder). > > The lon

Re: RFR: 8285485: Fix typos in corelibs [v3]

2022-05-13 Thread Magnus Ihse Bursie
On Wed, 27 Apr 2022 15:50:20 GMT, Roger Riggs wrote: >> Magnus Ihse Bursie 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 six >> additional com

Re: RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base [v2]

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 11:17:20 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/ProgrammableInvoker.java >> line 215: >> >>> 213: for (int i = 0; i < highLevelType.parameterCount(); i++) { >>> 214: List bindings = >>> callingSequence.argumentBin

Re: RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base [v2]

2022-05-13 Thread Jorn Vernee
> Address possible lossy conversion warning in `ProgrammableInvoker`. > > Testing: `run-test-jdk_foreign`, testing with patch from > https://github.com/openjdk/jdk/pull/8599 to see if the warning is gone. Jorn Vernee has updated the pull request incrementally with one additional commit since th

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

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 11:01:09 GMT, Uwe Schindler wrote: > RFE = issue? issue, with type RFE (request for enhancement) - PR: https://git.openjdk.java.net/jdk/pull/7888

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

2022-05-13 Thread Uwe Schindler
On Fri, 13 May 2022 11:59:12 GMT, Maurizio Cimadamore wrote: >> RFE = issue? > >> RFE = issue? > > issue, with type RFE (request for enhancement) See: https://bugs.openjdk.java.net/browse/JDK-8286734 - PR: https://git.openjdk.java.net/jdk/pull/7888

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread Сергей Цыпанов
On Fri, 13 May 2022 12:19:08 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 727: >> >>> 725: MethodVisitor mv = cw.visitMethod(accessFlags, >>> 726: method.getName(), desc, null, >>> 727: ty

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread Сергей Цыпанов
On Fri, 13 May 2022 11:14:29 GMT, ExE Boss wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8282662: Revert dubious changes in MethodType > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line

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

2022-05-13 Thread Uwe Schindler
On Fri, 13 May 2022 09:42:44 GMT, Maurizio Cimadamore wrote: >> This change here also closes >> [JDK-8259034](https://bugs.openjdk.java.net/browse/JDK-8259034) > > @uschindler - the issue you mention with respect lack of UOE for wrong file > system applies to BB as well. I suggest filing an is

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

2022-05-13 Thread Zhengyu Gu
On Fri, 13 May 2022 02:43:55 GMT, Jie Fu wrote: > Hi all, > > Some tests fail with Shenandoah GC after JDK-8282191. > The reason is that the assert in `ShenandoahControlThread::request_gc` misses > the case of `GCCause::_codecache_GC_threshold`. > It would be better to fix it. > > Thanks. > Be

RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
This patch makes MemorySegment::ofBuffer more general, by allowing clients to pass *any* `Buffer` instance, not just `ByteBuffer`. This allows us to match expressiveness of JNI API, where JNI clients can obtain the address of any direct buffer instance, using the `GetDirectBufferAddress` functio

Re: RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 12:33:10 GMT, Maurizio Cimadamore wrote: > This patch makes MemorySegment::ofBuffer more general, by allowing clients to > pass *any* `Buffer` instance, not just `ByteBuffer`. > This allows us to match expressiveness of JNI API, where JNI clients can > obtain the address of

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

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 06:56:23 GMT, Alan Bateman wrote: >> Without `-XX:+UseShenandoahGC`, this bug wouldn't be exposed. >> >> What do you mean by `if you are testing with +ShenandoahGC then it will run >> already`? > > I assume you are running the tests with: >make run-tests TEST_OPTS_JAVA_O

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v7]

2022-05-13 Thread Shruthi
On Thu, 12 May 2022 15:51:15 GMT, Joe Wang wrote: >> Shruthi has refreshed the contents of this pull request, and previous >> commits have been removed. Incremental views are not available. > > Copyright years for XRTreeFragSelectWrapper.java and XSLTErrorResources.java > were still not updated

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

2022-05-13 Thread Jie Fu
On Fri, 13 May 2022 06:56:23 GMT, Alan Bateman wrote: >> Without `-XX:+UseShenandoahGC`, this bug wouldn't be exposed. >> >> What do you mean by `if you are testing with +ShenandoahGC then it will run >> already`? > > I assume you are running the tests with: >make run-tests TEST_OPTS_JAVA_O

Re: RFR: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base [v2]

2022-05-13 Thread Daniel Fuchs
On Fri, 13 May 2022 12:06:45 GMT, Jorn Vernee wrote: >> Address possible lossy conversion warning in `ProgrammableInvoker`. >> >> Testing: `run-test-jdk_foreign`, testing with patch from >> https://github.com/openjdk/jdk/pull/8599 to see if the warning is gone. > > Jorn Vernee has updated the p

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 bette

Re: RFR: 8286669: Replace MethodHandle specialization with ASM in mainline [v2]

2022-05-13 Thread Jorn Vernee
> Hi, > > This PR brings over commits from the panama-foreign repo. These commits > mostly pertain to the switch to ASM and away from MethodHandle combinators > for the binding recipe specialization. But, there is one more commit which > adds freeing of downcall stubs, since those changes were

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread ExE Boss
On Fri, 13 May 2022 12:19:25 GMT, Сергей Цыпанов wrote: >> Usually a method declares either no exception, or a couple of them. In the >> first case `List.of()` doesn't allocate, in the second it allocates an >> object with 1-2 fields but without an array, so `List.of()` is likely to be >> more

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

2022-05-13 Thread Jie Fu
On Fri, 13 May 2022 13:18:55 GMT, David Holmes wrote: >>> I think I agree with @AlanBateman - in the sense that this seems to go down >>> a slippery slope where every test would need to be executed against all >>> possible GCs. AFAIK, there are no other foreign tests doing this. >> >> I think

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

2022-05-13 Thread Jie Fu
> Hi all, > > Some tests fail with Shenandoah GC after JDK-8282191. > The reason is that the assert in `ShenandoahControlThread::request_gc` misses > the case of `GCCause::_codecache_GC_threshold`. > It would be better to fix it. > > Thanks. > Best regards, > Jie Jie Fu has updated the pull req

Re: RFR: 8285485: Fix typos in corelibs [v4]

2022-05-13 Thread Magnus Ihse Bursie
> I ran `codespell` on modules owned by core-libs, and accepted those changes > where it indeed discovered real typos. > > I will update copyright years using a script before pushing (otherwise like > every second change would be a copyright update, making reviewing much > harder). > > The lon

RFR: 8286705: GCC 12 reports use-after-free potential bugs

2022-05-13 Thread Yasumasa Suenaga
GCC 12 reports use-after-free potential bugs in below: In function 'find_positions', inlined from 'find_file' at /home/ysuenaga/github-forked/jdk/src/java.base/share/native/libjli/parse_manifest.c:364:9: - Commit messages: - 8286705: GCC 12 reports use-after-free potential bug

RFR: 8286694: Incorrect argument processing in java launcher

2022-05-13 Thread Yasumasa Suenaga
GCC 12 reports as following: - Commit messages: - 8286694: Incorrect argument processing in java launcher Changes: https://git.openjdk.java.net/jdk/pull/8694/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8694&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-13 Thread Yasumasa Suenaga
On Fri, 13 May 2022 10:02:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >> *

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-13 Thread Roger Riggs
On Fri, 13 May 2022 05:54:15 GMT, Alan Bateman wrote: >> src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java line 128: >> >>> 126: // timed poll interrupted so need to adjust timeout >>> 127: long adjust = System.nanoTime() - startTime; >>> 128:

RFR: 8286744: failure_handler: dmesg command on macos fails to collect data due to permission issues

2022-05-13 Thread Jaikiran Pai
Can I please get a review of this change which proposes to fix the failure handler command `dmesg` on macOS? As noted in the JBS issue, the command currently fails with permission error. The commit in this PR uses `sudo` as suggested in the man pages of that command. Tested locally on macOS by

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-13 Thread ExE Boss
On Fri, 13 May 2022 14:18:04 GMT, Roger Riggs wrote: >> Well spotted, I don't think that change was intentionally. > > Ouch; Will fix: > > I took Alan's earlier comment literally: > > "This one can also be changed to: > > to =- (int) TimeUnit.NANOSECONDS.toMillis(adjust);" @RogerRiggs This al

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v11]

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 11:34:32 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/MatchException.java line 58: >> >>> 56: * @param message the detail message (which is saved for later >>> retrieval >>> 57: * by the {@link #getMessage()} method). >>> 58: * @par

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

2022-05-13 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to fix the failure > handler command `dmesg` on macOS? > > As noted in the JBS issue, the command currently fails with permission error. > The commit in this PR uses `sudo` as suggested in the man pages of that > command. > > Tested loc

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

2022-05-13 Thread Daniel Fuchs
On Fri, 13 May 2022 14:36:02 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the failure >> handler command `dmesg` on macOS? >> >> As noted in the JBS issue, the command currently fails with permission >> error. The commit in this PR uses `sudo` as s

Integrated: 8286393: Address possibly lossy conversions in java.rmi

2022-05-13 Thread Roger Riggs
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v12]

2022-05-13 Thread Jan Lahoda
> This is a (preliminary) patch for javac implementation for the third preview > of pattern matching for switch (type patterns in switches). > > Draft JLS: > http://cr.openjdk.java.net/~gbierman/PatternSwitchPlusRecordPatterns/PatternSwitchPlusRecordPatterns-20220407/specs/patterns-switch-jls.htm

Re: RFR: 8286669: Replace MethodHandle specialization with ASM in mainline [v2]

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 13:23:41 GMT, Jorn Vernee wrote: >> Hi, >> >> This PR brings over commits from the panama-foreign repo. These commits >> mostly pertain to the switch to ASM and away from MethodHandle combinators >> for the binding recipe specialization. But, there is one more commit which

Re: RFR: 8277493: [REDO] Quarantined jpackage apps are labeled as "damaged" [v2]

2022-05-13 Thread Alexey Semenyuk
On Fri, 13 May 2022 05:06:21 GMT, Alexander Matveev wrote: >> - No changes to code provided by original fix. >> - Added ad hoc signing on macOS aarch64, since macOS aarch64 cannot execute >> unsigned code and code should be at least ad hoc signed. >> - Signing of app bundle produced by AppCon

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v12]

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 14:58:42 GMT, Jan Lahoda wrote: >> This is a (preliminary) patch for javac implementation for the third preview >> of pattern matching for switch (type patterns in switches). >> >> Draft JLS: >> http://cr.openjdk.java.net/~gbierman/PatternSwitchPlusRecordPatterns/PatternSwit

Re: RFR: JDK-8266670: Better modeling of access flags in core reflection [v19]

2022-05-13 Thread Roger Riggs
On Tue, 3 May 2022 21:35:48 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >> dist

Integrated: JDK-8286604: Update InputStream and OutputStream to use @implSpec

2022-05-13 Thread Joe Darcy
On Wed, 11 May 2022 20:40:30 GMT, Joe Darcy wrote: > While doing a CSR review of another issue, I noticed some cases in > InputStream and OutputStream what would benefit from being upgraded to > implSpec and related javadoc tags. > > The "A subclass must provide an implementation of this metho

RFR: 8286399: Address possibly lossy conversions in JDK Build Tools

2022-05-13 Thread Naoto Sato
Applied required casts for the upcoming warning. Verified by cherry-picking Adam's patch. - Commit messages: - 8286399: Address possibly lossy conversions in JDK Build Tools Changes: https://git.openjdk.java.net/jdk/pull/8706/files Webrev: https://webrevs.openjdk.java.net/?repo=jd

Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools

2022-05-13 Thread Roger Riggs
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8706

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v8]

2022-05-13 Thread Ichiroh Takiguchi
> On JDK19 with Linux ja_JP.eucjp locale, > System.getenv() returns unexpected value if environment variable has Japanese > EUC characters. > It seems this issue happens because of JEP 400. > Arguments for ProcessBuilder have same kind of issue. Ichiroh Takiguchi has updated the pull request incr

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v13]

2022-05-13 Thread Markus KARG
On Sun, 1 Aug 2021 22:01:33 GMT, Markus KARG wrote: >> This PR-*draft* is **work in progress** and an invitation to discuss a >> possible solution for issue >> [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not >> yet* intended for a final review. >> >> As proposed in

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v5]

2022-05-13 Thread Markus KARG
On Mon, 27 Dec 2021 13:43:12 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > fixed missing BufferedInputStream Please keep this PR open; I will continune work on it s

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v2]

2022-05-13 Thread Ichiroh Takiguchi
On Mon, 2 May 2022 15:00:07 GMT, Roger Riggs wrote: >> Ichiroh Takiguchi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8285517: System.getenv() returns unexpected value if environment variable >> has non ASCII character > > Can you cl

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

2022-05-13 Thread Lance Andersen
On Fri, 13 May 2022 14:39:44 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the failure >> handler command `dmesg` on macOS? >> >> As noted in the JBS issue, the command currently fails with permission >> error. The commit in this PR uses `sudo` as s

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v12]

2022-05-13 Thread Piotr Tarsa
On Mon, 14 Mar 2022 19:12:29 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor javad

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v13]

2022-05-13 Thread Raffaello Giulietti
> Hello, > > here's a PR for a patch submitted on March 2020 > [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was a > thing. > > The patch has been edited to adhere to OpenJDK code conventions about > multi-line (block) comments. Nothing in the code proper has changed,

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v8]

2022-05-13 Thread Naoto Sato
On Fri, 13 May 2022 17:38:48 GMT, Ichiroh Takiguchi wrote: >> On JDK19 with Linux ja_JP.eucjp locale, >> System.getenv() returns unexpected value if environment variable has >> Japanese EUC characters. >> It seems this issue happens because of JEP 400. >> Arguments for ProcessBuilder have same

Integrated: 8277493: [REDO] Quarantined jpackage apps are labeled as "damaged"

2022-05-13 Thread Alexander Matveev
On Wed, 4 May 2022 03:56:10 GMT, Alexander Matveev wrote: > - No changes to code provided by original fix. > - Added ad hoc signing on macOS aarch64, since macOS aarch64 cannot execute > unsigned code and code should be at least ad hoc signed. > - Signing of app bundle produced by AppContentTe

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v8]

2022-05-13 Thread Joe Wang
On Thu, 12 May 2022 18:02:26 GMT, Shruthi wrote: >> Removing the Duplicate keys present in XSLTErrorResources.java and >> XPATHErrorResources.java >> >> The bug report for the same: https://bugs.openjdk.java.net/browse/JDK-8285097 > > Shruthi has refreshed the contents of this pull request, and

Re: RFR: 8286559: Re-examine synchronization of mark and reset methods on InflaterInputStream [v2]

2022-05-13 Thread Brian Burkhalter
On Fri, 13 May 2022 07:14:30 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change that addresses >> https://bugs.openjdk.java.net/browse/JDK-8286559? >> >> The commit here removes the `synchronized` on `mark` and `reset` methods of >> `InflaterInputStream`. The `mark` method i

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

2022-05-13 Thread Vladimir Ivanov
On Thu, 12 May 2022 17:26:44 GMT, Jorn Vernee wrote: >>> Do nothing special for async exceptions. i.e. if they happen anywhere >>> between 1. and 6. they will end up in one of the fallback handlers and the >>> VM will be terminated. >> >> My understanding is that if they materialize while we'r

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

2022-05-13 Thread Vladimir Ivanov
On Thu, 12 May 2022 16:58:36 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 t

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

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 19:16:36 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 98 commits: >> >> - Merge branch 'master' into JEP-19-VM-IMPL2 >> - Undo spurious changes. >> - Merge branc

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

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 19:13:46 GMT, Vladimir Ivanov wrote: >> Ok. Then, if no one objects, I will leave this area as-is for now. (and >> perhaps come back to this issue in the future, if it becomes more pressing). >> >> (I'll also note that this issue already exists in the current code that's in

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

2022-05-13 Thread Vladimir Ivanov
On Fri, 13 May 2022 19:59:40 GMT, Jorn Vernee wrote: >> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 933: >> >>> 931: } else { >>> 932: assert(dst.is_single_reg(), "not a stack pair: (%s, %s), (%s, >>> %s)", >>> 933: src.first()->name(), src.second()->name(), >>> dst.first

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

2022-05-13 Thread Vladimir Ivanov
On Fri, 13 May 2022 20:46:19 GMT, Vladimir Ivanov wrote: >> Shouldn't there be a 2-space indentation wrt the assert here? I could also >> indent all the arguments to be aligned with the format string, if that seems >> better. > > It's preferred to indent multi-line argument lists on the column

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

2022-05-13 Thread Jorn Vernee
> 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 this. As such, this PR might fall over to 20, but it > would b

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

2022-05-13 Thread Jorn Vernee
On Fri, 13 May 2022 20:47:22 GMT, Vladimir Ivanov wrote: >> It's preferred to indent multi-line argument lists on the column where >> argument list starts. > > assert(dst.is_single_reg(), "not a stack pair: (%s, %s), (%s, %s)", >src.first()->name(), src.second()->name(), dst.first()->nam

RFR: JDK-8286760: Update citation of "Effective Java" second edition to third edition

2022-05-13 Thread Joe Darcy
Update reference to the latest "Effective Java" version and switch to cite tags. - Commit messages: - JDK-8286760: Update citation of "Effective Java" second edition to third edition Changes: https://git.openjdk.java.net/jdk/pull/8707/files Webrev: https://webrevs.openjdk.java.net

RFR: 8286756: Cleanup foreign API benchmarks

2022-05-13 Thread Maurizio Cimadamore
This simple patch regularizes some of the foreign API benchmarks. Some of the changes are: * use of capital names for var handle and layout constants * move shared layout and var handle constants in a new superclass, `JavaLayouts` * regularize aligned vs. unaligned benchmarks, especially in `Loo

Re: RFR: JDK-8286760: Update citation of "Effective Java" second edition to third edition

2022-05-13 Thread Brian Burkhalter
On Fri, 13 May 2022 21:17:22 GMT, Joe Darcy wrote: > Update reference to the latest "Effective Java" version and switch to cite > tags. Looks fine. - Marked as reviewed by bpb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8707

Re: RFR: JDK-8286760: Update citation of "Effective Java" second edition to third edition

2022-05-13 Thread Pavel Rappo
On Fri, 13 May 2022 21:17:22 GMT, Joe Darcy wrote: > Update reference to the latest "Effective Java" version and switch to cite > tags. Looks good! 1. Had to educate myself on the [cite element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element). The HTML spec

Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools

2022-05-13 Thread Joe Wang
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. make/jdk/src/classes/build/tools/generatebreakiteratordata/RuleBasedBreakIteratorBuilder.java line 1278: > 1276: state[numCategories] |

Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools

2022-05-13 Thread Naoto Sato
On Fri, 13 May 2022 22:11:17 GMT, Joe Wang wrote: >> Applied required casts for the upcoming warning. Verified by cherry-picking >> Adam's patch. > > make/jdk/src/classes/build/tools/generatebreakiteratordata/RuleBasedBreakIteratorBuilder.java > line 1278: > >> 1276: state[numCateg

Re: RFR: 8286705: GCC 12 reports use-after-free potential bugs

2022-05-13 Thread Kim Barrett
On Fri, 13 May 2022 09:14:28 GMT, Yasumasa Suenaga wrote: > GCC 12 reports use-after-free potential bugs in below: > > > In function 'find_positions', > inlined from 'find_file' at > /home/ysuenaga/github-forked/jdk/src/java.base/share/native/libjli/parse_manifest.c:364:9: Looks good. --

Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools

2022-05-13 Thread Joe Wang
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. Marked as reviewed by joehw (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8706

RFR: JDK-8281001 Examine the behavior of Class::forName if the caller is null

2022-05-13 Thread Tim Prinzing
The Class::forName behavior change to match JNI FindClass is a compatible change and seems pretty attractive as it would be expected that Class::forName would give the same behavior as FindClass which uses the system classloader. The test for 8281006 was enhanced to test for this change. Merge

Re: RFR: JDK-8281001 Examine the behavior of Class::forName if the caller is null

2022-05-13 Thread Joe Darcy
On Sat, 14 May 2022 00:30:00 GMT, Tim Prinzing wrote: > The Class::forName behavior change to match JNI FindClass is a compatible > change and seems pretty attractive as it would be expected that > Class::forName would give the same behavior as FindClass which uses the > system classloader. T

  1   2   >