Review Request for 6878481: Add performance counters in the JDK
Alan Bateman
Alan.Bateman at Sun.COM
Thu Sep 3 09:56:04 UTC 2009
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.
More information about the core-libs-dev
mailing list