Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v23]

2022-03-02 Thread Stuart Marks
On Wed, 2 Mar 2022 18:48:46 GMT, XenoAmess wrote: >> 8281631: HashMap copy constructor and putAll can over-allocate table > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes to IdentityHashMap

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-03-02 Thread Jatin Bhateja
On Wed, 19 Jan 2022 22:09:26 GMT, Joe Darcy wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding a test for scalar intrinsification. > > The testing for this PR doesn't look adequate to me. I don't see

RFR: 8282429: StringBuilder/StringBuffer.toString() skip compressing for UTF16 strings

2022-03-02 Thread Xin Liu
If AbstractStringBuilder only grow, the inflated value which is encoded in UTF16 can't be compressed. toString() can skip compression in this case. This can save an ArrayAllocation in StringUTF16::compress. java.io.BufferedRead::readLine() is a case that StringBuilder grows only.

Integrated: 8282515: More clean up on NativeLibraries just for JNI library use

2022-03-02 Thread Mandy Chung
On Wed, 2 Mar 2022 17:04:01 GMT, Mandy Chung wrote: > This patch further cleans up NativeLibraries just for JNI library use. > RawNativeLibraries implements its own native load and unload methods. In > addition, this also fixes the implementation of `RawNativeLibraries::load` > not to throw

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 01:07:47 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > src/hotspot/cpu/x86/x86.ad line 7295: > >> 7293: __

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 04:55:08 GMT, Jatin Bhateja wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > As per SDM, if post conversion a floating point number is

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-02 Thread Sandhya Viswanathan
On Wed, 2 Mar 2022 02:44:41 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 03:38:32 GMT, Quan Anh Mai wrote: >> I believe the indefinite value should be 2^(w - 1) (a.k.a 0x8000) and >> the documentation is typoed. If you look at `cvtss2si`, the indefinite value >> is also written as 2^w - 1 but yet in `MacroAssembler::convert_f2i` we >>

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v3]

2022-03-02 Thread Mandy Chung
On Wed, 2 Mar 2022 21:53:01 GMT, Tim Prinzing wrote: >> The caller class returned by Reflection::getCallerClass was used to gain >> access to it's module in most cases and class loader in one case. I added a >> method to translate the caller class to caller module so that the decision >> of

Re: RFR: JDK-8177107: Reduce memory footprint of java.lang.reflect.Constructor/Method

2022-03-02 Thread Mandy Chung
On Wed, 2 Mar 2022 20:28:45 GMT, Joe Darcy wrote: > Refactoring of Method and Constructor to share a single empty array for > parameters and exceptions as well as type variables. > > Existing core reflection regression tests pass with the change. Marked as reviewed by mchung (Reviewer).

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v6]

2022-03-02 Thread Lutz Schmidt
On Wed, 2 Mar 2022 14:06:10 GMT, Claes Redestad wrote: >> Claes Redestad has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 29 commits: >> >> - Resolve merge conflict >> - Fix TestCountPositives to correctly allow 0 return when

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA

2022-03-02 Thread Valerie Peng
On Wed, 2 Mar 2022 04:02:45 GMT, Anthony Scarpino wrote: > I have some compatibility concerns about the AES change breaking code that > expects a SecretKeySpec of 16 bytes. I can see situations where > '.getEncoded()' returns a byte[32] when user code expects a byte[16]. Also, > I'm pretty

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v3]

2022-03-02 Thread Tim Prinzing
> The caller class returned by Reflection::getCallerClass was used to gain > access to it's module in most cases and class loader in one case. I added a > method to translate the caller class to caller module so that the decision of > what module represents the caller with no stack frame is

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v2]

2022-03-02 Thread Tim Prinzing
> The caller class returned by Reflection::getCallerClass was used to gain > access to it's module in most cases and class loader in one case. I added a > method to translate the caller class to caller module so that the decision of > what module represents the caller with no stack frame is

Re: RFR: JDK-8177107: Reduce memory footprint of java.lang.reflect.Constructor/Method

2022-03-02 Thread Joe Darcy
On Wed, 2 Mar 2022 20:28:45 GMT, Joe Darcy wrote: > Refactoring of Method and Constructor to share a single empty array for > parameters and exceptions as well as type variables. > > Existing core reflection regression tests pass with the change. PS I'll update the copyrights before pushing.

