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

2024-01-26 Thread Alexander Kriegisch
On Fri, 26 Jan 2024 12:27:02 GMT, Andrew Dinn wrote: > Luckily, you and your customers are not obliged to use the JPMS They are obliged to deal with it, and so am I as a tool maintainer. Just look the the approaches mentioned here. They all are in the category which in German we would call

Re: RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-26 Thread Alan Bateman
On Wed, 17 Jan 2024 23:41:53 GMT, Weijun Wang wrote: > This code change adds an alternative implementation of user-based > authorization `Subject` APIs that doesn't depend on Security Manager APIs. > Depending on if the Security Manager is allowed, the methods store the > current subject

RFR: 8296244: Alternate implementation of user-based authorization Subject APIs that doesn’t depend on Security Manager APIs

2024-01-26 Thread Weijun Wang
This code change adds an alternative implementation of user-based authorization `Subject` APIs that doesn't depend on Security Manager APIs. Depending on if the Security Manager is allowed, the methods store the current subject differently. See the spec change in the `Subject.java` file for

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

2024-01-26 Thread Jaikiran Pai
On Fri, 26 Jan 2024 17:29:10 GMT, Gerard Ziemski wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use the right include for rlim_t - > > src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 129: > >> 127:

Re: RFR: 8323680: SA PointerFinder code can do a better job of leveraging existing code to determine if an address is in the TLAB [v2]

2024-01-26 Thread Chris Plummer
On Fri, 26 Jan 2024 17:05:51 GMT, Kevin Walls wrote: > (Not critical, but maybe PointerLocation doesn't need the boolean inTlab. It > could use that its tlab is not null, like the isInHeap/stack/metadata checks > that something is not null.) Ok. I made that change. - PR Comment:

Re: RFR: 8323680: SA PointerFinder code can do a better job of leveraging existing code to determine if an address is in the TLAB [v2]

2024-01-26 Thread Chris Plummer
> In PointerFinder.java we have some code to determine if a pointer is in a > TLAB, but it only executes for the SerialGC. It should work for all GCs, so I > moved the code out of the SerialGC block. > > I also cleaned up the printing in PointerLocation. java a bit so when not > using verbose

Re: RFR: 8324681: Replace NULL with nullptr in HotSpot jtreg test native code files [v3]

2024-01-26 Thread Coleen Phillimore
> This mechanically replaces NULL with nullptr in hpp/cpp native files in test > native code. This didn't attempt to change NULL in comments or strings to > just null. If you run into this and it bothers you after this push, you can > change it in a smaller patch. I didn't see any when it was

Re: RFR: 8324681: Replace NULL with nullptr in HotSpot jtreg test native code files [v2]

2024-01-26 Thread Coleen Phillimore
> This mechanically replaces NULL with nullptr in hpp/cpp native files in test > native code. This didn't attempt to change NULL in comments or strings to > just null. If you run into this and it bothers you after this push, you can > change it in a smaller patch. I didn't see any when it was

RFR: 8324681: Replace NULL with nullptr in HotSpot jtreg test native code files

2024-01-26 Thread Coleen Phillimore
This mechanically replaces NULL with nullptr in hpp/cpp native files in test native code. This didn't attempt to change NULL in comments or strings to just null. If you run into this and it bothers you after this push, you can change it in a smaller patch. I didn't see any when it was

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

2024-01-26 Thread Gerard Ziemski
On Fri, 26 Jan 2024 15:57:57 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),

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

2024-01-26 Thread Gerard Ziemski
On Fri, 26 Jan 2024 15:57:57 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),

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

2024-01-26 Thread Gerard Ziemski
On Fri, 26 Jan 2024 15:57:57 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),

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

2024-01-26 Thread Gerard Ziemski
On Fri, 26 Jan 2024 15:57:57 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),

Re: RFR: 8323680: SA PointerFinder code can do a better job of leveraging existing code to determine if an address is in the TLAB

2024-01-26 Thread Kevin Walls
On Thu, 18 Jan 2024 22:54:26 GMT, Chris Plummer wrote: > In PointerFinder.java we have some code to determine if a pointer is in a > TLAB, but it only executes for the SerialGC. It should work for all GCs, so I > moved the code out of the SerialGC block. > > I also cleaned up the printing in

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

2024-01-26 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

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

2024-01-26 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

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

2024-01-26 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

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

2024-01-26 Thread Roger Riggs
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? > > The JVM can be launched with the `jdwp` agent, like > `-agentlib:jdwp=transport=xxx,server=y`. Among other options to

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

2024-01-26 Thread Jaikiran Pai
Can I please get a review of this change which proposes to address https://bugs.openjdk.org/browse/JDK-8324668? The JVM can be launched with the `jdwp` agent, like `-agentlib:jdwp=transport=xxx,server=y`. Among other options to the `jdwp` agentlib, one option is the `launch` option, which is

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

2024-01-26 Thread Jorn Vernee
On Fri, 26 Jan 2024 09:12:53 GMT, Alan Bateman wrote: > The target class is transformed in such a way to call the auxiliary class, > which necessitates the the aux-class to be in the same classloader as the > target class. But because the aux-class is defined while the target class is > still

Integrated: 8324241: Always record evol_method deps to avoid excessive method flushing

2024-01-26 Thread Volker Simonis
On Sat, 20 Jan 2024 19:48:07 GMT, Volker Simonis wrote: > Currently we don't record dependencies on redefined methods (i.e. > `evol_method` dependencies) in JIT compiled methods if none of the > `can_redefine_classes`, `can_retransform_classes` or > `can_generate_breakpoint_events` JVMTI

Re: RFR: 8324241: Always record evol_method deps to avoid excessive method flushing [v5]

2024-01-26 Thread Volker Simonis
> Currently we don't record dependencies on redefined methods (i.e. > `evol_method` dependencies) in JIT compiled methods if none of the > `can_redefine_classes`, `can_retransform_classes` or > `can_generate_breakpoint_events` JVMTI capabalities is set. This means that > if a JVMTI agent which

Re: RFR: 8324241: Always record evol_method deps to avoid excessive method flushing [v4]

2024-01-26 Thread Volker Simonis
On Fri, 26 Jan 2024 09:36:49 GMT, Aleksey Shipilev wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Made the flag experimental and added an assertion to >> set_can_hotswap_or_post_breakpoint() > >

Re: RFR: 8324241: Always record evol_method deps to avoid excessive method flushing [v4]

2024-01-26 Thread Volker Simonis
On Fri, 26 Jan 2024 09:33:17 GMT, Aleksey Shipilev wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Made the flag experimental and added an assertion to >> set_can_hotswap_or_post_breakpoint() > >

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

2024-01-26 Thread Andrew Dinn
On Fri, 26 Jan 2024 10:17:16 GMT, Alexander Kriegisch wrote: >>> @AlanBateman, the AspectJ weaving agent creates an auxiliary class to >>> implement an "around" advice for a method, i.e. a method execution is >>> intercepted and the user has options to do something before optionally >>>

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

2024-01-26 Thread Alexander Kriegisch
On Fri, 26 Jan 2024 09:12:53 GMT, Alan Bateman wrote: > load-time instrumentation that defines auxiliary classes in the same run-time > package is a reasonable addition Thanks for finding some common ground. I appreciate it. > The more general request for an "unrestricted defineClass"

Re: RFR: 8324241: Always record evol_method deps to avoid excessive method flushing [v4]

2024-01-26 Thread Aleksey Shipilev
On Wed, 24 Jan 2024 14:48:52 GMT, Volker Simonis wrote: >> Currently we don't record dependencies on redefined methods (i.e. >> `evol_method` dependencies) in JIT compiled methods if none of the >> `can_redefine_classes`, `can_retransform_classes` or >> `can_generate_breakpoint_events` JVMTI

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

2024-01-26 Thread Martin Doerr
On Tue, 16 Jan 2024 08:36:49 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

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

2024-01-26 Thread Alan Bateman
On Fri, 26 Jan 2024 08:27:41 GMT, Alan Bateman wrote: >>> BB currently opens the jdk.internal.misc.Unsafe class to a module on a >>> seperate class loader that is not reachable outside an agent, using >>> Instrumentation. >> >> @raphw, may I ask how? Is there any sample code that is not

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

2024-01-26 Thread Alexander Kriegisch
On Fri, 26 Jan 2024 08:27:41 GMT, Alan Bateman wrote: >>> BB currently opens the jdk.internal.misc.Unsafe class to a module on a >>> seperate class loader that is not reachable outside an agent, using >>> Instrumentation. >> >> @raphw, may I ask how? Is there any sample code that is not

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

2024-01-26 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: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2024-01-26 Thread Alan Bateman
On Fri, 26 Jan 2024 08:01:59 GMT, Alexander Kriegisch wrote: > > BB currently opens the jdk.internal.misc.Unsafe class to a module on a > > seperate class loader that is not reachable outside an agent, using > > Instrumentation. > > @raphw, may I ask how? Is there any sample code that is not

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

2024-01-26 Thread Thomas Stuefe
On Thu, 25 Jan 2024 11:04:03 GMT, Suchismith Roy wrote: > > For me the unresolved question is still: > > > > * do we want an unconditional load of *.a for a given *.so (have yet to see > > any documentation for this a-file duality) > > Yes. The documentation link - >

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

2024-01-26 Thread Alexander Kriegisch
On Thu, 25 Jan 2024 12:16:13 GMT, Rafael Winterhalter wrote: > BB currently opens the jdk.internal.misc.Unsafe class to a module on a > seperate class loader that is not reachable outside an agent, using > Instrumentation. @raphw, may I ask how? Is there any sample code that is not connected

Integrated: JDK-8324637: [aix] Implement support for reporting swap space in jdk.management

2024-01-26 Thread Matthias Baesken
On Thu, 25 Jan 2024 12:30:15 GMT, Matthias Baesken wrote: > The get_total_or_available_swap_space_size coding misses AIX support, we only > return 0. This should be enhanced. > The perfstat API can be used, see >