Re: Attaching to a JVM image that does not include java.instrument

2017-05-22 Thread Rafael Winterhalter
I do not think that people would normally try to dictate it but there is a good chance that people follow the default setting and ignore the warning message. I rarely see a build without warnings, people normally look away. The problem I see is that the people in charge of building and packaging t

Re: Attaching to a JVM image that does not include java.instrument

2017-05-22 Thread Andrew Dinn
Hi Volker, On 19/05/17 19:39, Volker Simonis wrote: > So why did I wrote all that? I think I just wanted to emphasize the > following points: > > - We need good/better standards (and that's why the JCP is so important)! > - With great power comes great responsibility (i.e. as a > Java/applica

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Volker Simonis
Hi, without judging any of the proposals in this thread, I just want to clarify some things: - jlink is no standard tool (i.e. it is neither specified nor mandated by the new Java SE 9 specification). This equally applies to the new jimage/jmod file formats. - in contrast, the minimal, compact a

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Alan Bateman
On 19/05/2017 16:42, Christoph Engelbert wrote: Hey, Just a clarification question, does that mean no agent like dynatrace, appdynamics or others would work anymore with a normal jlinked image, when `java.instrument` is specifically added as a dependency? Just to avoid any confusion here: T

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
Yes, this is an implication and what I am concerned about. Am 19.05.2017 17:42 schrieb "Christoph Engelbert" : Hey, Just a clarification question, does that mean no agent like dynatrace, appdynamics or others would work anymore with a normal jlinked image, when `java.instrument` is specifically

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Christoph Engelbert
Hey, Just a clarification question, does that mean no agent like dynatrace, appdynamics or others would work anymore with a normal jlinked image, when `java.instrument` is specifically added as a dependency? In this case I would agree with Rafael and Michael. It will come as a surprise to a lo

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Michael Rasmussen
On 19 May 2017 at 11:22, Alan Bateman wrote: > One thing that jlink > could do is emit a warning that the resulting run-time image doesn't have > the management and instrumentation features, might that be the right > balance. As a users of those kind of agents, and as an agent vendor myself (thou

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
Most project teams I come accross as a consultant broadly ignore warnings. I would not expect that most people pay attention to a warning that an image is not including JVMTI, especially if the implications are unclear to the person in charge of running the build. Excluding JVMTI by default - ie ex

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Alan Bateman
On 19/05/2017 12:28, Andrew Dinn wrote: : I don't think history is the most important guide here (whatever the history might be). If agent support was not optional in the past that is no reason to not make it optional now. My reason for bringing up the history is to make it clear that the stand

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Andrew Dinn
Hi Rafael, On 19/05/17 13:08, Rafael Winterhalter wrote: > do not forget that we are talking about 130 kilobyte here which come at > the costs of removing a feature that often serves as a last resort and > where its need is rarely anticipated. Given the little overhead of > including this module,

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
Hi Andrew, do not forget that we are talking about 130 kilobyte here which come at the costs of removing a feature that often serves as a last resort and where its need is rarely anticipated. Given the little overhead of including this module, I do not find it reasonable to disable a feature that

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Andrew Dinn
HI Rafael, On 19/05/17 11:57, Rafael Winterhalter wrote: > Hi Alan, > I understand your current time constraint, I still want to point out that > this is a heavily used functionality and it not being available would cause > problems in basically all production environments I am aware of where the

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Andrew Dinn
On 19/05/17 11:24, Alan Bateman wrote: > On 19/05/2017 10:20, Rafael Winterhalter wrote: > >> : >> >> It is the exact purpose of a Java agent to allow the enhancement of a >> Java application that is independent of a particular Java process. >> Therefore, it should not be a decission bound to the

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Andrew Dinn
On 19/05/17 09:22, Alan Bateman wrote: > As I said, the goal has always been to allow someone create a run-time > image that only contains java.base. I'm not sure that subsuming > java.instrument into java.base is right. Introducing options to ask > jlink to exclude modules creates the potential fo

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
Hi Alan, I understand your current time constraint, I still want to point out that this is a heavily used functionality and it not being available would cause problems in basically all production environments I am aware of where the lack of this API is not uncovered before running the application i

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Alan Bateman
On 19/05/2017 10:20, Rafael Winterhalter wrote: : It is the exact purpose of a Java agent to allow the enhancement of a Java application that is independent of a particular Java process. Therefore, it should not be a decission bound to the creation or bundeling of the Java application if suc

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
While the jlink feature might only be used by power users, there is no guarantee that the users of these images are power users at the same degree or is even understand the implications. For example, some team might use a JVM-based server from a third-party vendor which is distributed as a jlink im

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Remi Forax
- Mail original - > De: "Alan Bateman" > À: "Rafael Winterhalter" > Cc: "jigsaw-dev" > Envoyé: Vendredi 19 Mai 2017 10:22:04 > Objet: Re: Attaching to a JVM image that does not include java.instrument > On 19/05/2017 08:08, Rafael

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Alan Bateman
On 19/05/2017 08:08, Rafael Winterhalter wrote: Hi Alan, I just retested with the most recent Java 9 snapshot and this is what I get: rafael@rafc:~/jdk9-test/greetingsapp$ ./bin/java -javaagent:/home/rafael/.m2/repository/sample-agent/sample-agent/1.0-SNAPSHOT/sample-agent-1.0-SNAPSHOT.jar

Re: Attaching to a JVM image that does not include java.instrument

2017-05-19 Thread Rafael Winterhalter
Hi Alan, I just retested with the most recent Java 9 snapshot and this is what I get: rafael@rafc:~/jdk9-test/greetingsapp$ ./bin/java -javaagent:/home/rafael/.m2/repository/sample-agent/sample-agent/1.0-SNAPSHOT/sample-agent-1.0-SNAPSHOT.jar -m com.greetings/com.greetings.Main Error occurred dur

Re: Attaching to a JVM image that does not include java.instrument

2017-05-18 Thread Alan Bateman
On 18/05/2017 15:20, Rafael Winterhalter wrote: Hei, I found that it is impossible to dynamically attach to a JVM that does not include the java.instrument module when built with jlink. This is a result of the instrumentation API and its infrastructure missing from the image. rafael@rafc:~/jdk