�2NJc@s)dZd�Zdefd��YZdS(sC
lsprofcalltree.py - lsprof output which is readable by kcachegrind
Authors:
* David Allouche <david <at> 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.
cCs5t|t�rd|Sd|j|j|jfSdS(Nt~s%s %s:%d(t
isinstancetstrtco_nametco_filenametco_firstlineno(tcode((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pytlabel
s
tKCacheGrindcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs|j�|_d|_dS(N(tgetstatstdatatNonetout_file(tselftprofiler((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyt__init__scCsB||_|dIJ|j�x|jD]}|j|�q'WdS(Ns
events: Ticks(Rt_print_summaryR
t_entry(R
Rtentry((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pytoutputs
cCsTd}x3|jD](}t|jd�}t||�}qW|jd|fIJdS(Nii�ssummary: %d(R
tintt totaltimetmaxR(R
tmax_costRR((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyR!s
cCs
|j}|j}t|t�r.|dIJn|d|jfIJ|dt|�fIJt|jd�}t|t�r�|dI|IJn|d|j|fIJ|j r�|j }ng}t|t�r�d}n |j}x|D]}|j
||�q�|JdS(Nsfi=~sfi=%ssfn=%si�s0 s%d %di(RRRRRRRt
inlinetimeRtcallst _subentry(R
RRRRRtlinenotsubentry((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyR(s&
cCs�|j}|j}|dt|�fIJt|t�rY|dIJ|d|jfIJn.|d|jfIJ|d|j|jfIJt|j d�}|d||fIJdS(Nscfn=%sscfi=~s
calls=%d 0scfi=%sscalls=%d %di�s%d %d(
RRRRRt callcountRRRR(R
RRRRR((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyRHs
(t__name__t
__module__RRRRR(((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyRs
N(t__doc__RtobjectR(((s</sys/lib/python2.7/site-packages/mercurial/lsprofcalltree.pyt<module>s
|