Re: RFR: 8325055: Rename Injector.h [v2]

2024-01-31 Thread David Holmes
On Wed, 31 Jan 2024 15:15:16 GMT, Kim Barrett wrote: >> Please review this trivial change that renames the file >> test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.h to Injector.hpp. >> >> Testing: mach5 tier1 > > Kim Barrett has updated the pull request incrementally with one additional

Re: RFR: 8324845: management.properties text "interface name" is misleading [v2]

2024-01-31 Thread Alan Bateman
On Wed, 31 Jan 2024 21:29:14 GMT, Kevin Walls wrote: >> We have the text "host-or-interface-name" describing the >> com.sun.management.jmxremote.host property in management.properties, but >> interface names (like "eth0" or "lo", or "ens3"...) are not what it accepts. >> It should just say it

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-31 Thread Jaikiran Pai
On Thu, 1 Feb 2024 05:42:07 GMT, David Holmes wrote: >> Hello David, I had actually first put it in that line you noted, but that >> then lead to a compilation error: >> >> >> In file included from >> /jdk/src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c:33: >> /jdk/src/jdk.jdwp.agent/share/n

Integrated: 8324668: JDWP process management needs more efficient file descriptor handling

2024-01-31 Thread Jaikiran Pai
On Fri, 26 Jan 2024 14:52:49 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8324668? > > This change proposes to fix the issue in jdwp where when launching a child > process (for the `launch=` option), it iter

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-31 Thread David Holmes
On Wed, 31 Jan 2024 07:52:18 GMT, Jaikiran Pai wrote: >> src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 35: >> >>> 33: #include "sys.h" >>> 34: #include "util.h" >>> 35: #include "error_messages.h" >> >> Nit: to maintain include sort order this should have gone where >> `log_messages.h`

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v7]

2024-01-31 Thread David Holmes
On Wed, 31 Jan 2024 08:01:15 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option), it

Re: RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock

2024-01-31 Thread David Holmes
On Wed, 31 Jan 2024 18:57:23 GMT, Coleen Phillimore wrote: > This change uses a claim token to allocate multi dimensional arrays rather > than holding MultiArray_lock around metaspace allocation. We can't hold a > mutex around metaspace allocation because it can create an OOM object and it >

Re: RFR: 8313710: jcmd: typo in the documentation of JFR.start and JFR.dump [v3]

2024-01-31 Thread David Holmes
On Wed, 31 Jan 2024 06:41:44 GMT, Taizo Kurashige wrote: >> Changes requested by dholmes (Reviewer). > > @dholmes-ora @egahlin > > I'm sorry that my slow response has prolonged this issue. I created a subtask > and modified the source. If possible, please review them. Thanks @kurashige23 , th

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v13]

2024-01-31 Thread Martin Doerr
On Thu, 1 Feb 2024 04:13:52 GMT, Martin Doerr wrote: >> I didn't follow that. You mean i need to keep a check if it is null and >> print it out ? > > An assertion is only used for debug builds. Such an error should be handled > in product builds as well. I think an attempt to load an invalid li

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v13]

2024-01-31 Thread Martin Doerr
On Wed, 31 Jan 2024 15:06:54 GMT, Suchismith Roy wrote: >> src/hotspot/os/aix/os_aix.cpp line 1176: >> >>> 1174: strncpy(file_path,filename, buffer_length + 1); >>> 1175: char* const pointer_to_dot = strrchr(file_path, '.'); >>> 1176: assert(pointer_to_dot != nullptr, "Attempting to load a

Re: RFR: JDK-8317636: Improve heap walking API tests to verify correctness of field indexes [v2]

2024-01-31 Thread Chris Plummer
On Thu, 1 Feb 2024 01:38:21 GMT, Alex Menkov wrote: >> The fix adds new test for FollowReferences JVMTI function to verify >> correctness of reported field indexes. > > Alex Menkov has updated the pull request incrementally with one additional > commit since the last revision: > > feedback

Re: RFR: JDK-8317636: Improve heap walking API tests to verify correctness of field indexes [v2]

2024-01-31 Thread Alex Menkov
On Thu, 1 Feb 2024 00:17:57 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> feedback > > test/hotspot/jtreg/serviceability/jvmti/FollowReferences/FieldIndices/libFieldIndicesTest.cpp > line 93: >

Re: RFR: JDK-8317636: Improve heap walking API tests to verify correctness of field indexes [v2]

2024-01-31 Thread Alex Menkov
> The fix adds new test for FollowReferences JVMTI function to verify > correctness of reported field indexes. Alex Menkov has updated the pull request incrementally with one additional commit since the last revision: feedback - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v4]

