Merge "Add gctype device config property for GC experiments"
am: e24b30b7d4
Change-Id: I5c78c553e1bd1fe610e797c5f6ca4cc1a711721c
This commit is contained in:
@@ -290,6 +290,7 @@ cc_library_shared {
|
|||||||
"libhwui",
|
"libhwui",
|
||||||
"libdl",
|
"libdl",
|
||||||
"libstatslog",
|
"libstatslog",
|
||||||
|
"server_configurable_flags",
|
||||||
],
|
],
|
||||||
|
|
||||||
generated_sources: ["android_util_StatsLog.cpp"],
|
generated_sources: ["android_util_StatsLog.cpp"],
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <binder/Parcel.h>
|
#include <binder/Parcel.h>
|
||||||
#include <utils/threads.h>
|
#include <utils/threads.h>
|
||||||
#include <cutils/properties.h>
|
#include <cutils/properties.h>
|
||||||
|
#include <server_configurable_flags/get_flags.h>
|
||||||
|
|
||||||
#include <SkGraphics.h>
|
#include <SkGraphics.h>
|
||||||
|
|
||||||
@@ -769,7 +770,17 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
|
|||||||
addOption("-XX:LowMemoryMode");
|
addOption("-XX:LowMemoryMode");
|
||||||
}
|
}
|
||||||
|
|
||||||
parseRuntimeOption("dalvik.vm.gctype", gctypeOptsBuf, "-Xgc:");
|
std::string gc_type_override =
|
||||||
|
server_configurable_flags::GetServerConfigurableFlag("runtime_native", "gctype", "");
|
||||||
|
std::string gc_type_override_temp;
|
||||||
|
if (gc_type_override.empty()) {
|
||||||
|
parseRuntimeOption("dalvik.vm.gctype", gctypeOptsBuf, "-Xgc:");
|
||||||
|
} else {
|
||||||
|
// Copy the string so it doesn't go out of scope since addOption does not make a copy.
|
||||||
|
gc_type_override_temp = "-Xgc:" + gc_type_override;
|
||||||
|
addOption(gc_type_override_temp.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
parseRuntimeOption("dalvik.vm.backgroundgctype", backgroundgcOptsBuf, "-XX:BackgroundGC=");
|
parseRuntimeOption("dalvik.vm.backgroundgctype", backgroundgcOptsBuf, "-XX:BackgroundGC=");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user