RFR: JDK-8177107: Reduce memory footprint of java.lang.reflect.Constructor/Method

2022-03-02 Thread Joe Darcy
Refactoring of Method and Constructor to share a single empty array for parameters and exceptions as well as type variables. Existing core reflection regression tests pass with the change. - Commit messages: - JDK-8177107: Reduce memory footprint of

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame

2022-03-02 Thread Mandy Chung
On Wed, 2 Mar 2022 18:56:40 GMT, Tim Prinzing wrote: > The caller class returned by Reflection::getCallerClass was used to gain > access to it's module in most cases and class loader in one case. I added a > method to translate the caller class to caller module so that the decision of > what

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame

2022-03-02 Thread Naoto Sato
On Wed, 2 Mar 2022 18:56:40 GMT, Tim Prinzing wrote: > The caller class returned by Reflection::getCallerClass was used to gain > access to it's module in most cases and class loader in one case. I added a > method to translate the caller class to caller module so that the decision of > what

Re: RFR: 8282432: Optimize masked "test" Vector API with predicate feature

2022-03-02 Thread Paul Sandoz
On Wed, 2 Mar 2022 02:50:27 GMT, Xiaohong Gong wrote: > The vector `"test"` api is implemented with vector `"compare"`. And the > masked `"test" `is implemented with `"test(op).and(m)"` which means > `"compare().and(m)"` finally. Since the masked vector `"compare"` has been > optimized with

RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame

2022-03-02 Thread Tim Prinzing
The caller class returned by Reflection::getCallerClass was used to gain access to it's module in most cases and class loader in one case. I added a method to translate the caller class to caller module so that the decision of what module represents the caller with no stack frame is made in a

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v19]

2022-03-02 Thread XenoAmess
On Fri, 18 Feb 2022 18:32:31 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - migrate to junit >> - change threshold > > Sigh. (I'm sighing at the author of the >

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v23]

2022-03-02 Thread XenoAmess
> 8281631: HashMap copy constructor and putAll can over-allocate table XenoAmess has updated the pull request incrementally with one additional commit since the last revision: revert changes to IdentityHashMap - Changes: - all: https://git.openjdk.java.net/jdk/pull/7431/files

Re: RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v21]

2022-03-02 Thread XenoAmess
On Wed, 2 Mar 2022 01:44:24 GMT, Stuart Marks wrote: > I'm starting to look at this again. First, a quick note -- I don't think > there should be any IdentityHashMap changes here. That uses a completely > different internal structure and allocation policy, and it's kind of a > distraction

Integrated: 8209784: Include hsdis in the JDK

2022-03-02 Thread Magnus Ihse Bursie
On Tue, 22 Feb 2022 16:10:22 GMT, Magnus Ihse Bursie wrote: > This PR adds a new configure argument, `--enable-hsdis-bundling`. Setting > this, together with a valid backend using `--with-hsdis`, will bundle the > generated hsdis library with the JDK. > > The PR also includes a refactoring of

Re: RFR: 8209784: Include hsdis in the JDK [v3]

2022-03-02 Thread Erik Joelsson
On Wed, 2 Mar 2022 14:30:43 GMT, Magnus Ihse Bursie wrote: >> This PR adds a new configure argument, `--enable-hsdis-bundling`. Setting >> this, together with a valid backend using `--with-hsdis`, will bundle the >> generated hsdis library with the JDK. >> >> The PR also includes a

Re: RFR: 8282515: More clean up on NativeLibraries just for JNI library use

2022-03-02 Thread Mandy Chung
On Wed, 2 Mar 2022 17:04:01 GMT, Mandy Chung wrote: > This patch further cleans up NativeLibraries just for JNI library use. > RawNativeLibraries implements its own native load and unload methods. In > addition, this also fixes the implementation of `RawNativeLibraries::load` > not to throw

Re: RFR: 8282515: More clean up on NativeLibraries just for JNI library use [v2]

2022-03-02 Thread Mandy Chung
> This patch further cleans up NativeLibraries just for JNI library use. > RawNativeLibraries implements its own native load and unload methods. In > addition, this also fixes the implementation of `RawNativeLibraries::load` > not to throw UnsatisfiedLinkError if a library cannot be loaded

Re: RFR: 8282515: More clean up on NativeLibraries just for JNI library use

