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

Parser for valgrind's callgrind tool. More...

Inheritance diagram for pyqpanda3.profiling.gprof2dot.CallgrindParser:

Public Member Functions

 __init__ (self, infile)
 
 parse (self)
 
 parse_part (self)
 
 parse_header_line (self)
 
 parse_part_detail (self)
 
 parse_description (self)
 
 parse_event_specification (self)
 
 parse_cost_line_def (self)
 
 parse_cost_summary (self)
 
 parse_body_line (self)
 
 parse_cost_line (self, calls=None)
 
 parse_association_spec (self)
 
 parse_position_spec (self)
 
 parse_empty (self)
 
 parse_comment (self)
 
 parse_key (self, key)
 
 parse_keys (self, keys)
 
 make_function (self, module, filename, name)
 
 get_function (self)
 
 get_callee (self)
 
 readline (self)
 
- Public Member Functions inherited from pyqpanda3.profiling.gprof2dot.LineParser
 lookahead (self)
 
 consume (self)
 
 eof (self)
 
- Public Member Functions inherited from pyqpanda3.profiling.gprof2dot.Parser

Public Attributes

dict position_ids = {}
 
dict positions = {}
 
int num_positions = 1
 
list cost_positions = ['line']
 
list last_positions = [0]
 
int num_events = 0
 
list cost_events = []
 
 profile = Profile()
 
 line_no
 
str cost_events = 'positions':
 
- Public Attributes inherited from pyqpanda3.profiling.gprof2dot.LineParser
int line_no = 0
 

Static Protected Attributes

 _call_re = re.compile(r'^calls=\s*(\d+)\s+((\d+|\+\d+|-\d+|\*)\s+)+$')
 
 _detail_keys = set(('cmd', 'pid', 'thread', 'part'))
 
 _cost_re
 
 _position_re = re.compile(r'^(?P<position>[cj]?(?:ob|fl|fi|fe|fn))=\s*(?:\‍((?P<id>\d+)\‍))?(?:\s*(?P<name>.+))?')
 
dict _position_table_map
 
dict _position_map
 
 _key_re = re.compile(r'^(\w+):')
 

Additional Inherited Members

- Static Public Attributes inherited from pyqpanda3.profiling.gprof2dot.LineParser
 XML_ELEMENT_START
 
 XML_ELEMENT_END
 
 XML_CHARACTER_DATA
 
 XML_EOF
 
- Static Public Attributes inherited from pyqpanda3.profiling.gprof2dot.Parser
bool stdinInput = True
 
bool multipleInput = False
 
- Protected Attributes inherited from pyqpanda3.profiling.gprof2dot.LineParser
 _stream = stream
 

Detailed Description

Parser for valgrind's callgrind tool.

See also:

Constructor & Destructor Documentation

◆ __init__()

pyqpanda3.profiling.gprof2dot.CallgrindParser.__init__ ( self,
infile )

Member Function Documentation

◆ get_callee()

pyqpanda3.profiling.gprof2dot.CallgrindParser.get_callee ( self)

◆ get_function()

pyqpanda3.profiling.gprof2dot.CallgrindParser.get_function ( self)

◆ make_function()

pyqpanda3.profiling.gprof2dot.CallgrindParser.make_function ( self,
module,
filename,
name )

◆ parse()

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

◆ parse_association_spec()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_association_spec ( self)

◆ parse_body_line()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_body_line ( self)

◆ parse_comment()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_comment ( self)

◆ parse_cost_line()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_cost_line ( self,
calls = None )

◆ parse_cost_line_def()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_cost_line_def ( self)

◆ parse_cost_summary()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_cost_summary ( self)

◆ parse_description()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_description ( self)

◆ parse_empty()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_empty ( self)

◆ parse_event_specification()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_event_specification ( self)

◆ parse_header_line()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_header_line ( self)

◆ parse_key()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_key ( self,
key )

◆ parse_keys()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_keys ( self,
keys )

◆ parse_part()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_part ( self)

◆ parse_part_detail()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_part_detail ( self)

◆ parse_position_spec()

pyqpanda3.profiling.gprof2dot.CallgrindParser.parse_position_spec ( self)

◆ readline()

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

Member Data Documentation

◆ _call_re

pyqpanda3.profiling.gprof2dot.CallgrindParser._call_re = re.compile(r'^calls=\s*(\d+)\s+((\d+|\+\d+|-\d+|\*)\s+)+$')
staticprotected

◆ _cost_re

pyqpanda3.profiling.gprof2dot.CallgrindParser._cost_re
staticprotected
Initial value:
= re.compile(r'^' +
__subpos_re + r'( +' + __subpos_re + r')*' +
r'( +\d+)*' +
'$')

◆ _detail_keys

pyqpanda3.profiling.gprof2dot.CallgrindParser._detail_keys = set(('cmd', 'pid', 'thread', 'part'))
staticprotected

◆ _key_re

pyqpanda3.profiling.gprof2dot.CallgrindParser._key_re = re.compile(r'^(\w+):')
staticprotected

◆ _position_map

dict pyqpanda3.profiling.gprof2dot.CallgrindParser._position_map
staticprotected
Initial value:
= {
'ob': 'ob',
'fl': 'fl',
'fi': 'fl',
'fe': 'fl',
'fn': 'fn',
'cob': 'cob',
'cfl': 'cfl',
'cfi': 'cfl',
'cfe': 'cfl',
'cfn': 'cfn',
'jfi': 'jfi',
}

◆ _position_re

pyqpanda3.profiling.gprof2dot.CallgrindParser._position_re = re.compile(r'^(?P<position>[cj]?(?:ob|fl|fi|fe|fn))=\s*(?:\‍((?P<id>\d+)\‍))?(?:\s*(?P<name>.+))?')
staticprotected

◆ _position_table_map

dict pyqpanda3.profiling.gprof2dot.CallgrindParser._position_table_map
staticprotected
Initial value:
= {
'ob': 'ob',
'fl': 'fl',
'fi': 'fl',
'fe': 'fl',
'fn': 'fn',
'cob': 'ob',
'cfl': 'fl',
'cfi': 'fl',
'cfe': 'fl',
'cfn': 'fn',
'jfi': 'fl',
}

◆ cost_events [1/2]

list pyqpanda3.profiling.gprof2dot.CallgrindParser.cost_events = []

◆ cost_events [2/2]

str pyqpanda3.profiling.gprof2dot.CallgrindParser.cost_events = 'positions':

◆ cost_positions

list pyqpanda3.profiling.gprof2dot.CallgrindParser.cost_positions = ['line']

◆ last_positions

list pyqpanda3.profiling.gprof2dot.CallgrindParser.last_positions = [0]

◆ line_no

pyqpanda3.profiling.gprof2dot.CallgrindParser.line_no

◆ num_events

int pyqpanda3.profiling.gprof2dot.CallgrindParser.num_events = 0

◆ num_positions

pyqpanda3.profiling.gprof2dot.CallgrindParser.num_positions = 1

◆ position_ids

dict pyqpanda3.profiling.gprof2dot.CallgrindParser.position_ids = {}

◆ positions

dict pyqpanda3.profiling.gprof2dot.CallgrindParser.positions = {}

◆ profile

pyqpanda3.profiling.gprof2dot.CallgrindParser.profile = Profile()

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