summaryrefslogtreecommitdiff
path: root/startop/scripts/trace_analyzer/trace_analyzer.py
AgeCommit message (Collapse)Author
2019-06-26startop: Add iorap compiler written in pythonIgor Murashkin
Compiler will be used for experimentation purpose since it's both easier to develop in python and it accepts ftrace, making it very easy to write complicated-experimental changes that we aren't sure are worth it yet for the on-device C++/perfetto compiler. This 'new' compiler accepts ftrace/systrace files as input, then generates an in-memory sqlite3 database (using the trace_analyzer source code), and finally code-generates a TraceFile.pb protobuf. (Also refactor trace_analyzer into a library, and update it to parse systrace.html files) Limitations: currently does not accept perfetto_trace.pb files due to 'ofs' fields missing (see bug#135555191) Test: py.test-3 frameworks/base/startop/scripts Test: ./compiler.py -i tmp_sargo/textcache -t tmp_sargo/trace.html -o tmp/output.pb Test: ./compiler.py -i tmp_sargo/textcache -t tmp_sargo/trace.html -o tmp/output.pb -f '^/data' Test: ./trace_analyzer music_run.trace tmp_dbs/12345.db Bug: 135557978 Bug: 134789969 Change-Id: Ic8295900ee9e634b4cfd8cf99b671ae08d2ea4f7
2019-06-10startop: Add script to analyze block I/O from an ftrace fileIgor Murashkin
Adds a simple python parser to convert .ftrace file into sqlite3 database. The rest of the analysis logic is done through a series of SQL commands that build tables/views/select queries. Bug: 134705245 Test: trace_analyzer some_ftrace_file.trace tmp_file.db Change-Id: I25274e25a0ab1f091ae4e6161e6726e006e346a5