RFR (M): 8231209: [REDO] ThreadMXBean::getThreadAllocatedBytes() can be quicker for self thread
Daniel Fuchs
daniel.fuchs at oracle.com
Mon Sep 23 09:06:23 UTC 2019
Hi,
On 21/09/2019 00:28, Hohensee, Paul wrote:
> java.lang.management.ThreadMXBean has two default methods that throw UnsupportedOperationException:
>
> ThreadInfo[] getThreadInfo(long[], boolean, boolean, int)
> ThreadInfo[] dumpAllThreads(boolean, boolean, int)
>
> Without actually testing it, is it safe to assume that since com.sun.management.ThreadMXBean extends j.l.m.ThreadMXBean, the new c.s.m.ThreadMXBean method
>
> public default long getCurrentThreadAllocatedBytes() {
> throw new UnsupportedOperationException();
> }
>
> will behave the same way?
Oh right, I'd forgotten about that. Looking at the history
it seems I'd even checked that it did work at the time. duh.
How time flies...
Thanks Paul!
best regards,
-- daniel
More information about the serviceability-dev
mailing list