2022-03-02 Thread Maurizio Cimadamore
On Wed, 2 Mar 2022 17:04:01 GMT, Mandy Chung wrote: > This patch further cleans up NativeLibraries just for JNI library use. > RawNativeLibraries implements its own native load and unload methods. In > addition, this also fixes the implementation of `RawNativeLibraries::load` > not to throw

RFR: 8282515: More clean up on NativeLibraries just for JNI library use

2022-03-02 Thread Mandy Chung
This patch further cleans up NativeLibraries just for JNI library use. RawNativeLibraries implements its own native load and unload methods. In addition, this also fixes the implementation of `RawNativeLibraries::load` not to throw UnsatisfiedLinkError if a library cannot be loaded for any

Integrated: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Devin Smith
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. This pull request has now been integrated. Changeset: ce18ff85 Author:Devin Smith Committer: Jim Laskey URL:

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Kevin Rushforth
On Wed, 2 Mar 2022 15:26:35 GMT, Devin Smith wrote: > Thanks for the help. I signed the OCA on Jan 17, 2022 and got confirmation it > was approved on Jan 20, 2022. Correct. Reviewers may know that this has been recorded if the PR has no `oca` label (you can see above that the `oca` label was

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

2022-03-02 Thread Maurizio Cimadamore
On 01/03/2022 18:17, Sean Mullan wrote: On 3/1/22 8:01 AM, Andrew Haley wrote: On 3/1/22 11:45, Andrew Haley wrote: Sure, you wouldn't be able to use the default thread pool, but that's no big deal, I would have thought. I'm sorry, I'll say that again. :-) I meant to say "you

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Devin Smith
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. Thanks for the help. I signed the OCA on Jan 17, 2022 and got confirmation it was approved on Jan 20, 2022. - PR:

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Devin Smith
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. @JimLaskey would it be possible to create an issue and review this change? I don't have an account on the OpenJDK issue tracker. I'm not sure how to

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Daniel Jeliński
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. Created https://bugs.openjdk.java.net/browse/JDK-8282551 for this. @devinrsmith please change the issue title to `8282551: Properly initialize

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Daniel Jeliński
On Mon, 21 Feb 2022 19:43:52 GMT, Devin Smith wrote: >> Did a cursory review of the other generators, they seem to set the state >> correctly. > > I'm not sure how to move this forward, or get the attention of the people > responsible for this code. I see @turbanoff you liked and may be

RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Devin Smith
Did a cursory review of the other generators, they seem to set the state correctly. - Commit messages: - [PATCH] Properly initialize L32X64MixRandom state Changes: https://git.openjdk.java.net/jdk/pull/7120/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7120=00 Issue:

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Jim Laskey
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. Marked as reviewed by jlaskey (Reviewer). I'll sponsor this change when you receive your OCA. - PR:

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v6]

2022-03-02 Thread Andrew Haley
On Tue, 1 Mar 2022 19:12:17 GMT, Claes Redestad wrote: > > @theRealAph , @a74nh or someone familiar with aarch64 code, please review > > aarch64 changes. > > Note that the aarch64 changes I've put in for now implements `countPositives` > to return `0` if there's a negative value anywhere,

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v6]

2022-03-02 Thread Claes Redestad
On Wed, 23 Feb 2022 14:19:20 GMT, Claes Redestad wrote: >> I'm requesting comments and, hopefully, some help with this patch to replace >> `StringCoding.hasNegatives` with `countPositives`. The new method does a >> very similar pass, but alters the intrinsic to return the number of leading >>

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v7]

2022-03-02 Thread Claes Redestad
> I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes > in the `byte[]` range which only has positive bytes.

Re: RFR: 8209784: Include hsdis in the JDK [v2]

2022-03-02 Thread Erik Joelsson
On Wed, 2 Mar 2022 13:12:52 GMT, Magnus Ihse Bursie wrote: >> This PR adds a new configure argument, `--enable-hsdis-bundling`. Setting >> this, together with a valid backend using `--with-hsdis`, will bundle the >> generated hsdis library with the JDK. >> >> The PR also includes a

Re: RFR: 8209784: Include hsdis in the JDK [v2]

2022-03-02 Thread Magnus Ihse Bursie
> This PR adds a new configure argument, `--enable-hsdis-bundling`. Setting > this, together with a valid backend using `--with-hsdis`, will bundle the > generated hsdis library with the JDK. > > The PR also includes a refactoring of the hsdis handling in autoconf, > breaking it out to a