RFR 8030847: java/lang/management/ThreadMXBean/ThreadBlockedCount.java fails intermittently again

Staffan Larsen staffan.larsen at oracle.com
Tue Jan 14 03:53:41 PST 2014


+1

On 14 jan 2014, at 12:38, David Holmes <david.holmes at oracle.com> wrote:

> On 14/01/2014 9:25 PM, Jaroslav Bachorik wrote:
>> Please, could I have a review of this change?
>> 
>> It really is pretty simple and won't take much time to review.
> 
> Sorry this slipped past me :)
> 
> Changes look fine. Could you just expand on this comment:
> 
> 55         // warmup
> 
> to say:
> 
> // warmup - ensure all classes loaded and initialized etc to
> //          avoid unintended locking and blocking in the VM
> 
> Thanks,
> David
> 
>> Thanks,
>> 
>> -JB-
>> 
>> On 9.1.2014 14:35, Jaroslav Bachorik wrote:
>>> Hi,
>>> 
>>> thanks do David and Staffan it was possible to pinpoint the contention
>>> to the static initializaton and classloading.
>>> 
>>> David suggested running the test routine twice to exercise any
>>> initialization during the first run and performs the checks only for the
>>> results of the second run.
>>> 
>>> The test is using Phaser for synchronization. All the potentially
>>> blocking code (System.out.println(), Thread.currentThread(), etc.) was
>>> removed from the tested thread.
>>> 
>>> The webrev is available at
>>> http://cr.openjdk.java.net/~jbachorik/8030847/webrev.01
>>> 
>>> Thanks,
>>> 
>>> -JB-
>> 



More information about the serviceability-dev mailing list