Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v9]

2023-09-20 Thread Chen Liang
On Wed, 28 Jun 2023 07:02:17 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >> 2.

Re: RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v6]

2023-09-20 Thread Axel Boldt-Christmas
On Thu, 21 Sep 2023 06:11:42 GMT, Axel Boldt-Christmas wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectSynchronizer.java >> line 86: >> >>> 84: >>> 85: ObjectMonitorIterator() { >>> 86: mon = new ObjectMonitor(inUseList); >> >> How did this ever work? `i

Re: RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v5]

2023-09-20 Thread Axel Boldt-Christmas
On Tue, 19 Sep 2023 22:19:06 GMT, Chris Plummer wrote: >> Axel Boldt-Christmas has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed unnecessary comment > > test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicSharedSymbols.java

Re: RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v6]

2023-09-20 Thread Axel Boldt-Christmas
> ObjectMonitorIterator fails to return the most resent monitor added. It start > with returning the `nextOM()` ObjectMonitor from the `_head` ObjectMonitor > but fails to ever return the `_head` ObjectMonitor. > The current implementation can also not handle that the `_head` is nullptr > (no mo

Re: RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v5]

2023-09-20 Thread Axel Boldt-Christmas
On Wed, 20 Sep 2023 22:37:59 GMT, Chris Plummer wrote: >> Axel Boldt-Christmas has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed unnecessary comment > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectSynchronizer

Integrated: 8308762: Metaspace leak with Instrumentation.retransform

2023-09-20 Thread Jean-Philippe Bempel
On Thu, 6 Jul 2023 05:18:01 GMT, Jean-Philippe Bempel wrote: > Fix a small leak in constant pool merging during retransformation of a class. > If this class has a catch block with `Throwable`, the class `Throwable` is > pre-resolved in the constant pool, while all the other classes are in a >

Re: RFR: 8308762: Metaspace leak with Instrumentation.retransform [v7]

2023-09-20 Thread Jean-Philippe Bempel
On Wed, 20 Sep 2023 16:13:50 GMT, Jean-Philippe Bempel wrote: >> Fix a small leak in constant pool merging during retransformation of a >> class. If this class has a catch block with `Throwable`, the class >> `Throwable` is pre-resolved in the constant pool, while all the other >> classes are

Re: RFR: 8314021: HeapDump: Optimize segmented heap file merging phase [v2]

2023-09-20 Thread Yi Yang
On Thu, 21 Sep 2023 01:18:19 GMT, David Holmes wrote: > I had not noticed this PR sorry. I do not like the fact we have Linux-only > functionality being added with no intent to supply similar functionality on > other platforms. I also do not like the fact we had to ifdef the Linux code > into

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v7]

2023-09-20 Thread Chris Plummer
On Thu, 21 Sep 2023 00:49:45 GMT, Liam Miller-Cushon wrote: >> Please consider this fix for >> [JDK-8313804](https://bugs.openjdk.org/browse/JDK-8313804), which adds >> support to JDWP for `-Djava.net.preferIPv6Addresses=system`. Previously it >> only handled `-Djava.net.preferIPv6Addresses=tr

Re: RFR: 8314021: HeapDump: Optimize segmented heap file merging phase [v2]

2023-09-20 Thread David Holmes
On Thu, 7 Sep 2023 02:19:10 GMT, Yi Yang wrote: >> This patch reduce ~16%(24s->20s) pahse 2 merge time during dumping 32g heap >> with 96threads and fixes a memory leak of compressor >> >> You might argue why this is Linux-only optimization, because sendfile >> requires at least socket fd in o

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v7]

2023-09-20 Thread Liam Miller-Cushon
> Please consider this fix for > [JDK-8313804](https://bugs.openjdk.org/browse/JDK-8313804), which adds > support to JDWP for `-Djava.net.preferIPv6Addresses=system`. Previously it > only handled `-Djava.net.preferIPv6Addresses=true` and > `-Djava.net.preferIPv6Addresses=false`. Liam Miller-Cu

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v6]

