Attaching to a JVM image that does not include java.instrument
Andrew Dinn
adinn at redhat.com
Mon May 22 10:49:49 UTC 2017
Hi Volker,
On 19/05/17 19:39, Volker Simonis wrote:
<snip>
> 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/application provider, use JPMS/jlink wisely)!
> - As a Java user, insist on getting a "full" JDK (i.e. one which
> contains the java.se/java.se.ee module)!
I agree with all these recommendations. However, I want to just comment
on the second one, specifically wrt jlink.
What constitutes a /wise/ use of jlink really depends on the purpose of
the jlinked image. I can envisage many cases where a custom jlinked
image without instrumentation capabilities might look attractive as a
way to save on memory footprint (not just the java classes but also the
code needed in libjvm.so). Footprint is a significant issue for certain
classes of application.
The sort of case I envision where this concern would be legitimate would
be, say, a shrink-wrapped Java utility program that does a very specific
and, probably, quite short-lived job; one that has been well tested and
validated, first in a sandbox and then in the field.
A more general purpose image, in particular one that is likely to run an
app that installs runtime defined deployments that are not linked in the
base image -- even if that is only a small amount of code -- may well
run up against problems that only an agent can help diagnose and remedy.
So, I can't see it being a wise idea to omit agent support in such images.
Lastly, I'll add that I don't believe agent developers have any right to
/dictate/ to users of jlink what they should or should not do. The onus
is for us to make them aware of what they might be missing by ruling out
use of our tools and make those tools so compelling that they recognise
and agree that the benefits are worth preserving. As long as the option
to include or exclude agent support is available, then to me it's simply
a free and open market, trading quality and reliability at the potential
cost of footprint. I'm very happy to compete on those terms.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the jigsaw-dev
mailing list