~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Karl Bielefeldt
  • Date: 2010-09-29 19:57:28 UTC
  • mto: (5483.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5484.
  • Revision ID: 7mq3cbbd9q@snkmail.com-20100929195728-nvuqlepsrwcxbziw
Use meliae to dump memory to a file upon MemoryError.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
        code = subentry.code
276
276
        totaltime = int(subentry.totaltime * 1000)
277
277
        #out_file.write('cob=%s\n' % (code.co_filename,))
 
278
        out_file.write('cfn=%s\n' % (label(code, True),))
278
279
        if isinstance(code, str):
279
280
            out_file.write('cfi=~\n')
280
 
            out_file.write('cfn=%s\n' % (label(code, True),))
281
281
            out_file.write('calls=%d 0\n' % (subentry.callcount,))
282
282
        else:
283
283
            out_file.write('cfi=%s\n' % (code.co_filename,))
284
 
            out_file.write('cfn=%s\n' % (label(code, True),))
285
284
            out_file.write('calls=%d %d\n' % (
286
285
                subentry.callcount, code.co_firstlineno))
287
286
        out_file.write('%d %d\n' % (lineno, totaltime))