-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mojo: Remove RandUint64() from CreateMessagePipe and CreateDataPipe
The calls to the CSRNG take a lot of cycles on Android, and mojo CreateMessagePipe()/CreateDataPipe() is a big contributor to the number of calls to base::RandUint64(). Those calls are used to create a pipe_id for the needs of logging and tracing. Add a base::Feature(kMojoAvoidRandomPipeId) as disabled by default. When enabled, avoids calling RandUint64() and keeps the |pipe_id| equal to 0. There are a couple of trace events that rely on |pipe_id| having a unique value for correctness. Move them under the |extended_tracing_enabled| GN flag. Under this flag the value of |kMojoAvoidRandomPipeId| is ignored, and the pipe_id is delivered by base::trace_event::GetNextGlobalTraceId(). Bug: 1351813 Change-Id: I8f2311831824c240651044795722151f58d1bee9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3825925 Reviewed-by: Ken Rockot <rockot@google.com> Reviewed-by: Alexander Timin <altimin@chromium.org> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1034950}
- Loading branch information
Showing
7 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters