List:Falcon Storage Engine« Previous MessageNext Message »
From:Kevin Lewis Date:March 25 2009 10:47am
Subject:Re: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?
View as plain text  
Xuekun,

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.

Kevin

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
> 
Thread
why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?Xuekun Hu25 Mar
  • Re: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?Jim Starkey25 Mar
Re: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?Kevin Lewis25 Mar
  • RE: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock?Xuekun Hu25 Mar