commit | 2838cdf437e91da75c05a7bb5f4b525f99c57c74 | [log] [tgz] |
---|---|---|
author | Mohit Saini <mohitms@google.com> | Thu Feb 17 09:58:25 2022 +0000 |
committer | Mohit Saini <mohitms@google.com> | Thu Feb 17 09:58:25 2022 +0000 |
tree | eb872299b160df8e20303888d50c8a526e20df29 | |
parent | 7a348363a0c5434ed9aaccd3453a8396df179356 [diff] |
Support gzip files in trace_to_text Core change in trace_to_text: 1. Add `OnlineTraceToText` utility by refactoring the core TraceToText code to make it easy to use, easy to test independently without much boilerplate code and easy to compose with other streaming algorithms. Client OnlineTraceToText can continue to `feed` it a sequence of mem-blocks, and it will continue to write the output in a out_stream. 2. Rewrite trace_to_text driver function, which first figures out if the input file is gzip or proto files and setup/wire the streaming components as follows: when gzip file: {InputFile} --> {Streaming GzipDecompress} --> {OnlineTraceToText} || || \/ {Output} when proto file: {InputFile} --> {OnlineTraceToText} --> {Output} The data is streamed from one component to the next one, in a sequence of mem-block, and finally written to the output_file/stdout. 3. Some other minor cleanup/refactoring in trace_to_text code. 4. Manual testing: For `example_android_trace_15s.gz` attached on b/148130323: >> ./tools/traceconv text /tmp/e_trace_15s > /tmp/p1.txt >> ./out/default/trace_to_text text /tmp/e_trace_15s > /tmp/p2.txt >> ./out/default/trace_to_text text /tmp/e_trace_15s.gz > /tmp/p3.txt >> md5sum /tmp/p1.txt ac7b8b397d3e5e543e91d2c909c35416 // [Baseline (before this CL)] >> md5sum /tmp/p2.txt ac7b8b397d3e5e543e91d2c909c35416 // [trace2text after this CL] >> md5sum /tmp/p3.txt ac7b8b397d3e5e543e91d2c909c35416 // [decompress + trace2text after this CL] Bug: 148130323 Change-Id: I2c8aa080aba45434e202bd9ff99c4a20de69571e
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.