[merge] add lock debugging, remove unnecessary lock peeks

Martin Pool mbp at sourcefrog.net
Wed Jun 27 11:02:34 BST 2007


This patch adds a global -Dlock option that helps you profile locking,
to make it more obvious when locks are being taken unnecessarily or
repeatedly.  By adding it I found that we are unnecessarily reading
back the lock twice while acquiring it.  I was hoping to actually find
more - haven't yet, which is good, but maybe we will later.

I might also add similar tracing to OS locks or dirstate if this is accepted.

This also

 * renames _base_Lock to _OSLock, as a better name -- i was thinking
of adding an overall BaseLock class
 * makes the assertContainsRe failure message a bit more readable when
the string being grepped is long, which it often is

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20060727-dlock.diff
Type: text/x-patch
Size: 32334 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070627/7cd8e169/attachment-0001.bin 


More information about the bazaar mailing list