Monitoring wrapped ThreadPoolExecutor returned from Executors

2021-01-05 Thread Tommy Ludwig
Hello, In the Micrometer project, we provide metrics instrumentation of `ExectorService`s. For `ThreadPoolExecutor`s, we track the number of completed tasks, active tasks, thread pool sizes, task queue size and remaining capacity via methods from `ThreadPoolExecutor`. We are currently using a b

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v3]

2021-01-05 Thread Igor Ignatyev
On Tue, 5 Jan 2021 20:58:37 GMT, Ivan Šipka wrote: >> test/jdk/java/lang/annotation/LoaderLeakTest.java line 54: >> >>> 52: List classes = List.of("A.class", "B.class", "C.class"); >>> 53: for (String fileName : classes) { >>> 54: Files.move( >> >> I don't think it's

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v3]

2021-01-05 Thread Ivan Šipka
On Fri, 11 Dec 2020 13:47:54 GMT, Igor Ignatyev wrote: >> Ivan Šipka has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8166026: Refactor java/lang shell tests to java > > test/jdk/java/lang/annotation/LoaderLeakTest.java line 54: > >> 52:

Re: [jdk16] RFR: 8259075: Update the copyright notice in the files generated by CLDR Converter tool

2021-01-05 Thread Joe Wang
On Tue, 5 Jan 2021 17:59:01 GMT, Naoto Sato wrote: > Please review this copyright notice update in the CLDR Converter tool. It is > now synched with src/java.base/share/legal/cldr.md file. Marked as reviewed by joehw (Reviewer). - PR: https://git.openjdk.java.net/jdk16/pull/85

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Uwe Schindler
On Tue, 5 Jan 2021 15:33:54 GMT, Maurizio Cimadamore wrote: > Hi, > this patch fixes an oversight where the address() method in > FileChannelImpl.Unmapper does not take into account the value of > `pagePosition` - this leads to a situation in which, effectively, the > specified offset when ma

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition [v2]

2021-01-05 Thread Alan Bateman
On Tue, 5 Jan 2021 17:28:10 GMT, Maurizio Cimadamore wrote: >> Hi, >> this patch fixes an oversight where the address() method in >> FileChannelImpl.Unmapper does not take into account the value of >> `pagePosition` - this leads to a situation in which, effectively, the >> specified offset wh

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v10]

2021-01-05 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at > http://cr.openjdk.java.net/~jlaskey/prng/doc/a

Re: RFR: 8166026: Refactor java/lang shell tests to java [v4]

2021-01-05 Thread Roger Riggs
On Mon, 4 Jan 2021 23:09:04 GMT, Roger Riggs wrote: >> Ivan Šipka has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8166026: Refactor java/lang shell tests to java >> - 8166026: Refactor java/lang shell tests to java > > Sorry I missed

Re: RFR: 8166026: refactor shell tests to java [v3]

2021-01-05 Thread Roger Riggs
On Thu, 3 Dec 2020 21:41:58 GMT, Roger Riggs wrote: >> Ivan Šipka has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8166026: Refactor java/lang shell tests to java > > Marked as reviewed by rriggs (Reviewer). Some update is needed before

Re: RFR: 4926314: Optimize Reader.read(CharBuffer)

2021-01-05 Thread Brian Burkhalter
> On Jan 5, 2021, at 9:53 AM, Philippe Marschall wrote: > >> How does the performance of `InputStreamReader.read(CharBuffer)` compare for >> the case where only the change to `Reader` is made versus if all your >> proposed changes are applied? > > I can look into this, this will take a momen

[jdk16] RFR: 8259075: Update the copyright notice in the files generated by CLDR Converter tool

2021-01-05 Thread Naoto Sato
Please review this copyright notice update in the CLDR Converter tool. It is now synched with src/java.base/share/legal/cldr.md file. - Commit messages: - 8259075: Update the copyright notice in the files generated by CLDR Converter tool Changes: https://git.openjdk.java.net/jdk16

Re: RFR: 4926314: Optimize Reader.read(CharBuffer)

2021-01-05 Thread Philippe Marschall
On 05.01.21 01:53, Brian Burkhalter wrote: ... I changed the JBS issue summary to match the title of this PR so that integration blocker is removed. Thank you. How does the performance of `InputStreamReader.read(CharBuffer)` compare for the case where only the change to `Reader` is made

[jdk16] Integrated: 8259213: Vector conversion with part > 0 is not getting intrinsic implementation

2021-01-05 Thread Sandhya Viswanathan
On Tue, 5 Jan 2021 01:03:55 GMT, Sandhya Viswanathan wrote: > Vector conversion with part > 0 is implemented using slice(origin, vector) > instead of slice(origin). > The slice(origin) has intrinsic implementation whereas slice(origin, vector) > doesn’t. > Slice(origin) is written using vector

Integrated: 8259021: SharedSecrets should avoid double racy reads from non-volatile fields

2021-01-05 Thread Peter Levart
On Thu, 31 Dec 2020 10:02:01 GMT, Peter Levart wrote: > See: https://bugs.openjdk.java.net/browse/JDK-8259021 > See also discussion in thread: > https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html This pull request has now been integrated. Changeset: 85bac8c4 Author

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-01-05 Thread Philippe Marschall
> Implement three optimiztations for Reader.read(CharBuffer) > > * Add a code path for heap buffers in Reader#read to use the backing array > instead of allocating a new one. > * Change the code path for direct buffers in Reader#read to limit the > intermediate allocation to `TRANSFER_BUFFER_SIZ

Re: [jdk16] RFR: 8259213: Vector conversion with part > 0 is not getting intrinsic implementation [v2]

2021-01-05 Thread Paul Sandoz
On Tue, 5 Jan 2021 15:51:08 GMT, Paul Sandoz wrote: >> Sandhya Viswanathan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update copyright year > > Looks good. Can you please update the copyright year before integrating? > > I notice t

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition [v2]