2023-09-20 Thread Liam Miller-Cushon
On Wed, 20 Sep 2023 20:36:20 GMT, Chris Plummer wrote: > It seems like the "IPv6-only system" part of the test should include more > test cases, both passing and failing. I'm not sure why it was lmitted to just > the one: I have added additional test cases > Does this test guarantee that "sys

Re: RFR: 8308762: Metaspace leak with Instrumentation.retransform [v7]

2023-09-20 Thread David Holmes
On Wed, 20 Sep 2023 16:13:50 GMT, Jean-Philippe Bempel wrote: >> Fix a small leak in constant pool merging during retransformation of a >> class. If this class has a catch block with `Throwable`, the class >> `Throwable` is pre-resolved in the constant pool, while all the other >> classes are

Re: RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v5]

2023-09-20 Thread Chris Plummer
On Tue, 19 Sep 2023 09:25:33 GMT, Axel Boldt-Christmas wrote: >> ObjectMonitorIterator fails to return the most resent monitor added. It >> start with returning the `nextOM()` ObjectMonitor from the `_head` >> ObjectMonitor but fails to ever return the `_head` ObjectMonitor. >> The current imp

Re: RFR: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless [v2]

2023-09-20 Thread Chris Plummer
On Wed, 20 Sep 2023 22:06:10 GMT, Leonid Mesnik wrote: >> Test >> com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java >> check how beans work with VM flags and ignore external flags. >> It doesn't make sense to run it with external options so just mark it as >> flagless. >> Tested with r

Re: RFR: 8299560: Assertion failed: currentQueryIndex >= 0 && currentQueryIndex < numberOfJavaProcessesAtInitialization

2023-09-20 Thread Leonid Mesnik
On Thu, 14 Sep 2023 17:24:39 GMT, Kevin Walls wrote: > This assert happens rarely, but is seen in testing a few times. > > getCurrentQueryIndexForProcess comments that it can return -1, but it asserts > that the value is >=0 > > If we let it return -1 for failure as its comment documents, the

Re: RFR: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless

2023-09-20 Thread Leonid Mesnik
On Tue, 19 Sep 2023 17:24:15 GMT, Leonid Mesnik wrote: > Test > com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java > check how beans work with VM flags and ignore external flags. > It doesn't make sense to run it with external options so just mark it as > flagless. > Tested with running

Re: RFR: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless [v2]

2023-09-20 Thread Leonid Mesnik
> Test > com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java > check how beans work with VM flags and ignore external flags. > It doesn't make sense to run it with external options so just mark it as > flagless. > Tested with running tier1 and test with/without additional options. Leonid

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v6]

2023-09-20 Thread Chris Plummer
On Wed, 20 Sep 2023 16:28:00 GMT, Liam Miller-Cushon wrote: >> Please consider this fix for >> [JDK-8313804](https://bugs.openjdk.org/browse/JDK-8313804), which adds >> support to JDWP for `-Djava.net.preferIPv6Addresses=system`. Previously it >> only handled `-Djava.net.preferIPv6Addresses=tr

Integrated: 8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829

2023-09-20 Thread Leonid Mesnik
On Wed, 20 Sep 2023 03:56:28 GMT, Leonid Mesnik wrote: > Test start failing because of unexpected VM logging. > The fix is to search expected string ignoring any unknown output from forked > process. > Tested with tier1 and by running test with various options used in CI. This pull request has

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v3]

2023-09-20 Thread Liam Miller-Cushon
On Wed, 20 Sep 2023 00:18:59 GMT, Alex Menkov wrote: > I took some time to understand what this code for. I think the condition is > not correct. it should be > > ``` > if (!allowOnlyIPv4) { > ``` > > allowOnlyIPv4 (reflects "java.net.preferIPv4Stack" sys.prop) means that only > IPv4 connecti

Re: RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v6]

