Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License") |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef RUNTIME_OPTIONS_KEY |
| 18 | #error "Please #define RUNTIME_OPTIONS_KEY before #including this file" |
| 19 | #define RUNTIME_OPTIONS_KEY(...) // Don't display errors in this file in IDEs. |
| 20 | #endif |
| 21 | |
| 22 | // This file defines the list of keys for RuntimeOptions. |
| 23 | // These can be used with RuntimeOptions.Get/Set/etc, for example: |
Nicolas Geoffray | 3d8a78a | 2018-08-29 21:10:16 +0000 | [diff] [blame] | 24 | // RuntimeOptions opt; bool* image_dex2oat_enabled = opt.Get(RuntimeOptions::ImageDex2Oat); |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 25 | // |
| 26 | // Column Descriptions: |
| 27 | // <<Type>> <<Key Name>> <<Default Value>> |
| 28 | // |
| 29 | // Default values are only used by Map::GetOrDefault(K<T>). |
| 30 | // If a default value is omitted here, T{} is used as the default value, which is |
| 31 | // almost-always the value of the type as if it was memset to all 0. |
| 32 | // |
Igor Murashkin | c449e8b | 2015-06-10 15:56:42 -0700 | [diff] [blame] | 33 | // Please keep the columns aligned if possible when adding new rows. |
| 34 | // |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 35 | |
| 36 | // Parse-able keys from the command line. |
| 37 | RUNTIME_OPTIONS_KEY (Unit, Zygote) |
Nicolas Geoffray | 4444f1b | 2019-06-10 14:09:19 +0100 | [diff] [blame] | 38 | RUNTIME_OPTIONS_KEY (Unit, PrimaryZygote) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 39 | RUNTIME_OPTIONS_KEY (Unit, Help) |
| 40 | RUNTIME_OPTIONS_KEY (Unit, ShowVersion) |
Vladimir Marko | 91f1032 | 2018-12-07 18:04:10 +0000 | [diff] [blame] | 41 | RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPath) // std::vector<std::string> |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 42 | RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPathLocations) // std::vector<std::string> |
| 43 | RUNTIME_OPTIONS_KEY (std::string, ClassPath) |
| 44 | RUNTIME_OPTIONS_KEY (std::string, Image) |
| 45 | RUNTIME_OPTIONS_KEY (Unit, CheckJni) |
| 46 | RUNTIME_OPTIONS_KEY (Unit, JniOptsForceCopy) |
Alex Light | 10592e3 | 2020-12-11 19:54:32 +0000 | [diff] [blame] | 47 | RUNTIME_OPTIONS_KEY (std::string, JdwpOptions, "suspend=n,server=y") |
Alex Light | baac7e4 | 2018-06-08 15:30:11 +0000 | [diff] [blame] | 48 | RUNTIME_OPTIONS_KEY (JdwpProvider, JdwpProvider, JdwpProvider::kUnset) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 49 | RUNTIME_OPTIONS_KEY (MemoryKiB, MemoryMaximumSize, gc::Heap::kDefaultMaximumSize) // -Xmx |
| 50 | RUNTIME_OPTIONS_KEY (MemoryKiB, MemoryInitialSize, gc::Heap::kDefaultInitialSize) // -Xms |
| 51 | RUNTIME_OPTIONS_KEY (MemoryKiB, HeapGrowthLimit) // Default is 0 for unlimited |
| 52 | RUNTIME_OPTIONS_KEY (MemoryKiB, HeapMinFree, gc::Heap::kDefaultMinFree) |
| 53 | RUNTIME_OPTIONS_KEY (MemoryKiB, HeapMaxFree, gc::Heap::kDefaultMaxFree) |
| 54 | RUNTIME_OPTIONS_KEY (MemoryKiB, NonMovingSpaceCapacity, gc::Heap::kDefaultNonMovingSpaceCapacity) |
Hans Boehm | bb2467b | 2019-03-29 22:55:06 -0700 | [diff] [blame] | 55 | RUNTIME_OPTIONS_KEY (MemoryKiB, StopForNativeAllocs, 1 * GB) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 56 | RUNTIME_OPTIONS_KEY (double, HeapTargetUtilization, gc::Heap::kDefaultTargetUtilization) |
| 57 | RUNTIME_OPTIONS_KEY (double, ForegroundHeapGrowthMultiplier, gc::Heap::kDefaultHeapGrowthMultiplier) |
Mathieu Chartier | 10d6886 | 2015-04-15 14:21:33 -0700 | [diff] [blame] | 58 | RUNTIME_OPTIONS_KEY (unsigned int, ParallelGCThreads, 0u) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 59 | RUNTIME_OPTIONS_KEY (unsigned int, ConcGCThreads) |
Hans Boehm | b215557 | 2019-03-27 14:25:53 -0700 | [diff] [blame] | 60 | RUNTIME_OPTIONS_KEY (unsigned int, FinalizerTimeoutMs, 10000u) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 61 | RUNTIME_OPTIONS_KEY (Memory<1>, StackSize) // -Xss |
| 62 | RUNTIME_OPTIONS_KEY (unsigned int, MaxSpinsBeforeThinLockInflation,Monitor::kDefaultMaxSpinsBeforeThinLockInflation) |
| 63 | RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ |
| 64 | LongPauseLogThreshold, gc::Heap::kDefaultLongPauseLogThreshold) |
| 65 | RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ |
| 66 | LongGCLogThreshold, gc::Heap::kDefaultLongGCLogThreshold) |
Mathieu Chartier | 3fceaf5 | 2017-01-22 13:33:40 -0800 | [diff] [blame] | 67 | RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ |
| 68 | ThreadSuspendTimeout, ThreadList::kDefaultThreadSuspendTimeout) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 69 | RUNTIME_OPTIONS_KEY (Unit, DumpGCPerformanceOnShutdown) |
Albert Mingkun Yang | de94ea7 | 2018-11-16 10:15:49 +0000 | [diff] [blame] | 70 | RUNTIME_OPTIONS_KEY (Unit, DumpRegionInfoBeforeGC) |
| 71 | RUNTIME_OPTIONS_KEY (Unit, DumpRegionInfoAfterGC) |
Mathieu Chartier | a4885cb | 2015-03-09 15:38:54 -0700 | [diff] [blame] | 72 | RUNTIME_OPTIONS_KEY (Unit, DumpJITInfoOnShutdown) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 73 | RUNTIME_OPTIONS_KEY (Unit, IgnoreMaxFootprint) |
Alex Light | b5a0e91 | 2020-07-23 10:54:47 -0700 | [diff] [blame] | 74 | RUNTIME_OPTIONS_KEY (bool, AlwaysLogExplicitGcs, true) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 75 | RUNTIME_OPTIONS_KEY (Unit, LowMemoryMode) |
Hiroshi Yamauchi | 49b7134 | 2015-05-15 16:24:24 -0700 | [diff] [blame] | 76 | RUNTIME_OPTIONS_KEY (bool, UseTLAB, (kUseTlab || kUseReadBarrier)) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 77 | RUNTIME_OPTIONS_KEY (bool, EnableHSpaceCompactForOOM, true) |
Nicolas Geoffray | a5ca8eb | 2018-08-24 13:39:13 +0100 | [diff] [blame] | 78 | RUNTIME_OPTIONS_KEY (bool, UseJitCompilation, true) |
Nicolas Geoffray | 4bf753d | 2020-12-14 20:33:53 +0000 | [diff] [blame] | 79 | RUNTIME_OPTIONS_KEY (bool, UseProfiledJitCompilation, false) |
Nicolas Geoffray | 6ee4971 | 2018-03-30 14:39:05 +0000 | [diff] [blame] | 80 | RUNTIME_OPTIONS_KEY (bool, DumpNativeStackOnSigQuit, true) |
Mathieu Chartier | c42cb0e | 2017-10-13 11:35:00 -0700 | [diff] [blame] | 81 | RUNTIME_OPTIONS_KEY (bool, MadviseRandomAccess, false) |
Alex Light | 4ca2f48 | 2019-11-25 16:07:22 -0800 | [diff] [blame] | 82 | RUNTIME_OPTIONS_KEY (JniIdType, OpaqueJniIds, JniIdType::kDefault) // -Xopaque-jni-ids:{true, false, swapable} |
| 83 | RUNTIME_OPTIONS_KEY (bool, AutoPromoteOpaqueJniIds, true) // testing use only. -Xauto-promote-opaque-jni-ids:{true, false} |
Andreas Gampe | 7897cec | 2017-07-19 16:28:59 -0700 | [diff] [blame] | 84 | RUNTIME_OPTIONS_KEY (unsigned int, JITCompileThreshold) |
Nicolas Geoffray | 83f080a | 2016-03-08 16:50:21 +0000 | [diff] [blame] | 85 | RUNTIME_OPTIONS_KEY (unsigned int, JITWarmupThreshold) |
| 86 | RUNTIME_OPTIONS_KEY (unsigned int, JITOsrThreshold) |
Calin Juravle | b2771b4 | 2016-04-07 17:09:25 +0100 | [diff] [blame] | 87 | RUNTIME_OPTIONS_KEY (unsigned int, JITPriorityThreadWeight) |
Calin Juravle | 155ff3d | 2016-04-27 14:14:58 +0100 | [diff] [blame] | 88 | RUNTIME_OPTIONS_KEY (unsigned int, JITInvokeTransitionWeight) |
Nicolas Geoffray | 47b9580 | 2018-05-16 15:42:17 +0100 | [diff] [blame] | 89 | RUNTIME_OPTIONS_KEY (int, JITPoolThreadPthreadPriority, jit::kJitPoolThreadPthreadDefaultPriority) |
Nicolas Geoffray | 4bf753d | 2020-12-14 20:33:53 +0000 | [diff] [blame] | 90 | RUNTIME_OPTIONS_KEY (int, JITZygotePoolThreadPthreadPriority, jit::kJitZygotePoolThreadPthreadDefaultPriority) |
Nicolas Geoffray | 0a3be16 | 2015-11-18 11:15:22 +0000 | [diff] [blame] | 91 | RUNTIME_OPTIONS_KEY (MemoryKiB, JITCodeCacheInitialCapacity, jit::JitCodeCache::kInitialCapacity) |
| 92 | RUNTIME_OPTIONS_KEY (MemoryKiB, JITCodeCacheMaxCapacity, jit::JitCodeCache::kMaxCapacity) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 93 | RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ |
| 94 | HSpaceCompactForOOMMinIntervalsMs,\ |
| 95 | MsToNs(100 * 1000)) // 100s |
| 96 | RUNTIME_OPTIONS_KEY (std::vector<std::string>, \ |
| 97 | PropertiesList) // -D<whatever> -D<whatever> ... |
| 98 | RUNTIME_OPTIONS_KEY (std::string, JniTrace) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 99 | RUNTIME_OPTIONS_KEY (bool, Relocate, kDefaultMustRelocate) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 100 | RUNTIME_OPTIONS_KEY (bool, ImageDex2Oat, true) |
Roland Levillain | 0d5a281 | 2015-11-13 10:07:31 +0000 | [diff] [blame] | 101 | RUNTIME_OPTIONS_KEY (bool, Interpret, false) // -Xint |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 102 | // Disable the compiler for CC (for now). |
| 103 | RUNTIME_OPTIONS_KEY (XGcOption, GcOption) // -Xgc: |
| 104 | RUNTIME_OPTIONS_KEY (gc::space::LargeObjectSpaceType, \ |
| 105 | LargeObjectSpace, gc::Heap::kDefaultLargeObjectSpaceType) |
| 106 | RUNTIME_OPTIONS_KEY (Memory<1>, LargeObjectThreshold, gc::Heap::kDefaultLargeObjectThreshold) |
| 107 | RUNTIME_OPTIONS_KEY (BackgroundGcOption, BackgroundGc) |
| 108 | |
| 109 | RUNTIME_OPTIONS_KEY (Unit, DisableExplicitGC) |
Calin Juravle | 01aaf6e | 2015-06-19 22:05:39 +0100 | [diff] [blame] | 110 | RUNTIME_OPTIONS_KEY (Unit, NoSigChain) |
Calin Juravle | d3e7c6c | 2016-02-04 19:07:51 +0000 | [diff] [blame] | 111 | RUNTIME_OPTIONS_KEY (Unit, ForceNativeBridge) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 112 | RUNTIME_OPTIONS_KEY (LogVerbosity, Verbose) |
| 113 | RUNTIME_OPTIONS_KEY (unsigned int, LockProfThreshold) |
Andreas Gampe | d0210e5 | 2017-06-23 13:38:09 -0700 | [diff] [blame] | 114 | RUNTIME_OPTIONS_KEY (unsigned int, StackDumpLockProfThreshold) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 115 | RUNTIME_OPTIONS_KEY (Unit, MethodTrace) |
Calin Juravle | f83e733 | 2015-11-04 16:16:47 +0000 | [diff] [blame] | 116 | RUNTIME_OPTIONS_KEY (std::string, MethodTraceFile, "/data/misc/trace/method-trace-file.bin") |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 117 | RUNTIME_OPTIONS_KEY (unsigned int, MethodTraceFileSize, 10 * MB) |
Andreas Gampe | 40da286 | 2015-02-27 12:49:04 -0800 | [diff] [blame] | 118 | RUNTIME_OPTIONS_KEY (Unit, MethodTraceStreaming) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 119 | RUNTIME_OPTIONS_KEY (TraceClockSource, ProfileClock, kDefaultTraceClockSource) // -Xprofile: |
Calin Juravle | 138dbff | 2016-06-28 19:36:58 +0100 | [diff] [blame] | 120 | RUNTIME_OPTIONS_KEY (ProfileSaverOptions, ProfileSaverOpts) // -Xjitsaveprofilinginfo, -Xps-* |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 121 | RUNTIME_OPTIONS_KEY (std::string, Compiler) |
| 122 | RUNTIME_OPTIONS_KEY (std::vector<std::string>, \ |
| 123 | CompilerOptions) // -Xcompiler-option ... |
| 124 | RUNTIME_OPTIONS_KEY (std::vector<std::string>, \ |
| 125 | ImageCompilerOptions) // -Ximage-compiler-option ... |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 126 | RUNTIME_OPTIONS_KEY (verifier::VerifyMode, \ |
| 127 | Verify, verifier::VerifyMode::kEnable) |
David Brazdil | 2bb2fbd | 2018-11-13 18:24:26 +0000 | [diff] [blame] | 128 | RUNTIME_OPTIONS_KEY (unsigned int, TargetSdkVersion, \ |
| 129 | static_cast<unsigned int>(SdkVersion::kUnset)) |
David Brazdil | 6dfdfef | 2019-04-11 17:39:11 +0100 | [diff] [blame] | 130 | RUNTIME_OPTIONS_KEY (hiddenapi::EnforcementPolicy, |
| 131 | HiddenApiPolicy, |
| 132 | hiddenapi::EnforcementPolicy::kDisabled) |
| 133 | RUNTIME_OPTIONS_KEY (hiddenapi::EnforcementPolicy, |
| 134 | CorePlatformApiPolicy, |
| 135 | hiddenapi::EnforcementPolicy::kDisabled) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 136 | RUNTIME_OPTIONS_KEY (std::string, NativeBridge) |
Igor Murashkin | c449e8b | 2015-06-10 15:56:42 -0700 | [diff] [blame] | 137 | RUNTIME_OPTIONS_KEY (unsigned int, ZygoteMaxFailedBoots, 10) |
Dmitriy Ivanov | 785049f | 2014-07-18 10:08:57 -0700 | [diff] [blame] | 138 | RUNTIME_OPTIONS_KEY (std::string, CpuAbiList) |
Andreas Gampe | dd67125 | 2015-07-23 14:37:18 -0700 | [diff] [blame] | 139 | RUNTIME_OPTIONS_KEY (std::string, Fingerprint) |
Andreas Gampe | 01fd70b | 2017-01-25 10:03:08 -0800 | [diff] [blame] | 140 | RUNTIME_OPTIONS_KEY (ExperimentalFlags, Experimental, ExperimentalFlags::kNone) // -Xexperimental:{...} |
Andreas Gampe | aadcbc6 | 2017-12-28 14:05:42 -0800 | [diff] [blame] | 141 | RUNTIME_OPTIONS_KEY (std::list<ti::AgentSpec>, AgentLib) // -agentlib:<libname>=<options> |
| 142 | RUNTIME_OPTIONS_KEY (std::list<ti::AgentSpec>, AgentPath) // -agentpath:<libname>=<options> |
Andreas Gampe | 01fd70b | 2017-01-25 10:03:08 -0800 | [diff] [blame] | 143 | RUNTIME_OPTIONS_KEY (std::vector<Plugin>, Plugins) // -Xplugin:<library> |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 144 | |
| 145 | // Not parse-able from command line, but can be provided explicitly. |
Igor Murashkin | c449e8b | 2015-06-10 15:56:42 -0700 | [diff] [blame] | 146 | // (Do not add anything here that is defined in ParsedOptions::MakeParser) |
Vladimir Marko | 9bdf108 | 2016-01-21 12:15:52 +0000 | [diff] [blame] | 147 | RUNTIME_OPTIONS_KEY (std::vector<std::unique_ptr<const DexFile>>*, \ |
| 148 | BootClassPathDexList) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 149 | RUNTIME_OPTIONS_KEY (InstructionSet, ImageInstructionSet, kRuntimeISA) |
Roland Levillain | 87beba3 | 2019-08-09 14:20:32 +0100 | [diff] [blame] | 150 | RUNTIME_OPTIONS_KEY (CompilerCallbacks*, CompilerCallbacksPtr) // TODO: make unique_ptr |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 151 | RUNTIME_OPTIONS_KEY (bool (*)(), HookIsSensitiveThread) |
| 152 | RUNTIME_OPTIONS_KEY (int32_t (*)(FILE* stream, const char* format, va_list ap), \ |
| 153 | HookVfprintf, vfprintf) |
Hiroshi Yamauchi | 249b4d1 | 2016-05-11 19:27:44 -0700 | [diff] [blame] | 154 | // Use _exit instead of exit so that we won't get DCHECK failures in global data |
| 155 | // destructors. b/28106055. |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 156 | RUNTIME_OPTIONS_KEY (void (*)(int32_t status), \ |
Hiroshi Yamauchi | 249b4d1 | 2016-05-11 19:27:44 -0700 | [diff] [blame] | 157 | HookExit, _exit) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 158 | // We don't call abort(3) by default; see |
| 159 | // Runtime::Abort. |
| 160 | RUNTIME_OPTIONS_KEY (void (*)(), HookAbort, nullptr) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 161 | |
Andreas Gampe | 1c5b42f | 2017-06-15 18:20:45 -0700 | [diff] [blame] | 162 | RUNTIME_OPTIONS_KEY (bool, SlowDebug, false) |
| 163 | |
Andreas Gampe | 1b35b46 | 2017-09-29 18:52:15 -0700 | [diff] [blame] | 164 | RUNTIME_OPTIONS_KEY (unsigned int, GlobalRefAllocStackTraceLimit, 0) // 0 = off |
Andreas Gampe | 25419b5 | 2018-02-08 21:30:26 -0800 | [diff] [blame] | 165 | RUNTIME_OPTIONS_KEY (Unit, UseStderrLogger) |
Andreas Gampe | 1b35b46 | 2017-09-29 18:52:15 -0700 | [diff] [blame] | 166 | |
Nicolas Geoffray | 66ff8a8 | 2018-02-28 13:27:55 +0000 | [diff] [blame] | 167 | RUNTIME_OPTIONS_KEY (Unit, OnlyUseSystemOatFiles) |
Andreas Gampe | 0b0ffc1 | 2018-08-01 14:41:27 -0700 | [diff] [blame] | 168 | RUNTIME_OPTIONS_KEY (unsigned int, VerifierLoggingThreshold, 100) |
Nicolas Geoffray | 66ff8a8 | 2018-02-28 13:27:55 +0000 | [diff] [blame] | 169 | |
Andreas Gampe | 87658f3 | 2019-04-18 18:39:02 +0000 | [diff] [blame] | 170 | RUNTIME_OPTIONS_KEY (bool, FastClassNotFoundException, true) |
Andreas Gampe | a83a889 | 2019-07-18 13:43:15 -0700 | [diff] [blame] | 171 | RUNTIME_OPTIONS_KEY (bool, VerifierMissingKThrowFatal, true) |
Andreas Gampe | 87658f3 | 2019-04-18 18:39:02 +0000 | [diff] [blame] | 172 | |
Florian Mayer | 0972d08 | 2020-05-15 14:07:31 +0200 | [diff] [blame] | 173 | // Whether to allow loading of the perfetto hprof plugin. |
| 174 | // Even with this option set, we will still only actually load the plugin |
| 175 | // if we are on a userdebug build or the app is debuggable or profileable. |
| 176 | // |
| 177 | // We do not want to enable this by default because PerfettoHprof does not |
| 178 | // work on host, and we do not want to enable it in tests. |
| 179 | // |
| 180 | // Switching this on adds ~500us to the startup on userdebug builds, or for |
| 181 | // profileable / debuggable apps. |
| 182 | // |
| 183 | // This is set to true in frameworks/base/core/jni/AndroidRuntime.cpp. |
| 184 | RUNTIME_OPTIONS_KEY (bool, PerfettoHprof, false) |
| 185 | |
Wessam Hassanein | b5a10be | 2020-11-11 16:42:52 -0800 | [diff] [blame] | 186 | // This is to enable/disable Perfetto Java Heap Stack Profiling |
| 187 | RUNTIME_OPTIONS_KEY (bool, PerfettoJavaHeapStackProf, false) |
| 188 | |
Eric Holk | 39d529f | 2021-02-17 12:48:53 -0800 | [diff] [blame] | 189 | // Metrics configuration settings |
Eric Holk | df69bd7 | 2021-02-23 11:36:21 -0800 | [diff] [blame] | 190 | RUNTIME_OPTIONS_KEY (Unit, WriteMetricsToLog) |
Eric Holk | 65a9fb4 | 2021-03-04 15:44:33 -0800 | [diff] [blame] | 191 | RUNTIME_OPTIONS_KEY (bool, WriteMetricsToStatsd, false) |
Eric Holk | df69bd7 | 2021-02-23 11:36:21 -0800 | [diff] [blame] | 192 | RUNTIME_OPTIONS_KEY (std::string, WriteMetricsToFile) |
| 193 | RUNTIME_OPTIONS_KEY (Unit, DisableFinalMetricsReport) |
| 194 | RUNTIME_OPTIONS_KEY (unsigned int, MetricsReportingPeriod) |
| 195 | |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 196 | #undef RUNTIME_OPTIONS_KEY |