Review Request for 6878481: Add performance counters in the JDK

Rémi Forax forax at
Thu Sep 3 10:59:48 UTC 2009

Le 03/09/2009 11:56, Alan Bateman a écrit :
> Rémi Forax wrote:
>> :
>> Hi Alan,
>> Classloading is now done in parallele, zip and jar can be loaded by 
>> different threads.
>> "for the synchronization there are places where both a counter and an 
>> elapsed time are updated"
>> => the problem is that these synchronisations are done on two 
>> different monitors.
>>       I don't see how to remove them easily.
>> Furthermore I think that all synchronized can not be easily replaced 
>> by some atomics operations
>> (unsafe.put* or unsafe.compareAndSwap) because long in a ByteBuffer 
>> aren't volatile.
>> Perhaps with the Doug Lea's Fences (scheduled to be introduced in 
>> jdk7) but I'm not sure.
> I understand - I'm just posing the question because correctness isn't 
> a major issue here and perhaps the trade-off could be considered.
> -Alan.

Writing longs on a 32 bits system leads to really surprising results :)


More information about the core-libs-dev mailing list