QPanda3
Supported by OriginQ
载入中...
搜索中...
未找到
pyqpanda3.profiling.gprof2dot.DtraceParser类 参考

Parser for linux perf callgraph output. 更多...

类 pyqpanda3.profiling.gprof2dot.DtraceParser 继承关系图:
[图例]

Public 成员函数

 __init__ (self, infile)
 
 readline (self)
 
 parse (self)
 
 parse_event (self)
 
 parse_callchain (self)
 
 parse_call (self)
 
- Public 成员函数 继承自 pyqpanda3.profiling.gprof2dot.LineParser
 __init__ (self, stream)
 
 lookahead (self)
 
 consume (self)
 
 eof (self)
 
- Public 成员函数 继承自 pyqpanda3.profiling.gprof2dot.Parser
 __init__ (self)
 

Public 属性

 profile = Profile()
 
- Public 属性 继承自 pyqpanda3.profiling.gprof2dot.LineParser
int line_no = 0
 

静态 Public 属性

 call_re = re.compile(r'^\s+(?P<module>.*)`(?P<symbol>.*)')
 
 addr2_re = re.compile(r'\+0x[0-9a-fA-F]+$')
 
- 静态 Public 属性 继承自 pyqpanda3.profiling.gprof2dot.LineParser
 XML_ELEMENT_START
 
 XML_ELEMENT_END
 
 XML_CHARACTER_DATA
 
 XML_EOF
 
- 静态 Public 属性 继承自 pyqpanda3.profiling.gprof2dot.Parser
bool stdinInput = True
 
bool multipleInput = False
 

额外继承的成员函数

- Protected 属性 继承自 pyqpanda3.profiling.gprof2dot.LineParser
 _stream = stream
 

详细描述

Parser for linux perf callgraph output.

It expects output generated with

# Refer to https://github.com/brendangregg/FlameGraph#dtrace
# 60 seconds of user-level stacks, including time spent in-kernel, for PID 12345 at 97 Hertz
sudo dtrace -x ustackframes=100 -n 'profile-97 /pid == 12345/ { @[ustack()] = count(); } tick-60s { exit(0); }' -o out.user_stacks

# The dtrace output
gprof2dot.py -f dtrace out.user_stacks

# Notice: sometimes, the dtrace outputs format may be latin-1, and gprof2dot will fail to parse it.
# To solve this problem, you should use iconv to convert to UTF-8 explicitly.
# TODO: add an encoding flag to tell gprof2dot how to decode the profile file.
iconv -f ISO-8859-1 -t UTF-8 out.user_stacks | gprof2dot.py -f dtrace

构造及析构函数说明

◆ __init__()

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

成员函数说明

◆ parse()

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

◆ parse_call()

pyqpanda3.profiling.gprof2dot.DtraceParser.parse_call ( self)

◆ parse_callchain()

pyqpanda3.profiling.gprof2dot.DtraceParser.parse_callchain ( self)

◆ parse_event()

pyqpanda3.profiling.gprof2dot.DtraceParser.parse_event ( self)

◆ readline()

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

类成员变量说明

◆ addr2_re

pyqpanda3.profiling.gprof2dot.DtraceParser.addr2_re = re.compile(r'\+0x[0-9a-fA-F]+$')
static

◆ call_re

pyqpanda3.profiling.gprof2dot.DtraceParser.call_re = re.compile(r'^\s+(?P<module>.*)`(?P<symbol>.*)')
static

◆ profile

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

该类的文档由以下文件生成: