Integrated: 8265152: jpackage cleanup fails on Windows with IOException deleting msi

2021-04-19 Thread Yasumasa Suenaga
On Sun, 18 Apr 2021 12:44:17 GMT, Yasumasa Suenaga wrote: > When creating an "exe" installer on Windows, `AbstractBundler.cleanup()` > calls `IOUtils.deleteRecursive()` to delete the tmp directory. It can > intermittently fail trying to delete the msi file. > >

Re: ReversibleCollection proposal

2021-04-19 Thread forax
- Mail original - > De: "Stuart Marks" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Lundi 19 Avril 2021 17:41:11 > Objet: Re: ReversibleCollection proposal > On 4/17/21 9:49 AM, Remi Forax wrote: >> I think the analysis is spot on but I don't think the proposed solution is >> the

Re: RFR: 8199594: Add doc describing how (?x) ignores spaces in character classes [v2]

2021-04-19 Thread Ian Graves
> Clarifying note on comments mode to explicitly note that whitespace within > character classes is ignored. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Adding differences to Perl 5 note - Changes: - all:

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Rafael Winterhalter
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed

Re: RFR: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions=

2021-04-19 Thread Chris Plummer
On Sun, 18 Apr 2021 15:17:35 GMT, Erik Gahlin wrote: > Hi, > > Could I have a review of fix that removes the use of "=" together with > -XX:StartFlightRecording and -XX:FlightRecorderOptions. It's been possible to > use "-XX:StartFlightRecording:" and "-XX:FlightRecorderOption:" since JFR was

Re: RFR: 8199594: Add doc describing how (?x) ignores spaces in character classes

2021-04-19 Thread Ian Graves
On Mon, 19 Apr 2021 20:43:26 GMT, Ian Graves wrote: > Clarifying note on comments mode to explicitly note that whitespace within > character classes is ignored. Will put a /csr in to be safe. - PR: https://git.openjdk.java.net/jdk/pull/3577

Re: RFR: 8199594: Add doc describing how (?x) ignores spaces in character classes

2021-04-19 Thread Brian Burkhalter
On Mon, 19 Apr 2021 20:43:26 GMT, Ian Graves wrote: > Clarifying note on comments mode to explicitly note that whitespace within > character classes is ignored. Looks all right. Probably a CSR is in order. - Marked as reviewed by bpb (Reviewer). PR:

Re: ReversibleCollection proposal

2021-04-19 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "core-libs-dev" > Envoyé: Vendredi 16 Avril 2021 19:40:55 > Objet: ReversibleCollection proposal > This is a proposal to add a ReversibleCollection interface to the Collections > Framework. I'm looking for comments on overall design before I

RFR: 8199594: Add doc describing how (?x) ignores spaces in character classes

2021-04-19 Thread Ian Graves
Clarifying note on comments mode to explicitly note that whitespace within character classes is ignored. - Commit messages: - Note about comments mode and character class whitespace Changes: https://git.openjdk.java.net/jdk/pull/3577/files Webrev:

Re: RFR: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions=

2021-04-19 Thread Chris Plummer
On Sun, 18 Apr 2021 15:17:35 GMT, Erik Gahlin wrote: > Hi, > > Could I have a review of fix that removes the use of "=" together with > -XX:StartFlightRecording and -XX:FlightRecorderOptions. It's been possible to > use "-XX:StartFlightRecording:" and "-XX:FlightRecorderOption:" since JFR was

Re: ObjectMethods seems generating wrong methods for array-type field

2021-04-19 Thread Kengo TODA
Hello Rémi, Raffaello, Thanks for your reply. I got it. I knew that it's better to make Record classes immutable, and now learn one more new thing :) As suggested by Rémi, I'll read the amber-spec-experts mailing list. I want to grasp the reason to use invokedynamic in these methods. This is my

Re: RFR: 8265237: String.join and StringJoiner can be improved further [v3]

2021-04-19 Thread Roger Riggs
On Sun, 18 Apr 2021 19:55:20 GMT, Peter Levart wrote: >> While JDK-8148937 improved StringJoiner class by replacing internal use of >> getChars that copies out characters from String elements into a char[] array >> with StringBuilder which is somehow more optimal, the improvement was >>

Re: RFR: 8265237: String.join and StringJoiner can be improved further [v3]

2021-04-19 Thread Peter Levart
On Mon, 19 Apr 2021 10:44:04 GMT, Claes Redestad wrote: >> Peter Levart has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix overflow checking logic, add test for it, avoid branch in loop, add >> 1-char strings to JHM test > >

Integrated: 8263154: [macos] DMG builds have finder errors

2021-04-19 Thread Alexander Matveev
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any

Re: RFR: 8263154: [macos] DMG builds have finder errors

2021-04-19 Thread Alexey Semenyuk
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any

Re: RFR: 8263154: [macos] DMG builds have finder errors

2021-04-19 Thread Andy Herrick
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any

Re: RFR: 8265152: jpackage cleanup fails on Windows with IOException deleting msi

2021-04-19 Thread Alexey Semenyuk
On Sun, 18 Apr 2021 12:44:17 GMT, Yasumasa Suenaga wrote: > When creating an "exe" installer on Windows, `AbstractBundler.cleanup()` > calls `IOUtils.deleteRecursive()` to delete the tmp directory. It can > intermittently fail trying to delete the msi file. > >

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

2021-04-19 Thread Raffaello Giulietti
Hi Andrey, thanks for your careful reading. I'll keep a note and collect yours with changes coming from other reviewers before committing a larger batch of small changes. I would like to avoid wasting a lot of energy right now just to rebuild everything and to run the automatic tests on

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement [v2]

2021-04-19 Thread Rahul Yadav
On Mon, 19 Apr 2021 12:50:07 GMT, Christoph Göttschkes wrote: >> Please review the following patch, which fixes the mentioned test case for >> memory constrained devices. This can be tested on a linux based development >> machine, using systemd as follows: >> >> >> $ systemd-run --user

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v4]

2021-04-19 Thread Roger Riggs
On Mon, 19 Apr 2021 10:38:17 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request

Re: ReversibleCollection proposal

2021-04-19 Thread Stuart Marks
On 4/17/21 9:49 AM, Remi Forax wrote: I think the analysis is spot on but I don't think the proposed solution is the right one. Introducing a new interface (two in this case) has a really huge cost and in this case, i've trouble to see why i will want to write a method that takes a

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Alan Bateman
On 19/04/2021 15:10, Peter Levart wrote: : I hear Rafael that dynamic attach is important to support monitoring and instrumenting large numbers of JVMs with no preparations (i.e. without issueing special command-line options to enable it). As I understand, current attach mechanism is designed

RFR: 8183374: Refactor java/lang/Runtime shell tests to java

2021-04-19 Thread Fernando Guallini
Refactor the following shell tests to java: test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.sh test/jdk/java/lang/Runtime/exec/SetCwd.java In addition, the test SetCwd was running itself in separate java subprocesses in order to exercise Runtime.exec. It was creating a folder structure

Re: RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

2021-04-19 Thread Сергей Цыпанов
On Mon, 19 Apr 2021 14:45:58 GMT, Alan Bateman wrote: >> As discussed in https://github.com/openjdk/jdk/pull/3464 we can clean-up >> null-checks remaining after >> [8142968](https://bugs.openjdk.java.net/browse/JDK-8142968) as >> Class.getPackageName() never returns null. > >

Re: RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

2021-04-19 Thread Alan Bateman
On Mon, 19 Apr 2021 14:05:31 GMT, Сергей Цыпанов wrote: > As discussed in https://github.com/openjdk/jdk/pull/3464 we can clean-up > null-checks remaining after > [8142968](https://bugs.openjdk.java.net/browse/JDK-8142968) as > Class.getPackageName() never returns null.

Integrated: 8265135: Reduce work initializing VarForms

2021-04-19 Thread Claes Redestad
On Tue, 13 Apr 2021 18:11:37 GMT, Claes Redestad wrote: > This patch reduces work done initializing VarForms - mostly observed when > loading each VarHandle implementation class. > > - Lazily resolve MemberNames. > - Streamline MethodType creation. This reduces the number of MethodTypes >

Re: RFR: 8265135: Reduce work initializing VarForms [v5]

2021-04-19 Thread Claes Redestad
On Wed, 14 Apr 2021 21:26:52 GMT, Claes Redestad wrote: >> This patch reduces work done initializing VarForms - mostly observed when >> loading each VarHandle implementation class. >> >> - Lazily resolve MemberNames. >> - Streamline MethodType creation. This reduces the number of MethodTypes

Re: RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

2021-04-19 Thread Claes Redestad
On Mon, 19 Apr 2021 14:05:31 GMT, Сергей Цыпанов wrote: > As discussed in https://github.com/openjdk/jdk/pull/3464 we can clean-up > null-checks remaining after > [8142968](https://bugs.openjdk.java.net/browse/JDK-8142968) as > Class.getPackageName() never returns null. Looks good to me!

RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

2021-04-19 Thread Сергей Цыпанов
As discussed in https://github.com/openjdk/jdk/pull/3464 we can clean-up null-checks remaining after [8142968](https://bugs.openjdk.java.net/browse/JDK-8142968) as Class.getPackageName() never returns null. - Commit messages: - 8265418: Clean-up redundant null-checks of

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Peter Levart
On Mon, 19 Apr 2021 09:34:56 GMT, Alan Bateman wrote: > an application or library can use the attach mechanism (directly or via the > attach API in a child VM) to load an agent and leak the Instrumentation > object. This is the genie that somehow needs to be put back in its bottle. > One

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement [v2]

2021-04-19 Thread Aleksey Shipilev
On Mon, 19 Apr 2021 12:50:07 GMT, Christoph Göttschkes wrote: >> Please review the following patch, which fixes the mentioned test case for >> memory constrained devices. This can be tested on a linux based development >> machine, using systemd as follows: >> >> >> $ systemd-run --user

Re: RFR: 8263154: [macos] DMG builds have finder errors

2021-04-19 Thread Andy Herrick
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev wrote: > - Issue was reproducible when install-dir points to some invalid location. > - Fixed by defaulting DMG drag and drop location to /Applications folder and > --install-dir will be ignored with warning for DMG. > - I do not see any

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement [v2]

2021-04-19 Thread Jim Laskey
On Mon, 19 Apr 2021 12:50:07 GMT, Christoph Göttschkes wrote: >> Please review the following patch, which fixes the mentioned test case for >> memory constrained devices. This can be tested on a linux based development >> machine, using systemd as follows: >> >> >> $ systemd-run --user

Re: RFR: 8265152: jpackage cleanup fails on Windows with IOException deleting msi

2021-04-19 Thread Andy Herrick
On Sun, 18 Apr 2021 12:44:17 GMT, Yasumasa Suenaga wrote: > When creating an "exe" installer on Windows, `AbstractBundler.cleanup()` > calls `IOUtils.deleteRecursive()` to delete the tmp directory. It can > intermittently fail trying to delete the msi file. > >

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement [v2]

2021-04-19 Thread Christoph Göttschkes
> Please review the following patch, which fixes the mentioned test case for > memory constrained devices. This can be tested on a linux based development > machine, using systemd as follows: > > > $ systemd-run --user --scope -p MemoryMax=800M -p MemorySwapMax=0 > /usr/bin/make

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement [v2]

2021-04-19 Thread Christoph Göttschkes
On Mon, 19 Apr 2021 12:07:21 GMT, Aleksey Shipilev wrote: >> Christoph Göttschkes has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removes -Xmx2g for the first test case instance, which doesn't require a >> lot of memory. > >

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement

2021-04-19 Thread Aleksey Shipilev
On Mon, 19 Apr 2021 09:42:09 GMT, Christoph Göttschkes wrote: > Please review the following patch, which fixes the mentioned test case for > memory constrained devices. This can be tested on a linux based development > machine, using systemd as follows: > > > $ systemd-run --user --scope -p

Re: RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement

2021-04-19 Thread Jim Laskey
On Mon, 19 Apr 2021 09:42:09 GMT, Christoph Göttschkes wrote: > Please review the following patch, which fixes the mentioned test case for > memory constrained devices. This can be tested on a linux based development > machine, using systemd as follows: > > > $ systemd-run --user --scope -p

Integrated: 8265079: Implement VarHandle invoker caching

2021-04-19 Thread Jorn Vernee
On Mon, 12 Apr 2021 16:24:37 GMT, Jorn Vernee wrote: > This patch implements 2 leftover TODOs for implementing var handle invoker MH > caching (lambda forms for those were already shared/cached). > > This piggybacks on the existing mechanism for method handle invoker caching. > > Testing:

Re: RFR: 8265079: Implement VarHandle invoker caching [v3]

2021-04-19 Thread Jorn Vernee
On Wed, 14 Apr 2021 22:57:59 GMT, Mandy Chung wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comment: simplify test > > test/jdk/java/lang/invoke/TestVHInvokerCaching.java line 26: > >> 24: /* @test >> 25:

Re: RFR: 8265079: Implement VarHandle invoker caching [v4]

2021-04-19 Thread Jorn Vernee
> This patch implements 2 leftover TODOs for implementing var handle invoker MH > caching (lambda forms for those were already shared/cached). > > This piggybacks on the existing mechanism for method handle invoker caching. > > Testing: Local testing `java/lang/invoke` tests. Tier 1-3 > >

Re: RFR: 8265237: String.join and StringJoiner can be improved further [v3]

2021-04-19 Thread Claes Redestad
On Sun, 18 Apr 2021 19:55:20 GMT, Peter Levart wrote: >> While JDK-8148937 improved StringJoiner class by replacing internal use of >> getChars that copies out characters from String elements into a char[] array >> with StringBuilder which is somehow more optimal, the improvement was >>

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v4]

2021-04-19 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.time` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Patrick Concannon has updated the pull request with a new target base due to a merge or a rebase. The incremental

RFR: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions=

2021-04-19 Thread Erik Gahlin
Hi, Could I have a review of fix that removes the use of "=" together with -XX:StartFlightRecording and -XX:FlightRecorderOptions. It's been possible to use "-XX:StartFlightRecording:" and "-XX:FlightRecorderOption:" since JFR was introduced into OpenJDK (JDK 11), so this is not a change of

Re: How to know if cpu supports unaligned memory accesses ?

2021-04-19 Thread Laurent Bourgès
Thanks, Alan ! Probably I should adopt VarHandle and use their int / long views... (for jdk11u). Or adapt my arrays/off-heap buffers (struct like) using primitive objects JEP 401 for jdk17 ! It looks very promising as the Marlin renderer uses arrays of structs, packed in arrays or off-heap

RFR: 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement

2021-04-19 Thread Christoph Göttschkes
Please review the following patch, which fixes the mentioned test case for memory constrained devices. This can be tested on a linux based development machine, using systemd as follows: $ systemd-run --user --scope -p MemoryMax=800M -p MemorySwapMax=0 /usr/bin/make

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Alan Bateman
On Mon, 19 Apr 2021 09:11:34 GMT, Peter Levart wrote: > I think it would be easy to limit the use of this Instrumentation method to > the agent code as agent classes are loaded by the bootstrap classloader. > Simply make the method implementation caller-sensitive and check the caller > is

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Peter Levart
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Peter Levart
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-19 Thread Rafael Winterhalter
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed