diff options
| author | David Sehr <sehr@google.com> | 2019-05-31 14:23:12 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-05-31 14:23:12 +0000 |
| commit | b1ec00b5ea9402a4e5ab0d0447b7aac8f103f837 (patch) | |
| tree | c415a76b8eaf2427d01282825b5db71760e0f8c3 /core | |
| parent | 55d1b0500aa60da2e3e6766e4e005148233eb402 (diff) | |
| parent | 26a6427c4459980f1fccfa1e82247ad3a378afd3 (diff) | |
Merge "Add system option to disable lock profiling"
Diffstat (limited to 'core')
| -rw-r--r-- | core/jni/AndroidRuntime.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 1854ea940379..fc9c49573a7f 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -237,6 +237,11 @@ static const char* ENABLE_APEX_IMAGE = "enable_apex_image"; // Flag to pass to the runtime when using the apex image. static const char* kApexImageOption = "-Ximage:/system/framework/apex.art"; +// Feature flag name for disabling lock profiling. +static const char* DISABLE_LOCK_PROFILING = "disable_lock_profiling"; +// Runtime option disabling lock profiling. +static const char* kLockProfThresholdRuntimeOption = "-Xlockprofthreshold:0"; + static AndroidRuntime* gCurRuntime = NULL; /* @@ -685,6 +690,17 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) ALOGI("Using default boot image"); } + std::string disable_lock_profiling = + server_configurable_flags::GetServerConfigurableFlag(RUNTIME_NATIVE_BOOT_NAMESPACE, + DISABLE_LOCK_PROFILING, + /*default_value=*/ ""); + if (disable_lock_profiling == "true") { + addOption(kLockProfThresholdRuntimeOption); + ALOGI("Disabling lock profiling: '%s'\n", kLockProfThresholdRuntimeOption); + } else { + ALOGI("Leaving lock profiling enabled"); + } + bool checkJni = false; property_get("dalvik.vm.checkjni", propBuf, ""); if (strcmp(propBuf, "true") == 0) { |
