Got it. Thanks for explanation.
From: Kevin.Lewis@stripped [mailto:Kevin.Lewis@stripped]
Sent: Wednesday, March 25, 2009 6:47 PM
To: Hu, Xuekun
Subject: Re: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?
BUMP_INTERLOCKED is defined in SyncObject.h when TRACE_SYNC_OBJECTS is
defined which is currently always defined. A typical shared lock is
supposed to be very fast, almost a single INTERLOCKED_INCREMENT, since
it happens all the time. This BUMP_INTERLOCKED(sharedCount) was
effectively doubling the cost of every shared lock.
If you are NOT intereseted in measuring the best performance and need
this count, you can uncomment this line and recompile. But while we
still use TRACE_SYNC_OBJECTS on our release builds, we cannot afford to
use this part of it.
Hu, Xuekun wrote:
> Hi, Guys
> I am just curious why BUMP_INTERLOCKED(sharedCount) was commented that the shared
> statistics was missing. For performance or mis-functionality reason? Thanks in advance.
> Thx, Xuekun