*"Hohensee, Paul"
> *Cc: *"daniel.daughe...@oracle.com" , "
> serviceability-dev@openjdk.java.net" ,
> "erik.osterl...@oracle.com" , "
> robbin@oracle.com"
> *Subject: *Re: ThreadMXBean::getCurrentThreadAllocatedByte
: Markus Gaisbauer
Date: Monday, July 16, 2018 at 12:50 PM
To: "Hohensee, Paul"
Cc: "daniel.daughe...@oracle.com" ,
"serviceability-dev@openjdk.java.net" ,
"erik.osterl...@oracle.com" ,
"robbin@oracle.com"
Subject: Re: ThreadMXBean::getCurr
I saw Daniels comment too late, but using THREAD instead
of JavaThread::current() indeed makes the new method again a bit simpler
and faster (now 33 ns instead of 35 ns).
JVM_ENTRY(jlong, jmm_GetCurrentThreadAllocatedMemory(JNIEnv *env))
return THREAD->cooked_allocated_bytes();
JVM_END
On Mon,
Hi,
Thank you for all the help.
I added the code suggested by Paul and ran my small microbenchmark. The
optimized getThreadAllocatedBytes now takes 57 ns if fed with the ID of the
current thread. All calls that aren't for the current thread will be a bit
slower. As far as I am concerned, adding
"
*Reply-To: *"daniel.daughe...@oracle.com"
*Date: *Friday, July 13, 2018 at 1:53 PM
*To: *Markus Gaisbauer ,
"serviceability-dev@openjdk.java.net"
, Erik Österlund
, Robbin Ehn
*Subject: *Re: ThreadMXBean::getCurrentThreadAllocatedBytes
Markus,
I fil
lf of "Daniel D. Daugherty"
Reply-To: "daniel.daughe...@oracle.com"
Date: Friday, July 13, 2018 at 1:53 PM
To: Markus Gaisbauer ,
"serviceability-dev@openjdk.java.net" ,
Erik Österlund , Robbin Ehn
Subject: Re: ThreadMXBean::getCurrentThreadAlloca
Markus,
I filed the following bug for you:
JDK-8207266 ThreadMXBean::getThreadAllocatedBytes() can be quicker
for self thread
https://bugs.openjdk.java.net/browse/JDK-8207266
Dan
On 7/13/18 4:46 PM, Daniel D. Daugherty wrote:
On 7/13/18 2:44 PM, Daniel D. Daugherty wrote:
On 7/13/
On 7/13/18 2:44 PM, Daniel D. Daugherty wrote:
On 7/13/18 12:35 PM, Markus Gaisbauer wrote:
Hello,
I am trying to use ThreadMXBean::getThreadAllocatedBytes
(com.sun.management) to get the amount of allocated memory of the
current thread in some performance critical code.
Unfortunately, the
On 7/13/18 12:35 PM, Markus Gaisbauer wrote:
Hello,
I am trying to use ThreadMXBean::getThreadAllocatedBytes
(com.sun.management) to get the amount of allocated memory of the
current thread in some performance critical code.
Unfortunately, the current implementation can be rather slow and th
Here's the starting point for openjdk contributing:
http://openjdk.java.net/contribute/
Here's your post in the mail archives :
http://mail.openjdk.java.net/pipermail/serviceability-dev/2018-July/024441.html
Most people will post a webrev to cr.openjdk.java.net for larger changesets.
Most
Hello,
I am trying to use ThreadMXBean::getThreadAllocatedBytes
(com.sun.management) to get the amount of allocated memory of the current
thread in some performance critical code.
Unfortunately, the current implementation can be rather slow and the
duration of each call unpredictable. I ran a tes
11 matches
Mail list logo