commit | 7ed308fcfbb8df4f1674a0235e020aafe4e763ed | [log] [tgz] |
---|---|---|
author | Lalit Maganti <lalitm@google.com> | Thu Oct 17 11:38:24 2019 +0100 |
committer | Lalit Maganti <lalitm@google.com> | Thu Oct 17 11:38:24 2019 +0100 |
tree | c99f8ed93a7d551529ee6f7f77c8d30fae7b47e1 | |
parent | c075d03c8200abd9d58d68c4dc0461724dfaf1f9 [diff] |
trace_processor: add all bits iterator This CL adds an iterator implementation for all the bits of a bitvector. We need this because we often want to iterate through the bits and make changes as we iterate. This is inefficient if BitVector::Set is used however, because the counts vector is constantly updated making the whole algorithm O(n^2). The new bitvector implementation instead defers updating counts until the end of each block and only updates the next block's count. This makes the algorithm O(n) instead. We also add a base class for the iterator because we also want a SetBitsIterator which will share much of the code. This common code has been factored out into BaseIterator. Bug: 137284957 Change-Id: Ie58cccca87a78e53a60e94006714c11983791613
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.