2023-09-20 Thread Liam Miller-Cushon
> Please consider this fix for > [JDK-8313804](https://bugs.openjdk.org/browse/JDK-8313804), which adds > support to JDWP for `-Djava.net.preferIPv6Addresses=system`. Previously it > only handled `-Djava.net.preferIPv6Addresses=true` and > `-Djava.net.preferIPv6Addresses=false`. Liam Miller-Cu

Re: RFR: 8308762: Metaspace leak with Instrumentation.retransform [v7]

2023-09-20 Thread Jean-Philippe Bempel
> Fix a small leak in constant pool merging during retransformation of a class. > If this class has a catch block with `Throwable`, the class `Throwable` is > pre-resolved in the constant pool, while all the other classes are in a > unresolved state. So the constant pool merging process was cons

Re: RFR: 8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829

2023-09-20 Thread Daniel D . Daugherty
On Wed, 20 Sep 2023 03:56:28 GMT, Leonid Mesnik wrote: > Test start failing because of unexpected VM logging. > The fix is to search expected string ignoring any unknown output from forked > process. > Tested with tier1 and by running test with various options used in CI. Thumbs up. Please inte

Integrated: 8315880: change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT

2023-09-20 Thread Daniel D . Daugherty
On Mon, 18 Sep 2023 20:47:13 GMT, Daniel D. Daugherty wrote: > Change the default of LockingMode to LM_LIGHTWEIGHT from LM_LEGACY. > > This fix has been tested with 3 Mach5 Tier[1-8] runs and a 4th is in process. This pull request has now been integrated. Changeset: 455cfae1 Author:Daniel

Re: RFR: 8308762: Metaspace leak with Instrumentation.retransform [v6]

2023-09-20 Thread Coleen Phillimore
On Thu, 3 Aug 2023 08:43:12 GMT, Jean-Philippe Bempel wrote: >> Fix a small leak in constant pool merging during retransformation of a >> class. If this class has a catch block with `Throwable`, the class >> `Throwable` is pre-resolved in the constant pool, while all the other >> classes are

Re: RFR: 8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829

2023-09-20 Thread Kevin Walls
On Wed, 20 Sep 2023 03:56:28 GMT, Leonid Mesnik wrote: > Test start failing because of unexpected VM logging. > The fix is to search expected string ignoring any unknown output from forked > process. > Tested with tier1 and by running test with various options used in CI. Marked as reviewed by

Re: RFR: 8315966: Relativize initial_sp in interpreter frames

2023-09-20 Thread Martin Doerr
On Tue, 19 Sep 2023 09:00:01 GMT, Fredrik Bredberg wrote: > Relativize initial_sp in interpreter frames. > > By changing the "initial_sp" (AKA "monitor_block_top" or "monitors" on > PowerPC) member in interpreter frames from being an absolute address into an > offset that is relative to the f

Re: RFR: 8315966: Relativize initial_sp in interpreter frames

2023-09-20 Thread Fei Yang
On Tue, 19 Sep 2023 09:00:01 GMT, Fredrik Bredberg wrote: > Relativize initial_sp in interpreter frames. > > By changing the "initial_sp" (AKA "monitor_block_top" or "monitors" on > PowerPC) member in interpreter frames from being an absolute address into an > offset that is relative to the f

Re: RFR: 8308762: Metaspace leak with Instrumentation.retransform [v6]

2023-09-20 Thread Jean-Philippe Bempel
On Wed, 20 Sep 2023 00:05:01 GMT, David Holmes wrote: > Is it simply setting metaspace size small enough that the 500 iterations > would exhaust metaspace if there were a leak? yes exactly. with a leak you end up with `OutOfMemoryError: metaspace` running the test - PR Review Co

Withdrawn: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties

2023-09-20 Thread Matthias Baesken
On Fri, 8 Sep 2023 08:26:16 GMT, Matthias Baesken wrote: > There are some remaining places in 'general' JDK code (= code not related to > e.g. a specific tool) getting properties like : > > osName = System.getProperty(os.name) > > https://github.com/openjdk/jdk/blob/master/src/java.management/