/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: John Arbash Meinel
  • Date: 2008-09-26 22:14:42 UTC
  • mto: This revision was merged to the branch mainline in revision 3747.
  • Revision ID: john@arbash-meinel.com-20080926221442-3r67j99sr9rwe9w0
Make message optional, don't check the memory flag directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
 
391
391
_short_fields = ('VmPeak', 'VmSize', 'VmRSS')
392
392
 
393
 
def debug_memory(message, short=True):
 
393
def debug_memory(message='', short=True):
394
394
    """Write out a memory dump."""
395
 
    if 'memory' not in debug.debug_flags:
396
 
        return
397
395
    try:
398
396
        status_file = file('/proc/%s/status' % os.getpid(), 'rb')
399
397
    except IOError:
402
400
        status = status_file.read()
403
401
    finally:
404
402
        status_file.close()
405
 
    note(message)
 
403
    if message:
 
404
        note(message)
406
405
    for line in status.splitlines():
407
406
        if not short:
408
407
            note(line)