2021-01-05 Thread Maurizio Cimadamore
> Hi, > this patch fixes an oversight where the address() method in > FileChannelImpl.Unmapper does not take into account the value of > `pagePosition` - this leads to a situation in which, effectively, the > specified offset when mapping the segment is ignored by the runtime (because > base ad

Re: [jdk16] RFR: 8259213: Vector conversion with part > 0 is not getting intrinsic implementation [v2]

2021-01-05 Thread Sandhya Viswanathan
On Tue, 5 Jan 2021 15:51:08 GMT, Paul Sandoz wrote: >> Sandhya Viswanathan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update copyright year > > Looks good. Can you please update the copyright year before integrating? > > I notice t

Re: [jdk16] RFR: 8259213: Vector conversion with part > 0 is not getting intrinsic implementation [v2]

2021-01-05 Thread Sandhya Viswanathan
> Vector conversion with part > 0 is implemented using slice(origin, vector) > instead of slice(origin). > The slice(origin) has intrinsic implementation whereas slice(origin, vector) > doesn’t. > Slice(origin) is written using vector API methods like rearrange and blend > which all have intrins

[jdk16] Integrated: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0

2021-01-05 Thread Maurizio Cimadamore
On Tue, 5 Jan 2021 12:56:49 GMT, Maurizio Cimadamore wrote: > When the size of the memory map is zero, FileChannelImpl returns a `null` > Unmapper - this creates issues to the mapped memory segment implementation. > > To fix, I've created an empty mapped segment class which is initialized to

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Maurizio Cimadamore
On Tue, 5 Jan 2021 16:03:04 GMT, Uwe Schindler wrote: >> In fact the new test only checks if everything is aligned like we expect, >> but it does not test that our mapping returns a memory segment with expected >> contents. > > So I tend to make a simple test without reflection that writes a de

Withdrawn: 8066622 8066637: remove deprecated using java.io.File.toURL() in internal classes

2021-01-05 Thread Sebastian Ritter
On Sat, 7 Nov 2020 07:55:03 GMT, Sebastian Ritter wrote: > In result of Javadoc to do not use java.io.File.toURL() > Change use java.io.File.toURL().toURI() instead. This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/1108

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Uwe Schindler
On Tue, 5 Jan 2021 15:55:10 GMT, Uwe Schindler wrote: >> test/jdk/java/foreign/TestByteBuffer.java line 28: >> >>> 26: * @modules java.base/sun.nio.ch >>> 27: * jdk.incubator.foreign/jdk.internal.foreign >>> 28: * @run testng/othervm --illegal-access=permit >>> -Dforeign.restricted=

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Uwe Schindler
On Tue, 5 Jan 2021 16:01:11 GMT, Uwe Schindler wrote: >> I am not sure if a test like this is really needed. >> The alignment is pageSize on Linux and some arbitrary value (65536) on >> Windows. If you have some test file that writes like a few bytes (1, 2, 3, >> 4,...) To a file and then maps

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Uwe Schindler
On Tue, 5 Jan 2021 15:44:50 GMT, Alan Bateman wrote: >> Hi, >> this patch fixes an oversight where the address() method in >> FileChannelImpl.Unmapper does not take into account the value of >> `pagePosition` - this leads to a situation in which, effectively, the >> specified offset when mappi

Re: [jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0 [v2]

2021-01-05 Thread Uwe Schindler
On Tue, 5 Jan 2021 15:42:11 GMT, Maurizio Cimadamore wrote: >> When the size of the memory map is zero, FileChannelImpl returns a `null` >> Unmapper - this creates issues to the mapped memory segment implementation. >> >> To fix, I've created an empty mapped segment class which is initialized

Re: [jdk16] RFR: 8259213: Vector conversion with part > 0 is not getting intrinsic implementation

2021-01-05 Thread Paul Sandoz
On Tue, 5 Jan 2021 01:03:55 GMT, Sandhya Viswanathan wrote: > Vector conversion with part > 0 is implemented using slice(origin, vector) > instead of slice(origin). > The slice(origin) has intrinsic implementation whereas slice(origin, vector) > doesn’t. > Slice(origin) is written using vector

Re: [jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Alan Bateman
On Tue, 5 Jan 2021 15:33:54 GMT, Maurizio Cimadamore wrote: > Hi, > this patch fixes an oversight where the address() method in > FileChannelImpl.Unmapper does not take into account the value of > `pagePosition` - this leads to a situation in which, effectively, the > specified offset when ma

Re: [jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0 [v2]

2021-01-05 Thread Chris Hegarty
On Tue, 5 Jan 2021 15:42:11 GMT, Maurizio Cimadamore wrote: >> When the size of the memory map is zero, FileChannelImpl returns a `null` >> Unmapper - this creates issues to the mapped memory segment implementation. >> >> To fix, I've created an empty mapped segment class which is initialized

Re: [jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0 [v2]

2021-01-05 Thread Maurizio Cimadamore
> When the size of the memory map is zero, FileChannelImpl returns a `null` > Unmapper - this creates issues to the mapped memory segment implementation. > > To fix, I've created an empty mapped segment class which is initialized to > sensible defaults, and whose implenentation of force/load etc

[jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition

2021-01-05 Thread Maurizio Cimadamore
Hi, this patch fixes an oversight where the address() method in FileChannelImpl.Unmapper does not take into account the value of `pagePosition` - this leads to a situation in which, effectively, the specified offset when mapping the segment is ignored by the runtime (because base address will al

Re: [jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0

2021-01-05 Thread Maurizio Cimadamore
On Tue, 5 Jan 2021 14:00:44 GMT, Chris Hegarty wrote: >> When the size of the memory map is zero, FileChannelImpl returns a `null` >> Unmapper - this creates issues to the mapped memory segment implementation. >> >> To fix, I've created an empty mapped segment class which is initialized to >>

Re: [jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0

2021-01-05 Thread Chris Hegarty
On Tue, 5 Jan 2021 12:56:49 GMT, Maurizio Cimadamore wrote: > When the size of the memory map is zero, FileChannelImpl returns a `null` > Unmapper - this creates issues to the mapped memory segment implementation. > > To fix, I've created an empty mapped segment class which is initialized to

[jdk16] RFR: 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0

2021-01-05 Thread Maurizio Cimadamore
When the size of the memory map is zero, FileChannelImpl returns a `null` Unmapper - this creates issues to the mapped memory segment implementation. To fix, I've created an empty mapped segment class which is initialized to sensible defaults, and whose implenentation of force/load etc. do nothi

Re: [jdk16] RFR: 8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes [v2]

2021-01-05 Thread Rafael Winterhalter
> This change avoid that owner types of static nested classes are returned as > parameterized types. Rafael Winterhalter has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the P

[jdk16] RFR: 8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes

2021-01-05 Thread Rafael Winterhalter
This change avoid that owner types of static nested classes are returned as parameterized types. - Commit messages: - 8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes Changes: https://git.openjdk.java.net/jdk16/pull/82/files We

Re: java.io.Console (was: Is SharedSecrets thread-safe?)

2021-01-05 Thread Alan Bateman
On 04/01/2021 23:09, Johannes Kuhn wrote: : * java.io.Console has a nice API - but it only works (at least on Windows) if there is indeed a console attached. It usually doesn't work inside an IDE. Is there an interest to allow IDEs to create their own Console implementation, exposed through

Re: RFR: 8259021: SharedSecrets should avoid double racy reads from non-volatile fields [v2]

2021-01-05 Thread Alan Bateman
On Mon, 4 Jan 2021 14:27:09 GMT, Peter Levart wrote: >> See: https://bugs.openjdk.java.net/browse/JDK-8259021 >> See also discussion in thread: >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html > > Peter Levart has updated the pull request incrementally with one