tracing: Send bigger proto trace slices via mojo pipe in ConsumerHost
Previously, we were writing individual packet headers + payloads one by one onto the mojo pipe. Internally, each write causes a memcpy into a shmem buffer and a mojo notification to be sent to the Consumer to read the data from the buffer. This was probably not a big problem when a trace packet contained many trace events, but now that each packet is only a single event (and especially now that each COMPLETE event is split into separate begin/end events, i.e. separate packets), this causes a lot of overhead. Instead, this patch modifies ConsumerHost to write a single slice per ReadBuffer callback to the mojo pipe, which makes proto trace collection significantly faster. Bug: 1039726 Change-Id: I057c68ffafb99cbd2b41d6c6308391cc11cf1883 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1991448 Auto-Submit: Eric Seckler <eseckler@chromium.org> Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Reviewed-by:Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#730178}
Showing
Please register or sign in to comment