![]() |
QPanda3
Supported by OriginQ
|
Parser for linux perf callgraph output. 更多...
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
| pyqpanda3.profiling.gprof2dot.DtraceParser.__init__ | ( | self, | |
| infile ) |
| pyqpanda3.profiling.gprof2dot.DtraceParser.parse | ( | self | ) |
| pyqpanda3.profiling.gprof2dot.DtraceParser.parse_call | ( | self | ) |
| pyqpanda3.profiling.gprof2dot.DtraceParser.parse_callchain | ( | self | ) |
| pyqpanda3.profiling.gprof2dot.DtraceParser.parse_event | ( | self | ) |
| pyqpanda3.profiling.gprof2dot.DtraceParser.readline | ( | self | ) |
|
static |
|
static |
| pyqpanda3.profiling.gprof2dot.DtraceParser.profile = Profile() |