JOL object header information

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Dec 18 20:02:22 UTC 2014


Hi Rafael, Serkan,

On 12/17/2014 05:41 PM, Rafael Winterhalter wrote:
> But this other approach only works if VMSupport was loaded by the system
> ClassLoader where agents must be loaded from. Otherwise, the VMSupport that
> is the agent and the VMSupport that installs the agent are two different
> classes and the set INSTRUMENTATION field would belong to a different
> class. This is why I prefer the hack by adding an additional installer
> class that is minimal in byte size and does not carry any other class
> dependencies and inject this class. Also, I only access it by reflection in
> order to avoid these class identity issues. Might not be as relevant for
> JOL as I guess most people do not really use this from a servlet container
> or somewhere but I guess there might be corner cases (?).

You will be suprised *where* people use JOL. Therefore, I would not like
to artificially limit the its applicability.

I like Rafael's approach. Rafael, can you send the patch either in
attachment or inline on this list? OpenJDK ToU requires us to accept the
incoming changes on openjdk.java.net. You seem to already have the OCA
signed, so we are in clear about attribution.

Thanks,
-Aleksey.




More information about the jol-dev mailing list