Re: ThreadMXBean.getThreadAllocatedBytes() allocates memory

2016-09-18 Thread David Holmes
Hi Bengt, On 19/09/2016 7:14 AM, Bengt Rutisson wrote: Hi Serviceability, Not sure, but I hope this is the correct list to post this on. Sure is. I wanted to use the ThreadMXBean.getThreadAllocatedBytes() method to get some information about how much memory some Java code allocated. When

Re: ThreadMXBean.getThreadAllocatedBytes() allocates memory

2016-09-18 Thread Claes Redestad
Hi Bengt, I'm not Serviceability, but you know I can't leave them micro- optimizations alone! :-) So, reusing cached arrays could be made to work but would require some synchronization to keep things thread-safe and tidy[1]. This will complicate the code, especially since there's another implie

ThreadMXBean.getThreadAllocatedBytes() allocates memory

2016-09-18 Thread Bengt Rutisson
Hi Serviceability, Not sure, but I hope this is the correct list to post this on. I wanted to use the ThreadMXBean.getThreadAllocatedBytes() method to get some information about how much memory some Java code allocated. When I dug into the results they didn't properly add up until I realized tha

Re: Review Request: JDK-8166237: jdk.jdi missing requires jdk.jdwp.agent

2016-09-18 Thread serguei.spit...@oracle.com
It is good. Thanks, Serguei On 9/17/16 10:11, Mandy Chung wrote: diff --git a/src/jdk.jdi/share/classes/module-info.java b/src/jdk.jdi/share/classes/module-info.java --- a/src/jdk.jdi/share/classes/module-info.java +++ b/src/jdk.jdi/share/classes/module-info.java @@ -25,6 +25,7 @@ module