Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Emanuel Peter
On Mon, 18 Dec 2023 22:48:18 GMT, Kim Barrett wrote: >> @eme64 Is it feasible to split this up to solve each of the problems you >> identify in stages? There is also overlap here with JDK-8319709 IIUC. Thanks. > >> @dholmes-ora These are the "parts": >> >> 1. initialize up to capacity vs

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread David Holmes
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to >

Re: RFR: JDK-8322237: Heap dump contains duplicate thread records for mounted virtual threads

2023-12-18 Thread David Holmes
On Tue, 19 Dec 2023 04:09:47 GMT, Alex Menkov wrote: >> src/hotspot/share/services/heapDumper.cpp line 1647: >> >>> 1645: static bool is_vthread_mounted(oop vt) { >>> 1646: return JvmtiEnvBase::get_JavaThread_or_null(vt) != nullptr; >>> 1647: } >> >> It doesn't seem appropriate to

Re: RFR: JDK-8322237: Heap dump contains duplicate thread records for mounted virtual threads

2023-12-18 Thread Alex Menkov
On Tue, 19 Dec 2023 01:17:10 GMT, David Holmes wrote: >> HeapDumper dumps virtual threads in 2 places: >> - dumping platform threads (mounted virtual threads are dumped as separate >> thread object); >> - dumping heap objects when the object is `java.lang.VirtualThread`. >> >> In the 2nd case

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Kim Barrett
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to >

Re: RFR: JDK-8322237: Heap dump contains duplicate thread records for mounted virtual threads

2023-12-18 Thread David Holmes
On Sat, 16 Dec 2023 02:15:16 GMT, Alex Menkov wrote: > HeapDumper dumps virtual threads in 2 places: > - dumping platform threads (mounted virtual threads are dumped as separate > thread object); > - dumping heap objects when the object is `java.lang.VirtualThread`. > > In the 2nd case mounted

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v7]

2023-12-18 Thread Serguei Spitsyn
On Fri, 15 Dec 2023 10:49:56 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

RFR: JDK-8322237: Heap dump contains duplicate thread records for mounted virtual threads

2023-12-18 Thread Alex Menkov
HeapDumper dumps virtual threads in 2 places: - dumping platform threads (mounted virtual threads are dumped as separate thread object); - dumping heap objects when the object is `java.lang.VirtualThread`. In the 2nd case mounted virtual threads should be skipped (as they are already dumped

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Thomas Stuefe
On Mon, 18 Dec 2023 11:12:23 GMT, Joachim Kern wrote: >> src/hotspot/os/aix/porting_aix.cpp line 1097: >> >>> 1095: } >>> 1096: >>> 1097: pthread_mutex_lock(_handletable_mutex); >> >> You can make your life a lot easier by defining an RAII object at the start >> of the file: >> >>

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Martin Doerr
On Mon, 18 Dec 2023 10:25:57 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/os_aix.cpp line 1113: > >>

Re: RFR: 8314029: Add file name parameter to Compiler.perfmap [v8]

2023-12-18 Thread Chris Plummer
On Mon, 11 Dec 2023 22:41:56 GMT, Yi-Fan Tsai wrote: >> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: >> `/tmp/perf-%d.map`. This change adds an optional argument for specifying a >> file name. >> >> `jcmd PID help Compiler.perfmap` shows the following usage. >> >>

Re: RFR: 8314029: Add file name parameter to Compiler.perfmap [v8]

2023-12-18 Thread Paul Hohensee
On Mon, 11 Dec 2023 22:41:56 GMT, Yi-Fan Tsai wrote: >> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: >> `/tmp/perf-%d.map`. This change adds an optional argument for specifying a >> file name. >> >> `jcmd PID help Compiler.perfmap` shows the following usage. >> >>

Integrated: JDK-8322062: com/sun/jdi/JdwpAllowTest.java does not performs negative testing with prefix length

2023-12-18 Thread Alex Menkov
On Fri, 15 Dec 2023 19:43:36 GMT, Alex Menkov wrote: > The fix updated JdwpAllowTest to test negative scenarios (debugger tries to > attach from not allowed address). > > MaskTest ctor incorrectly calculates prefix length for negative tests and > test main() calls `positiveTest` instead of

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Thomas Stuefe
On Mon, 18 Dec 2023 10:35:48 GMT, Joachim Kern wrote: >> src/hotspot/os/aix/porting_aix.cpp line 990: >> >>> 988: if (env == nullptr) { >>> 989: // no LIBPATH, try with LD_LIBRARY_PATH >>> 990: env = getenv("LD_LIBRARY_PATH"); >> >> Is LD_LIBRARY_PATH a thing on AIX? I thought it is

Integrated: 8314029: Add file name parameter to Compiler.perfmap

2023-12-18 Thread Yi-Fan Tsai
On Thu, 21 Sep 2023 20:43:56 GMT, Yi-Fan Tsai wrote: > `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: > `/tmp/perf-%d.map`. This change adds an optional argument for specifying a > file name. > > `jcmd PID help Compiler.perfmap` shows the following usage. > > >

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Joachim Kern
On Mon, 18 Dec 2023 10:19:24 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/porting_aix.cpp line 1101: >

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Joachim Kern
On Mon, 18 Dec 2023 10:25:50 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/os_aix.cpp line 30: > >> 28:

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Joachim Kern
On Mon, 18 Dec 2023 10:16:07 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/porting_aix.cpp line 1005: >

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v6]

2023-12-18 Thread Thomas Stuefe
On Mon, 18 Dec 2023 11:30:59 GMT, Joachim Kern wrote: >> On AIX, repeated calls to dlopen referring to the same shared library may >> result in different, unique dl handles to be returned from libc. In that it >> differs from typical libc implementations that cache dl handles. >> >> This

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v8]

2023-12-18 Thread Serguei Spitsyn
> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 > time frame. > It is fixing a deadlock issue between `VirtualThread` class critical sections > with the `interruptLock` (in methods: `unpark()`, `interrupt()`, > `getAndClearInterrupt()`, `threadState()`,

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Joachim Kern
On Mon, 18 Dec 2023 10:54:31 GMT, Thomas Stuefe wrote: >> Yes it is, It's the fallback if LIBPATH is not defined > > In that case there may be errors in other places, since so far we assumed its > either one or the other, but not both. Example: > >

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v7]

2023-12-18 Thread Joachim Kern
> On AIX, repeated calls to dlopen referring to the same shared library may > result in different, unique dl handles to be returned from libc. In that it > differs from typical libc implementations that cache dl handles. > > This causes problems in the JVM with code that assumes equality of

Re: RFR: 8314029: Add file name parameter to Compiler.perfmap [v8]

2023-12-18 Thread Chris Plummer
On Mon, 11 Dec 2023 22:41:56 GMT, Yi-Fan Tsai wrote: >> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: >> `/tmp/perf-%d.map`. This change adds an optional argument for specifying a >> file name. >> >> `jcmd PID help Compiler.perfmap` shows the following usage. >> >>

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v6]

2023-12-18 Thread Joachim Kern
> On AIX, repeated calls to dlopen referring to the same shared library may > result in different, unique dl handles to be returned from libc. In that it > differs from typical libc implementations that cache dl handles. > > This causes problems in the JVM with code that assumes equality of

Re: RFR: 8314029: Add file name parameter to Compiler.perfmap [v8]

2023-12-18 Thread Paul Hohensee
On Mon, 11 Dec 2023 22:41:56 GMT, Yi-Fan Tsai wrote: >> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: >> `/tmp/perf-%d.map`. This change adds an optional argument for specifying a >> file name. >> >> `jcmd PID help Compiler.perfmap` shows the following usage. >> >>

Re: RFR: 8321404: Limit the number of heap dumps triggered by HeapDumpBeforeFullGC/AfterFullGC [v3]

2023-12-18 Thread Chris Plummer
On Sat, 16 Dec 2023 04:36:57 GMT, Denghui Dong wrote: >> Hi, >> >> Could I have a review of this patch? >> >> In the current implementation, HeapDumpBeforeFullGC/AfterFullGC will >> generate dumps for every FGC, increasing the risk of disk full. >> >> This patch introduces a new option

Re: RFR: 8320707: Virtual thread test updates

2023-12-18 Thread Chris Plummer
On Sat, 16 Dec 2023 17:25:20 GMT, Alan Bateman wrote: > A lot of test changes have accumulated in the loom repo, this includes both > new tests and updates to existing tests. Some of these updates can be brought > to the main line. This update brings over: > > - The existing tests for pinning

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v6]

2023-12-18 Thread Martin Doerr
On Mon, 18 Dec 2023 11:30:59 GMT, Joachim Kern wrote: >> On AIX, repeated calls to dlopen referring to the same shared library may >> result in different, unique dl handles to be returned from libc. In that it >> differs from typical libc implementations that cache dl handles. >> >> This

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Kim Barrett
On Mon, 18 Dec 2023 07:49:04 GMT, David Holmes wrote: >> Before this patch, we always initialized the GrowableArray up to its >> `capacity`, and not just up to `length`. This is problematic for a few >> reasons: >> >> - It is not expected. `std::vector` also only initializes the elements up

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Joachim Kern
On Mon, 18 Dec 2023 10:14:42 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/porting_aix.cpp line 990: > >>

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Thomas Stuefe
On Mon, 18 Dec 2023 10:06:34 GMT, Thomas Stuefe wrote: >> Joachim Kern has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - trailing whitespace >> - Following most of Thomas proposals > > src/hotspot/os/aix/porting_aix.cpp line 934: > >>

Re: RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v5]

2023-12-18 Thread Thomas Stuefe
On Fri, 15 Dec 2023 11:57:51 GMT, Joachim Kern wrote: >> On AIX, repeated calls to dlopen referring to the same shared library may >> result in different, unique dl handles to be returned from libc. In that it >> differs from typical libc implementations that cache dl handles. >> >> This

Re: RFR: 8321971: Improve the user name detection logic in perfMemory get_user_name_slow [v2]

2023-12-18 Thread Jaikiran Pai
On Mon, 18 Dec 2023 09:55:30 GMT, Johan Sjölen wrote: >> Jaikiran Pai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - David's review comments - reduce if blocks and release the array outside >> if block >> - David's review comment -

Re: RFR: 8321971: Improve the user name detection logic in perfMemory get_user_name_slow [v2]

2023-12-18 Thread Jaikiran Pai
On Fri, 15 Dec 2023 06:08:33 GMT, David Holmes wrote: >> Jaikiran Pai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - David's review comments - reduce if blocks and release the array outside >> if block >> - David's review comment -

Re: RFR: 8321971: Improve the user name detection logic in perfMemory get_user_name_slow [v2]

2023-12-18 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to improve the code > in `get_user_name_slow` function, which is used to identify the target JVM > owner's user name? This addresses https://bugs.openjdk.org/browse/JDK-8321971. > > As noted in that JBS issue, in its current form, the

Re: RFR: 8321971: Improve the user name detection logic in perfMemory get_user_name_slow

2023-12-18 Thread Johan Sjölen
On Thu, 14 Dec 2023 10:13:51 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to improve the code > in `get_user_name_slow` function, which is used to identify the target JVM > owner's user name? This addresses https://bugs.openjdk.org/browse/JDK-8321971. > >

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Emanuel Peter
On Mon, 18 Dec 2023 07:49:04 GMT, David Holmes wrote: >> Before this patch, we always initialized the GrowableArray up to its >> `capacity`, and not just up to `length`. This is problematic for a few >> reasons: >> >> - It is not expected. `std::vector` also only initializes the elements up