^c 6dZddlmZdZGddZdS)aC lsprofcalltree.py - lsprof output which is readable by kcachegrind Authors: * David Allouche allouche.net> * Jp Calderone & Itamar Shtull-Trauring * Johan Dahlin This software may be used and distributed according to the terms of the GNU General Public License, incorporated herein by reference. )pycompatct|trdtj|zSdtj|jtj|j|jfzS)N~s%s %s:%d) isinstancestrrsysbytesco_name co_filenameco_firstlineno)codes :/usr/lib/python3/dist-packages/mercurial/lsprofcalltree.pylabelrsc$ h'----  dl + +  d. / /     c,eZdZdZdZdZdZdZdS) KCacheGrindcF||_d|_dS)N)getstatsdataout_file)selfprofilers r __init__zKCacheGrind.__init__s %%''  rc||_|d||jD]}||dS)Nsevents: Ticks )rwrite_print_summaryr_entry)rrentrys r outputzKCacheGrind.output"s^  )*** Y  E KK      rcd}|jD])}t|jdz}t||}*|jd|zdS)Ns summary: %d )rint totaltimemaxrr)rmax_costrr#s r rzKCacheGrind._print_summary)s_Y 0 0EEOd233I8Y//HH ,x788888rc|j}|j}t|tr|dn/|dt j|jz|dt|zt|j dz}t|tr|d|zn|d|j |fz|j r|j }ng}t|trd}n|j }|D]}| |||ddS) Nsfi=~ sfi=%s sfn=%s r!s0 %d %d %d r  )rr rrrrrr rr" inlinetimer calls _subentry)rrrr r)r*linenosubentrys r rzKCacheGrind._entry0sT=z dC  M NN9 % % % % NN:(9$:J(K(KK L L LzE$KK/000)D011 dC  K NN9z1 2 2 2 2 NN:)r6sn      B9B9B9B9B9B9B9B9B9B9r