Re: JVMTI retransformation and addition of private methods

2018-04-16 Thread David Holmes
On 17/04/2018 4:36 AM, Robert Field wrote: Rather than reverse engineer the spec from the hotspot implementation... Capabilities are the mechanism by which the level of functionality is defined.  Capabilities say what can be done, not what can't. The wording "The redefinition must not add,

Re: Review Request JDK-8200559: Java agents doing instrumentation need a means to define auxiliary classes

2018-04-16 Thread Rafael Winterhalter
Hei Mandy, I have looked into several Java agents that I have worked on and for many of them, this API does unfortunately not supply sufficient access. I would therefore still prefer a method Instrumentation::defineClass. The problem is that some agents need to define classes in other packages

Re: JVMTI retransformation and addition of private methods

2018-04-16 Thread serguei.spit...@oracle.com
Added to the JDK-8192936. Thanks, Serguei On 4/16/18 11:36, Robert Field wrote: Rather than reverse engineer the spec from the hotspot implementation... Capabilities are the mechanism by which the level of functionality is defined.  Capabilities say what can be done, not what can't. The

Re: JVMTI retransformation and addition of private methods

2018-04-16 Thread serguei.spit...@oracle.com
Added this and prev. suggestion to the JDK-8192936. Thansk, Serguei On 4/16/18 11:36, Robert Field wrote: Rather than reverse engineer the spec from the hotspot implementation... Capabilities are the mechanism by which the level of functionality is defined.  Capabilities say what can be

Re: JVMTI retransformation and addition of private methods

2018-04-16 Thread Robert Field
Rather than reverse engineer the spec from the hotspot implementation... Capabilities are the mechanism by which the level of functionality is defined.  Capabilities say what can be done, not what can't. The wording "The redefinition must not add, remove or rename fields or methods, change

Re: RFR: 8201409: JDWP debugger initialization hangs intermittently

2018-04-16 Thread Andrew Leonard
Hi Daniel, Thanks for reviewing this. Just to let you know, I have successfully run all the jdk_core and hotspot/jtreg/serviceability tests with this patch in place. Cheers Andrew Andrew Leonard Java Runtimes Development IBM Hursley IBM United Kingdom Ltd Phone internal: 245913, external: 01962

Re: Review Request JDK-8200559: Java agents doing instrumentation need a means to define auxiliary classes

2018-04-16 Thread Alan Bateman
On 16/04/2018 08:11, Rafael Winterhalter wrote: : I also think it is essential to being able to inject a class into a non-opened package. Otherwise one could use a method handle. When instrumenting classes one already has full privilege for all packages as an agent can open modules. If one

Re: Review Request JDK-8200559: Java agents doing instrumentation need a means to define auxiliary classes

2018-04-16 Thread Rafael Winterhalter
Hi David, >From my perspective as a heavy user of this API in Unsafe today: >From my experience, the recursive dependency is not a common problem as auxiliary types normally only reference the instrumented type. Beyond, this problem is an issue for such explicit dynamic class loading, also when

Re: Review Request JDK-8200559: Java agents doing instrumentation need a means to define auxiliary classes

2018-04-16 Thread mandy chung
On 4/16/18 2:13 PM, David Holmes wrote: Hi Mandy, How do you handle dependencies across a set of auxiliary types, i.e if you are defining a new class A, and it depends on B (which you also intend to define), how will the classloader resolve references from A to B when it can't load B

Re: Review Request JDK-8200559: Java agents doing instrumentation need a means to define auxiliary classes

2018-04-16 Thread David Holmes
Hi Mandy, How do you handle dependencies across a set of auxiliary types, i.e if you are defining a new class A, and it depends on B (which you also intend to define), how will the classloader resolve references from A to B when it can't load B itself? Is the key capability here the ability

Re: RFR: 8201409: JDWP debugger initialization hangs intermittently

2018-04-16 Thread serguei.spit...@oracle.com
On 4/15/18 10:01, Daniel D. Daugherty wrote: On 4/13/18 3:07 PM, serguei.spit...@oracle.com wrote: Andrew and reviewers, I'm re-sending this RFR with a corrected subject that includes the bug number.