forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: Don't parse /proc/self/maps to prefetch the library.
This commit changes the behavior of the native library prefetcher to rely on sentinel symbols rather than parsing /proc/self/maps. Behavior changes: 1. This will make the code no longer prefetch .data (because we don't look for it in the mappings), neither the sections that are part of the same mapping as .text (for instance, .rodata when using ld.gold). This is intended. 2. As a consequence, the UMA metric LibraryLoader.PercentageOfResidentCodeBeforePrefetch will move, as both sides of the ratio will change, and the population will change slightly as well (since code is currently not correctly ordered on ARM64 and x86_64) - Removes the reliance on a somewhat brittle parsing of a file - Parsing /proc/self/maps costs ~50ms of CPU on a Nexus 5X (on a little core, as this is triggered from an AsyncTask) - Allows to only fetch part of the native library (in a forthcoming CL) Rationale: Change-Id: I0bb7b28af3c3bd4af5745e2ebcc1fbf283bcc0c1 Reviewed-on: https://chromium-review.googlesource.com/874470 Commit-Queue: Benoit L <lizeb@chromium.org> Reviewed-by: Egor Pasko <pasko@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Reviewed-by: Matthew Cary <mattcary@chromium.org> Cr-Commit-Position: refs/heads/master@{#531515}
- Loading branch information
Benoit Lize
authored and
Commit Bot
committed
Jan 24, 2018
1 parent
102db4c
commit ef6f0fb
Showing
9 changed files
with
117 additions
and
318 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
Oops, something went wrong.