RFR: 6849945: VM Periodic Task Thread CPU time = -1ns in HotspotThreadMBean.getInternalThreadCpuTimes

Erik Gahlin erik.gahlin at oracle.com
Wed Oct 30 07:45:04 PDT 2013


Could I have a review of this intermittently failing test.

There is a race between a thread being created and the request to get 
its CPU time. The "/proc/..." structure might not be ready at that time 
and the routine will return -1.

Fix is to spin in test until we get a CPU time that is not -1.  I also 
added types for Map to avoid warnings.

Thanks
Erik

Bug:
https://bugs.openjdk.java.net/browse/JDK-6849945

Webrev:
http://cr.openjdk.java.net/~egahlin/6849945_1/




More information about the serviceability-dev mailing list