From: Kevin Lewis Date: March 25 2009 10:47am Subject: Re: why comment BUMP_INTERLOCKED(sharedCount) in SyncObject::lock? List-Archive: http://lists.mysql.com/falcon/646 Message-Id: <49CA0BB9.8020000@sun.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT 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 >