At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/debug_memory
------------------------------------------------------------
revno: 3700
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: debug_memory
timestamp: Fri 2008-09-26 17:14:42 -0500
message:
Make message optional, don't check the memory flag directly.
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py 2008-09-10 18:17:59 +0000
+++ b/bzrlib/trace.py 2008-09-26 22:14:42 +0000
@@ -390,10 +390,8 @@
_short_fields = ('VmPeak', 'VmSize', 'VmRSS')
-def debug_memory(message, short=True):
+def debug_memory(message='', short=True):
"""Write out a memory dump."""
- if 'memory' not in debug.debug_flags:
- return
try:
status_file = file('/proc/%s/status' % os.getpid(), 'rb')
except IOError:
@@ -402,7 +400,8 @@
status = status_file.read()
finally:
status_file.close()
- note(message)
+ if message:
+ note(message)
for line in status.splitlines():
if not short:
note(line)
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits