commit | 77667571535ac2b0e346cf1ce4d0577f57493dbb | [log] [tgz] |
---|---|---|
author | Hector Dearman <hjd@google.com> | Tue May 04 18:26:40 2021 +0100 |
committer | Hector Dearman <hjd@google.com> | Tue May 04 17:27:18 2021 +0000 |
tree | f4b6e2d820041ff3d09ab672034ec186c20bcd6e | |
parent | 889b849e6b1066f9fccfaad54508c77fe43516cb [diff] |
ui: Immediately download trace from tools/record_android_trace tools/record_android_trace works by recording a trace then (briefly) hosting it on a local web server and opening a tab with: https://ui.perfetto.dev/#!/?url=http://127.0.0.1:9001/foo.trace As the UI loads, it fetches the trace from the local webserver. Once this happens the webserver exits. The UI uses the 'URL' engine scheme for these traces. If the user creates a permalink for a trace with this scheme the trace is not uploaded - we assume that we can fetch it at will from the URL. This is doubly wrong for traces sourced from tools/record_android_trace. Firstly http://127.0.0.1 means something different for each machine and secondly the webserver has exited and is no longer running. To avoid this problem we modify the ?url= handling code to immediately download traces which come from 127.0.0.1 and thence use the File engine scheme which will cause the trace to be uploaded if a permalink is shared. Bug: b/185235837 Change-Id: Icb41d95efba24d3f9c7aa8bc3d453882d53561a4
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.