commit | 645a61e9d8bcf661ea0a6f22fc94db27745a09b5 | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Thu Dec 05 14:14:00 2019 +0000 |
committer | Primiano Tucci <primiano@google.com> | Thu Dec 05 14:20:15 2019 +0000 |
tree | 406219e0201ccdb74f1b4ed468f83014a04a6459 | |
parent | 79dd3bc3540a88a6fdd39266b98db3b3f8a4fe2b [diff] |
Use base::FlatSet for pid tracking in ftrace metadata The old code was appending to a never-ending vector, speculating that the last pid inserted would show up over and over again. That speculation was wrong and in some cases it would cause the metadata vector to grow to +16MB. Use FlatSet, reduce overhead, make memory bounded to the number of distinct pids. Also add a bitset cache ahead of the FlatSet. It makes AddPid() even faster, saving 1% to 2% on very large workloads. Bug: 145398368 Change-Id: I3baffa772ace8267e49daa6101ed92ff913d67c2
Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.
See www.perfetto.dev for docs.
You can reach us on our Discord channel. If you prefer using IRC we have an experimental Discord <> IRC bridge synced with #perfetto-dev
on Freenode.