Re: Remove unused import proposal: in JdpController.java

2018-02-21 Thread David Holmes
Hi Andrew, I've filed: https://bugs.openjdk.java.net/browse/JDK-8198539 to clean up your leftover import from JDK-8183123 :) (which was fixed in 10 not 9). If someone from serviceability doesn't pick this up I may be able to. David On 22/02/2018 1:29 AM, Andrew Leonard wrote: Hi, I would

Re: Thread Native ID Access

2018-02-21 Thread Thomas Stüfe
Hi Jeremy, On Wed, Feb 21, 2018 at 11:40 PM, Jeremy Manson wrote: > Hey folks, > > I mentioned earlier in the thread about the ThreadInfo.from() bug that I > found this because I was looking at fixing JDK-8154176, which proposes > introducing native thread ids to Thread

Re: Thread Native ID Access

2018-02-21 Thread David Holmes
Hi Jeremy, I think "thread id" is too platform specific to be exposed in a core Java API like Thread - even as a non-descript String. Maybe through a platform specific MXBean API? For things like /proc//task/ is there a way to say in a way that means "current thread"? That may be a

Re: RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties

2018-02-21 Thread Harsha Wardhana B
On Wednesday 21 February 2018 09:51 PM, mandy chung wrote: On 2/20/18 9:55 PM, Harsha Wardhana B wrote: We cannot get rid of specifying options via -D. We have plenty of -D flags but very few have short-hand alternative via --start-management-agent. If management properties are specified

Re: Thread Native ID Access

2018-02-21 Thread mandy chung
JDK 5 did very minimal for monitoring of native OS resources due to its scope and also its platform-dependent nature. I don't have a good advice how and where to expose them via Java SE API without further investigation. A couple of things come to mind: - Should native threads be exposed in

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread serguei.spit...@oracle.com
On 2/21/18 16:59, David Holmes wrote: On 22/02/2018 7:44 AM, serguei.spit...@oracle.com wrote: Hi Karen, Thank you for sorting this out! On 2/21/18 09:55, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you know what tests exist for

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread David Holmes
Correction ... On 22/02/2018 10:59 AM, David Holmes wrote: On 22/02/2018 7:44 AM, serguei.spit...@oracle.com wrote: Hi Karen, Thank you for sorting this out! On 2/21/18 09:55, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread serguei.spit...@oracle.com
Karen, On 2/21/18 16:46, Karen Kinnear wrote: Sergeui, You were right - I read the sources incorrectly. This code is easy to misunderstand - I read it incorrectly multiple times. :) This parts causes

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread David Holmes
On 22/02/2018 7:44 AM, serguei.spit...@oracle.com wrote: Hi Karen, Thank you for sorting this out! On 2/21/18 09:55, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you know what tests exist for this behavior? Dan already replied

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread Karen Kinnear
Sergeui, You were right - I read the sources incorrectly. Would still help to understand both the motivation and the reason to not add to the spec. Robert - do you remember why we didn’t add this to the specification? (6404550) > On Feb 21, 2018, at 4:44 PM, serguei.spit...@oracle.com wrote: >

Re: Thread Native ID Access

2018-02-21 Thread Martin Buchholz
On Wed, Feb 21, 2018 at 2:40 PM, Jeremy Manson wrote: > > 1) Should the ID be a long? The Hotspot thread dump prints it out as > 0x%x, which is an unsigned hexadecimal integer. The type hiding behind it > is platform-dependent, though: a pid_t on Linux, an unsigned

Re: Thread Native ID Access

2018-02-21 Thread mandy chung
I'm not comfortable for ThreadInfo to expose the implementation details.  What should we specify w.r.t. Java Thread mapping to native thread which is platform dependent.  Also how does it relate to the future fibers [1]? Another alternative is for JDK specific diagnostic tools to do that

Thread Native ID Access

2018-02-21 Thread Jeremy Manson
Hey folks, I mentioned earlier in the thread about the ThreadInfo.from() bug that I found this because I was looking at fixing JDK-8154176, which proposes introducing native thread ids to Thread and ThreadInfo. https://bugs.openjdk.java.net/browse/JDK-8154176 I have a prototype for it. I have

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread serguei.spit...@oracle.com
Hi Karen, Thank you for sorting this out! On 2/21/18 09:55, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you know what

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread serguei.spit...@oracle.com
Hi Dan, On 2/21/18 10:02, Daniel D. Daugherty wrote: On 2/21/18 12:55 PM, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread Daniel D. Daugherty
On 2/21/18 12:55 PM, Karen Kinnear wrote: Dan, Thank you for all the background digging. This is really helpful. Serguei - do you know what tests exist for this behavior? I mentioned a test that I found in the email that I attached to my previous reply: Subject: Re: adding/deleting methods

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread Karen Kinnear
Dan, Thank you for all the background digging. This is really helpful. Serguei - do you know what tests exist for this behavior? The way I read the source code - we currently allow ADD and DELETE for PRIVATE OR STATIC OR FINAL methods. Did I read that correctly? With the current

Re: Remove unused import proposal: in JdpController.java

2018-02-21 Thread Martin Buchholz
I've done my fair share of import cleanup, but friction is high enough that it should be done in bulk. If you can succeed in loading jdk sources into intellij, then you can get intellij to find all the unused imports for you, e.g. in the jdk core libraries. On Wed, Feb 21, 2018 at 7:29 AM,

Re: RFR JDK-8198253: ThreadInfo.from(CompositeData) assigning fields incorrectly in JDK 9

2018-02-21 Thread mandy chung
On 2/20/18 9:48 PM, Jeremy Manson wrote: I think that's a much better approach (I didn't notice the validate method :) ) I think you may want to grab my test changes, or make some similar ones.  Presumably, the tests do not pass with your change. I ran your test and it passed before

Re: RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties

2018-02-21 Thread mandy chung
On 2/20/18 9:55 PM, Harsha Wardhana B wrote: We cannot get rid of specifying options via -D. We have plenty of -D flags but very few have short-hand alternative via --start-management-agent. If management properties are specified by --start-management-agent, the options specified by -D are

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread Daniel D. Daugherty
On 2/21/18 2:45 AM, serguei.spit...@oracle.com wrote: On 2/20/18 23:01, David Holmes wrote: On 21/02/2018 4:50 PM, serguei.spit...@oracle.com wrote: Hi Karen and David, On 2/20/18 19:52, David Holmes wrote: Hi Karen, On 21/02/2018 1:54 AM, Karen Kinnear wrote: Folks, As part of the

Remove unused import proposal: in JdpController.java

2018-02-21 Thread Andrew Leonard
Hi, I would like to find a sponsor please for this simple tidy up of JdpController.java ? It contains an unused "import sun.management.VMManagement;" which is for a sun specific java.management class which this class used to use prior to jdk9. Thanks Andrew diff --git

Re: RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties

2018-02-21 Thread Roger Riggs
Hi, I'm a bit leary of command line arguments being special cased and the corresponding custom mappings to system properties.   The convenience is fine but we need to keep the handling out of native code so it is easier to maintain.  We don't have a Java API for processing (VM) command line

Re: PING: RFR: JDK-8153333: [REDO] STW phases at Concurrent GC should count in PerfCounter

2018-02-21 Thread Yasumasa Suenaga
PING: Could you review it? http://cr.openjdk.java.net/~ysuenaga/JDK-815/webrev.07/ JBS: https://bugs.openjdk.java.net/browse/JDK-815 CSR: https://bugs.openjdk.java.net/browse/JDK-8196862 Yasumasa On 2018/02/15 10:23, Yasumasa Suenaga wrote: Hi all, CSR for this issue [1] has

Re: JVMTI retransformation and addition of private methods

2018-02-21 Thread serguei.spit...@oracle.com
On 2/20/18 23:01, David Holmes wrote: On 21/02/2018 4:50 PM, serguei.spit...@oracle.com wrote: Hi Karen and David, On 2/20/18 19:52, David Holmes wrote: Hi Karen, On 21/02/2018 1:54 AM, Karen Kinnear wrote: Folks, As part of the Valhalla EG discussions for JVMTI changes for nestmates