commit | 7762ef107963a82c6af0a3e0139411c3d9f0f75e | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Thu Oct 08 22:04:49 2020 +0200 |
committer | Primiano Tucci <primiano@google.com> | Thu Oct 08 22:04:49 2020 +0200 |
tree | abf299d3f9157a8f430c38c443e7e6c2c700e4f0 | |
parent | 02a7aa75bb248633459f159d0769edfa5d18a57e [diff] |
Add support for symbolizing kernel symbols for ftrace events Makes use of the kallsyms parser perviously introduced by aosp/1196774. The parser is enabled only when setting symbolize_ksyms=true in the FtraceConfig proto. For now the CL works only when perfetto is run as root on dev phones. Will follow up with security team to figure out a way forward. This CL uses the FtraceMetadata to keep track of the incremental symbols discovered. FtraceMetadata is shared across all cpus, but is per-session. As a summary this is the whole callstack of a ftrace read cycle: FtraceController::ReadTick() for cpu = 0 .. num_cpus CpuReader[i].ReadCycle(data_sources) for (batch = 0; ...; batch++) ReadAndProcessBatch(data_sources) for (ds : data_sources) ProcessPagesForDataSource(ds) writes metadata OnFtraceDataWrittenIntoDataSourceBuffers() for (ds : data_souces) // Forward metadata to other data souces. metadata->Clear() Design doc: go/perfetto-kallsyms Bug: 147809529 Test: still TODO (but tested manually) Change-Id: I59be90da96513c9e99981f73035dd7ee3a822d49
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.