Re: JVMTI and instrumentation

2015-12-04 Thread Alan Bateman
On 03/12/2015 15:12, Michael Rasmussen wrote: : As seen, the value of jdk.boot.class.path.append is the sun.boot.class.path from the index that was the original value before I changed it. I looked into this a bit further and I do see an issue when Agent_OnLoad changes jdk.boot.class.path.appe

Re: JVMTI and instrumentation

2015-12-03 Thread Michael Rasmussen
On 3 December 2015 at 16:49, Alan Bateman wrote: > Good to hear you got it going and I hope you will be able to try things out > and work with us as JVM TI evolves to work with module aware agents. I'm looking forward to it. > Just so I understand, are you changing the memory in the value return

Re: JVMTI and instrumentation

2015-12-03 Thread Alan Bateman
On 03/12/2015 12:42, Michael Rasmussen wrote: : Doing the individual steps, by building the patch, and then running with -javaagent and -Xpatch (tested with b86), I am currently able to get this running. I can mention that the project in question is JRebel, and with the above steps, I can succes

Re: JVMTI and instrumentation

2015-12-03 Thread Michael Rasmussen
On 3 December 2015 at 14:08, Alan Bateman wrote: > I'm guessing you are working around some of this by adding to or > patching java.base. > (...) > Is -Xpatch working for you? Can you use this in conjunction with > -agentlib/-agentpath until there is further progress in this area. Correct, at the

Re: JVMTI and instrumentation

2015-12-03 Thread Alan Bateman
On 03/12/2015 11:31, Michael Rasmussen wrote: : Well, you've always had to be very careful loading classes before VMInit, you had to be really careful not to use things that wasn't initialized yet. I don't see why it was felt neccesary to completely block the CFLM events for these classes, makin

Re: JVMTI and instrumentation

2015-12-03 Thread Michael Rasmussen
On 2 December 2015 at 15:31, Alan Bateman wrote: > "JVM TI agents can no longer instrument Java code that runs early in the > startup of the run-time environment. The vm start event is not sent until > the module system is initialized, so JVM TI agents that do load-time > instrumentation will not

Re: JVMTI and instrumentation

2015-12-02 Thread Alan Bateman
On 02/12/2015 11:39, Michael Rasmussen wrote: : A further question for JVMTI in this regard: ClassFileLoadHook callback seems to not be called before VMInit anymore? I know the documentation is vague on this point, only specifying that it may be sent in primordial phase; but for previous JDK ve

Re: JVMTI and instrumentation

2015-12-02 Thread Michael Rasmussen
On 2 December 2015 at 11:45, Alan Bateman wrote: > Just to get more context, are you trying to avoid the -Xpatch option and > have everything done by the agent so it's just a -agentlib option? If there > really is a need for this then it might be something for a JVM TI extension > function to add

Re: JVMTI and instrumentation

2015-12-02 Thread Alan Bateman
On 01/12/2015 22:08, Michael Rasmussen wrote: Are there any plans to support setting -Xpatch from JVMTI in OnLoad phase, or even setting the "jdk.launcher.patchdirs" system property, and have it take effect? (Also applies to the other module -X options) Agent_OnLoad should is still so early in t

JVMTI and instrumentation

2015-12-01 Thread Michael Rasmussen
Are there any plans to support setting -Xpatch from JVMTI in OnLoad phase, or even setting the "jdk.launcher.patchdirs" system property, and have it take effect? (Also applies to the other module -X options) Agent_OnLoad should is still so early in the process that it should be possible to influen