Merge "Debug.isVmapStack reads kernel configs only" into rvc-dev am: 3c706cfcac am: 028a7d16a0

Change-Id: Idd99b9e076c747033abb5b6e4cb7d26d65688471
This commit is contained in:
Automerger Merge Worker
2020-03-12 18:13:21 +00:00

View File

@@ -853,8 +853,11 @@ static jboolean android_os_Debug_isVmapStack(JNIEnv *env, jobject clazz)
} cfg_state = CONFIG_UNKNOWN;
if (cfg_state == CONFIG_UNKNOWN) {
const std::map<std::string, std::string> configs =
vintf::VintfObject::GetInstance()->getRuntimeInfo()->kernelConfigs();
auto runtime_info = vintf::VintfObject::GetInstance()
->getRuntimeInfo(false /* skip cache */,
vintf::RuntimeInfo::FetchFlag::CONFIG_GZ);
CHECK(runtime_info != nullptr) << "Kernel configs cannot be fetched. b/151092221";
const std::map<std::string, std::string>& configs = runtime_info->kernelConfigs();
std::map<std::string, std::string>::const_iterator it = configs.find("CONFIG_VMAP_STACK");
cfg_state = (it != configs.end() && it->second == "y") ? CONFIG_SET : CONFIG_UNSET;
}