Re: RFR: JDK-8306441: Segmented heap dump [v5]

2023-05-14 Thread Yi Yang
On Wed, 10 May 2023 08:29:43 GMT, Yi Yang wrote: >> Hi, heap dump brings about pauses for application's execution(STW), this is >> a well-known pain. JDK-8252842 have added parallel support to heapdump in an >> attempt to alleviate this issue. However, all concurrent threads >> competitively w

Re: [External] : Re: New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents

2023-05-14 Thread Alan Snyder
> On May 14, 2023, at 6:07 PM, Ron Pressler wrote: > > You can continue using JNI, but the application on newer releases will need > to allow it. But the way to target multiple releases in a general and elegant > way is with multi-release JARs. Multi-release JARs may be better than conditiona

Re: [External] : Re: New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents

2023-05-14 Thread Ron Pressler
> On 14 May 2023, at 19:45, Alan Snyder wrote: > > Interesting discussion. > > I’m more worried about JNI. Can you say anything about how you see JNI being > restricted? Probably in the exact same was as FFM, i.e. with the --enable-native-access flag. > > I use JNI not only to access nati

Re: New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents

2023-05-14 Thread Alan Snyder
Interesting discussion. I’m more worried about JNI. Can you say anything about how you see JNI being restricted? I use JNI not only to access native services but also to work around bugs or limitations in the JDK using its unrestricted reflection. As a library developer, I want my library to wo

Re: [External] : Re: New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents

2023-05-14 Thread Ron Pressler
> On 12 May 2023, at 18:01, Kirk Pepperdine wrote: > > Hi Ron, > > I’m trying to work through some confusion and past 3 levels of discomfort. > The confusion is, the JEP talks about code integrity and that agents (both > directly and dynamically attached) have the ability to alter loaded cod

Re: RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v18]

2023-05-14 Thread Paul Hohensee
> Please review this addition to com.sun.management.ThreadMXBean that returns > the total number of bytes allocated on the Java heap since JVM launch by both > terminated and live threads. > > Because this PR adds a new interface method, I've updated the JMM_VERSION to > 4, but would be happy t

Re: New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents

2023-05-14 Thread Andrew Dinn
On 13/05/2023 00:42, Gregg G Wonderly wrote: I find it petty that “we know best” or “it’s our way of the highway” becoming a pretty common thing in the “evolution” of Java “by Oracle”. The open-JDK community ultimately can end up quite distances from “Oracle Java”. It seems there is an agend

Re: RFR: 8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents [v2]

2023-05-14 Thread Alan Bateman
> This is the implementation for JEP 451. There are two parts to this: > > 1. A multi-line warning is printed when a JVM TI or Java agent is loaded into > a running VM. For JVM TI, the message is printed to stderr from > JvmtiAgent::load. For Java agents, it is printed to System.err (as that may

Re: RFR: 8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents

2023-05-14 Thread Andrey Turbanov
On Wed, 10 May 2023 11:12:49 GMT, Alan Bateman wrote: > This is the implementation for JEP 451. There are two parts to this: > > 1. A multi-line warning is printed when a JVM TI or Java agent is loaded into > a running VM. For JVM TI, the message is printed to stderr from > JvmtiAgent::load. F