???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
fc           @   sz   d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d Z d Z d „  Z d „  Z	 e
 d k rv e	 ƒ  n  d S(   s+   Transform gprof(1) output into useful HTML.iÿÿÿÿNsF   <html>
<head>
  <title>gprof output (%s)</title>
</head>
<body>
<pre>
s   </pre>
</body>
</html>
c         c   s#   x |  D] } t  j | ƒ Vq Wd  S(   N(   t   cgit   escape(   t   inputt   line(    (    s0   /usr/lib64/python2.7/Tools/scripts/gprof2html.pyt   add_escapes   s    c          C   s­  d }  t  j d r# t  j d }  n  |  d } t t |  ƒ ƒ } t | d ƒ } | j t |  ƒ x. | D]& } | j | ƒ | j d ƒ rf Pqf qf Wi  } xv | D]n } t j d | ƒ } | sÌ | j | ƒ Pn  | j	 d d ƒ \ } } | | | <| j d | | | | f ƒ q Wx. | D]& } | j | ƒ | j d	 ƒ rPqqWxØ | D]Ð } t j d
 | ƒ } | s‹| j | ƒ | j d ƒ rGPqGqGn  | j	 d d d ƒ \ }	 } }
 | | k rÈ| j | ƒ qGn  | j d ƒ rú| j d |	 | | | |
 f ƒ qG| j d |	 | | |
 f ƒ qGWxW | D]O } xF t j
 d | ƒ D]2 } | | k r`d | | f } n  | j | ƒ q;Wq"W| j t ƒ | j ƒ  t j d t j j | ƒ ƒ d  S(   Ns	   gprof.outi   s   .htmlt   ws    times   (.*  )(\w+)\ni   s+   %s<a name="flat:%s" href="#call:%s">%s</a>
s   index % times*   (.*  )(\w+)(( &lt;cycle.*&gt;)? \[\d+\])\ns   Index by function namei   t   [s-   %s<a name="call:%s" href="#flat:%s">%s</a>%s
s   %s<a href="#call:%s">%s</a>%s
s   (\w+(?:\.c)?|\W+)s   <a href="#call:%s">%s</a>s   file:(   t   syst   argvR   t   filet   writet   headert
   startswitht   ret   matcht   groupt   findallt   trailert   closet
   webbrowsert   opent   ost   patht   abspath(   t   filenamet   outputfilenameR   t   outputR   t   labelst   mt   stufft   fnamet   prefixt   suffixt   part(    (    s0   /usr/lib64/python2.7/Tools/scripts/gprof2html.pyt   main   sb    

			
t   __main__(   t   __doc__R   R   R   R    R   R   R   R   R"   t   __name__(    (    (    s0   /usr/lib64/python2.7/Tools/scripts/gprof2html.pyt   <module>   s   <			4