2024-01-31 Thread Alex Menkov
On Wed, 31 Jan 2024 23:07:16 GMT, Chris Plummer wrote: >> I noticed that "clhsdb jstack" seemed to hang when I attached to process >> with a somewhat large heap. It had taken over 10 minutes when I finally >> decided to have a look at the SA process (using bin/jstack), which came up >> with th

Re: RFR: JDK-8317636: Improve heap walking API tests to verify correctness of field indexes

2024-01-31 Thread Chris Plummer
On Thu, 25 Jan 2024 23:05:19 GMT, Alex Menkov wrote: > The fix adds new test for FollowReferences JVMTI function to verify > correctness of reported field indexes. test/hotspot/jtreg/serviceability/jvmti/FollowReferences/FieldIndices/libFieldIndicesTest.cpp line 93: > 91: > 92: /* > 93: Per

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v3]

2024-01-31 Thread Alex Menkov
On Wed, 31 Jan 2024 04:34:52 GMT, Chris Plummer wrote: >> test/hotspot/jtreg/serviceability/sa/ClhsdbJstackWithConcurrentLock.java >> line 65: >> >>> 63: for (String line : lines) { >>> 64: if (line.contains(key)) { >>> 65: String[] words = line.s

Re: RFR: JDK-8318566: Heap walking functions should not use FilteredFieldStream

2024-01-31 Thread Chris Plummer
On Wed, 31 Jan 2024 21:28:34 GMT, Alex Menkov wrote: > FilteredFieldStream used by heap walking functions to iterate through > klass/superclasses/interfaces fields are known to have poor performance (see > [JDK-8317692](https://bugs.openjdk.org/browse/JDK-8317692) for details). > Heap walking A

Re: RFR: 8324845: management.properties text "interface name" is misleading [v2]

2024-01-31 Thread Mandy Chung
On Wed, 31 Jan 2024 21:29:14 GMT, Kevin Walls wrote: >> We have the text "host-or-interface-name" describing the >> com.sun.management.jmxremote.host property in management.properties, but >> interface names (like "eth0" or "lo", or "ens3"...) are not what it accepts. >> It should just say it

Re: RFR: 8324066: "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow [v4]

2024-01-31 Thread Chris Plummer
> I noticed that "clhsdb jstack" seemed to hang when I attached to process with > a somewhat large heap. It had taken over 10 minutes when I finally decided to > have a look at the SA process (using bin/jstack), which came up with the > following in the stack: > > > at > sun.jvm.hotspot.oops.

RFR: JDK-8318566: Heap walking functions should not use FilteredFieldStream

2024-01-31 Thread Alex Menkov
FilteredFieldStream used by heap walking functions to iterate through klass/superclasses/interfaces fields are known to have poor performance (see [JDK-8317692](https://bugs.openjdk.org/browse/JDK-8317692) for details). Heap walking API implementation is the last user of the klasses. The fix rewo

Re: RFR: 8324845: management.properties text "interface name" is misleading [v2]

2024-01-31 Thread Kevin Walls
On Mon, 29 Jan 2024 15:24:45 GMT, Alan Bateman wrote: >> Kevin Walls has updated the pull request incrementally with one additional >> commit since the last revision: >> >> text update > > src/jdk.management.agent/share/conf/management.properties line 258: > >> 256: # >> 257: # com.sun.manag

Re: RFR: 8324845: management.properties text "interface name" is misleading [v2]

2024-01-31 Thread Kevin Walls
> We have the text "host-or-interface-name" describing the > com.sun.management.jmxremote.host property in management.properties, but > interface names (like "eth0" or "lo", or "ens3"...) are not what it accepts. > It should just say it needs to be a host name or address. > > This change only

Re: RFR: 8309271: A way to align already compiled methods with compiler directives [v25]

2024-01-31 Thread Dmitry Chuyko
> Compiler Control (https://openjdk.org/jeps/165) provides method-context > dependent control of the JVM compilers (C1 and C2). The active directive > stack is built from the directive files passed with the > `-XX:CompilerDirectivesFile` diagnostic command-line option and the > Compiler.add_dir

RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock

2024-01-31 Thread Coleen Phillimore
This change uses a claim token to allocate multi dimensional arrays rather than holding MultiArray_lock around metaspace allocation. We can't hold a mutex around metaspace allocation because it can create an OOM object and it can also call into JVMTI for a resource exhausted event. Also, we we

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v7]

2024-01-31 Thread Gerard Ziemski
On Wed, 31 Jan 2024 08:01:15 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option), it

Re: RFR: 8325055: Rename Injector.h [v2]

2024-01-31 Thread Kim Barrett
> Please review this trivial change that renames the file > test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.h to Injector.hpp. > > Testing: mach5 tier1 Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: fix name in README ---

RFR: 8325055: Rename Injector.h

2024-01-31 Thread Kim Barrett
Please review this trivial change that renames the file test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.h to Injector.hpp. Testing: mach5 tier1 - Commit messages: - rename Injector.h Changes: https://git.openjdk.org/jdk/pull/17656/files Webrev: https://webrevs.openjdk.org/?

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v13]

2024-01-31 Thread Suchismith Roy
On Wed, 31 Jan 2024 13:20:52 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> spelling > > src/hotspot/os/aix/os_aix.cpp line 1176: > >> 1174: strncpy(file_path,filename, buffer_length + 1); >

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v13]

2024-01-31 Thread Martin Doerr
On Wed, 31 Jan 2024 13:17:21 GMT, Suchismith Roy wrote: >> J2SE agent does not start and throws error when it tries to find the shared >> library ibm_16_am. >> After searching for ibm_16_am.so ,the jvm agent throws and error as dll_load >> fails.It fails to identify the shared library ibm_16_am

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v13]

2024-01-31 Thread Suchismith Roy
> J2SE agent does not start and throws error when it tries to find the shared > library ibm_16_am. > After searching for ibm_16_am.so ,the jvm agent throws and error as dll_load > fails.It fails to identify the shared library ibm_16_am.a shared archive file > on AIX. > Hence we are providing a f

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v12]

2024-01-31 Thread Suchismith Roy
> J2SE agent does not start and throws error when it tries to find the shared > library ibm_16_am. > After searching for ibm_16_am.so ,the jvm agent throws and error as dll_load > fails.It fails to identify the shared library ibm_16_am.a shared archive file > on AIX. > Hence we are providing a f

Re: RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v11]

2024-01-31 Thread Joachim Kern
On Wed, 31 Jan 2024 07:42:49 GMT, Suchismith Roy wrote: >> src/hotspot/os/aix/os_aix.cpp line 1166: >> >>> 1164: Search order: >>> 1165: libfilename-> load "libfilename.so" first,then load libfilename.a,on >>> failure. >>> 1166: In,OpenJ9,the libary with .so extension is loaded first and th

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v7]

2024-01-31 Thread Jaikiran Pai
On Wed, 31 Jan 2024 08:01:15 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8324668? >> >> This change proposes to fix the issue in jdwp where when launching a child >> process (for the `launch=` option), it

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-31 Thread Sebastian Lövdahl
On Wed, 31 Jan 2024 10:01:37 GMT, Severin Gehwolf wrote: > Thanks! Please make sure that the tests actually ran. If, for example, docker > is not installed, they get skipped. Ah, good point. Running the tests did take some amount of time, so it felt like they did something. And by spamming `do

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-31 Thread Severin Gehwolf
On Tue, 30 Jan 2024 13:57:43 GMT, Severin Gehwolf wrote: >> 8307977: jcmd and jstack broken for target processes running with elevated >> capabilities > > `test/hotspot/jtreg/serviceability` tests would also be worth running. > Hi @jerboaa, thanks a lot for the hints! The container tests were n

Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-01-31 Thread Matthias Baesken
On Tue, 30 Jan 2024 14:15:57 GMT, Magnus Ihse Bursie wrote: >> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we >> should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK >> native libraries. > > Magnus Ihse Bursie has updated the pull request with a

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-31 Thread Sebastian Lövdahl
On Tue, 30 Jan 2024 17:00:16 GMT, Bernd Eckenfels wrote: > Is that actually safe to allow low priveledged user context to attach and > control to a higher prived? It can at least overwrite files, but probably > also inject code? On the native level a ptrace(2) would probably not be > allowed.

Re: RFR: 8307977: jcmd and jstack broken for target processes running with elevated capabilities

2024-01-31 Thread Sebastian Lövdahl
On Tue, 30 Jan 2024 13:57:43 GMT, Severin Gehwolf wrote: >> 8307977: jcmd and jstack broken for target processes running with elevated >> capabilities > > `test/hotspot/jtreg/serviceability` tests would also be worth running. Hi @jerboaa, thanks a lot for the hints! The container tests were new

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v7]

2024-01-31 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8324668? > > This change proposes to fix the issue in jdwp where when launching a child > process (for the `launch=` option), it iterates over an extremely large > number of file descripto

Re: RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v6]

2024-01-31 Thread Jaikiran Pai
On Wed, 31 Jan 2024 06:28:05 GMT, David Holmes wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Chris' review suggestion - replace LOG_MISC with ERROR_MESSAGE > > src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c lin