/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: Andrew Bennetts
  • Date: 2009-02-20 06:16:22 UTC
  • mfrom: (4023 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4027.
  • Revision ID: andrew.bennetts@canonical.com-20090220061622-te9miq29rlfqiwwv
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
407
407
    pass
408
408
 
409
409
 
410
 
_short_fields = ('VmPeak', 'VmSize', 'VmRSS')
411
 
 
412
410
def debug_memory(message='', short=True):
413
411
    """Write out a memory dump."""
 
412
    if sys.platform == 'win32':
 
413
        from bzrlib import win32utils
 
414
        win32utils.debug_memory_win32api(message=message, short=short)
 
415
    else:
 
416
        _debug_memory_proc(message=message, short=short)
 
417
 
 
418
 
 
419
_short_fields = ('VmPeak', 'VmSize', 'VmRSS')
 
420
 
 
421
def _debug_memory_proc(message='', short=True):
414
422
    try:
415
423
        status_file = file('/proc/%s/status' % os.getpid(), 'rb')
416
424
    except IOError: