Add -XX:MadviseRandomAccess option
If enabled, ART will advise random access to the kernel for files
that are thought to have such access patterns.
Bug: 67772594
Test: verify that -XX:MadviseRandomAccess:true is passed to runtime init
(cherry picked from commit 087f2046dfdf41646c740a05004b4d40cbd99b11)
Change-Id: I76a5f62846d563a4f2cf25e47dbd320464aee8c1
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 9888186..9841a95 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -159,6 +159,10 @@
.WithType<bool>()
.WithValueMap({{"false", false}, {"true", true}})
.IntoKey(M::DumpNativeStackOnSigQuit)
+ .Define("-XX:MadviseRandomAccess:_")
+ .WithType<bool>()
+ .WithValueMap({{"false", false}, {"true", true}})
+ .IntoKey(M::MadviseRandomAccess)
.Define("-Xusejit:_")
.WithType<bool>()
.WithValueMap({{"false", false}, {"true", true}})
@@ -717,6 +721,7 @@
UsageMessage(stream, " -XX:LargeObjectSpace={disabled,map,freelist}\n");
UsageMessage(stream, " -XX:LargeObjectThreshold=N\n");
UsageMessage(stream, " -XX:DumpNativeStackOnSigQuit=booleanvalue\n");
+ UsageMessage(stream, " -XX:MadviseRandomAccess:booleanvalue\n");
UsageMessage(stream, " -XX:SlowDebug={false,true}\n");
UsageMessage(stream, " -Xmethod-trace\n");
UsageMessage(stream, " -Xmethod-trace-file:filename");