Commit ea3132cb authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

Orderfile: skip madvise if ordering has not been done.

Change a CHECK to an logged warning if madvise is attempted when code
ordering has not been performed. This happens on upstream builds
including arm64 builds.

Bug: 894748
Change-Id: Icdb7ae0c94cfad5beec0215c6186e29135c1079a
Reviewed-on: https://chromium-review.googlesource.com/c/1278746Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Reviewed-by: default avatarMatthew Cary <mattcary@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599201}
parent 6e7d226c
......@@ -320,7 +320,10 @@ void NativeLibraryPrefetcher::PeriodicallyCollectResidency() {
// static
void NativeLibraryPrefetcher::MadviseForOrderfile() {
CHECK(IsOrderingSane());
if (!IsOrderingSane()) {
LOG(WARNING) << "Code not ordered, madvise optimization skipped";
return;
}
LOG(WARNING) << "Performing experimental madvise from orderfile information";
// First MADV_RANDOM on all of text, then turn the ordered text range back to
// normal. The ordered range may be placed anywhere within .text.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment