SizeProfileComputer optimizations - Refactor as an iterator: This allows filling ContentAnalyzerModule::aggregated_samples_ more directly and avoids redundant work. - Use uint32_t field_idx/type as map key instead of string. - Improve hashing function by shifting result. - Use unordered_map instead of FlatHashMap: showed ~10% speedup in local runs. Results: On Linux cloudtop, chrome_android_systrace.pftrace-chrome ingest_time (% represents total overhead compared to baseline): Baseline: 5.083 analyze enabled: 12.54 (146%) patchset 1: 6.334 (24%) + accumulate sizes (using vector): 6.454 (27%) + reuse SizeProfileComputer: 5.92 (16%) <<< + using base::Hash: 6.15 (21%) Change-Id: Ia46029466d62b29b24fea7ff0e2883501ab16b8b
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.