trouble with java -Xpatch
Michael Rasmussen
michael.rasmussen at zeroturnaround.com
Mon Apr 4 10:31:01 UTC 2016
Hi Alan
Finally had time today to do some testing of can_generate_early_vmstart.
Can you elaborate on which classes I should be able to patch using CFLH
with early_vmstart enabled? From the quick testing I did, it appears that
most of the core java.lang classes do not generate CFLH events? For
instance java.lang.Class or java.lang.reflect.Method.
A quick comparison with Java8, there are about 100 classes that do not
generate CFLH events.
/Michael
On 29 March 2016 at 12:51, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 29/03/2016 10:14, Michael Rasmussen wrote:
>>
>> With the new -Xpatch format, are there any plans to add support for
>> adding (or modifying) these from JVMTI in the OnLoad phase?
>>
>> /Michael
>
> Not specifically but you can use -Xpatch in conjunction with
> -agentlib/-agentpath.
>
> Also if enable the new can_generate_early_vmstart capability then you can
> use the ClassFileLoadHook to patch classes loaded early in the startup. In
> previous threads I think you mentioned this was something you were looking
> to do.
>
> -Alan
More information about the jigsaw-dev
mailing list