QPanda3  0.1.0
Supported by OriginQ
Loading...
Searching...
No Matches
pyqpanda3.profiling.gprof2dot.GprofParser Class Reference

Parser for GNU gprof output. More...

Inheritance diagram for pyqpanda3.profiling.gprof2dot.GprofParser:

Public Member Functions

 __init__ (self, fp)
 
 readline (self)
 
 translate (self, mo)
 Extract a structure from a match object, while translating the types in the process.
 
 parse_function_entry (self, lines)
 
 parse_cycle_entry (self, lines)
 
 parse_cg_entry (self, lines)
 
 parse_cg (self)
 Parse the call graph.
 
 parse (self)
 
- Public Member Functions inherited from pyqpanda3.profiling.gprof2dot.Parser

Public Attributes

 fp = fp
 
dict functions = {}
 
dict cycles = {}
 

Static Protected Attributes

 _int_re = re.compile(r'^\d+$')
 
 _float_re = re.compile(r'^\d+\.\d+$')
 
 _cg_header_re
 
 _cg_ignore_re
 
 _cg_primary_re
 
 _cg_parent_re
 
 _cg_child_re = _cg_parent_re
 
 _cg_cycle_header_re
 
 _cg_cycle_member_re
 
 _cg_sep_re = re.compile(r'^--+$')
 

Additional Inherited Members

- Static Public Attributes inherited from pyqpanda3.profiling.gprof2dot.Parser
bool stdinInput = True
 
bool multipleInput = False
 

Detailed Description

Parser for GNU gprof output.

See also:

Constructor & Destructor Documentation

◆ __init__()

pyqpanda3.profiling.gprof2dot.GprofParser.__init__ ( self,
fp )

Member Function Documentation

◆ parse()

pyqpanda3.profiling.gprof2dot.GprofParser.parse ( self)

◆ parse_cg()

pyqpanda3.profiling.gprof2dot.GprofParser.parse_cg ( self)

Parse the call graph.

◆ parse_cg_entry()

pyqpanda3.profiling.gprof2dot.GprofParser.parse_cg_entry ( self,
lines )

◆ parse_cycle_entry()

pyqpanda3.profiling.gprof2dot.GprofParser.parse_cycle_entry ( self,
lines )

◆ parse_function_entry()

pyqpanda3.profiling.gprof2dot.GprofParser.parse_function_entry ( self,
lines )

◆ readline()

pyqpanda3.profiling.gprof2dot.GprofParser.readline ( self)

◆ translate()

pyqpanda3.profiling.gprof2dot.GprofParser.translate ( self,
mo )

Extract a structure from a match object, while translating the types in the process.

Member Data Documentation

◆ _cg_child_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_child_re = _cg_parent_re
staticprotected

◆ _cg_cycle_header_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_cycle_header_re
staticprotected
Initial value:
= re.compile(
r'^\[(?P<index>\d+)\]?' +
r'\s+(?P<percentage_time>\d+\.\d+)' +
r'\s+(?P<self>\d+\.\d+)' +
r'\s+(?P<descendants>\d+\.\d+)' +
r'\s+(?:(?P<called>\d+)(?:\+(?P<called_self>\d+))?)?' +
r'\s+<cycle\s(?P<cycle>\d+)\sas\sa\swhole>' +
r'\s\[(\d+)\]$'
)

◆ _cg_cycle_member_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_cycle_member_re
staticprotected
Initial value:
= re.compile(
r'^\s+(?P<self>\d+\.\d+)?' +
r'\s+(?P<descendants>\d+\.\d+)?' +
r'\s+(?P<called>\d+)(?:\+(?P<called_self>\d+))?' +
r'\s+(?P<name>\S.*?)' +
r'(?:\s+<cycle\s(?P<cycle>\d+)>)?' +
r'\s\[(?P<index>\d+)\]$'
)

◆ _cg_header_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_header_re
staticprotected
Initial value:
= re.compile(
# original gprof header
r'^\s+called/total\s+parents\s*$|' +
r'^index\s+%time\s+self\s+descendents\s+called\+self\s+name\s+index\s*$|' +
r'^\s+called/total\s+children\s*$|' +
# GNU gprof header
r'^index\s+%\s+(time\s+)?self\s+children\s+called\s+name\s*$'
)

◆ _cg_ignore_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_ignore_re
staticprotected
Initial value:
= re.compile(
# spontaneous
r'^\s+<spontaneous>\s*$|'
# internal calls (such as "mcount")
r'^.*\‍((\d+)\‍)$'
)

◆ _cg_parent_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_parent_re
staticprotected
Initial value:
= re.compile(
r'^\s+(?P<self>\d+\.\d+)?' +
r'\s+(?P<descendants>\d+\.\d+)?' +
r'\s+(?P<called>\d+)(?:/(?P<called_total>\d+))?' +
r'\s+(?P<name>\S.*?)' +
r'(?:\s+<cycle\s(?P<cycle>\d+)>)?' +
r'\s\[(?P<index>\d+)\]$'
)

◆ _cg_primary_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_primary_re
staticprotected
Initial value:
= re.compile(
r'^\[(?P<index>\d+)\]?' +
r'\s+(?P<percentage_time>\d+\.\d+)' +
r'\s+(?P<self>\d+\.\d+)' +
r'\s+(?P<descendants>\d+\.\d+)' +
r'\s+(?:(?P<called>\d+)(?:\+(?P<called_self>\d+))?)?' +
r'\s+(?P<name>\S.*?)' +
r'(?:\s+<cycle\s(?P<cycle>\d+)>)?' +
r'\s\[(\d+)\]$'
)

◆ _cg_sep_re

pyqpanda3.profiling.gprof2dot.GprofParser._cg_sep_re = re.compile(r'^--+$')
staticprotected

◆ _float_re

pyqpanda3.profiling.gprof2dot.GprofParser._float_re = re.compile(r'^\d+\.\d+$')
staticprotected

◆ _int_re

pyqpanda3.profiling.gprof2dot.GprofParser._int_re = re.compile(r'^\d+$')
staticprotected

◆ cycles

pyqpanda3.profiling.gprof2dot.GprofParser.cycles = {}

◆ fp

pyqpanda3.profiling.gprof2dot.GprofParser.fp = fp

◆ functions

pyqpanda3.profiling.gprof2dot.GprofParser.functions = {}

The documentation for this class was generated from the following file: