1aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin/* 2aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * Copyright (C) 2015 The Android Open Source Project 3aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * 4aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * Licensed under the Apache License, Version 2.0 (the "License") 5aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * you may not use this file except in compliance with the License. 6aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * You may obtain a copy of the License at 7aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * 8aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * http://www.apache.org/licenses/LICENSE-2.0 9aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * 10aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * Unless required by applicable law or agreed to in writing, software 11aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * distributed under the License is distributed on an "AS IS" BASIS, 12aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * See the License for the specific language governing permissions and 14aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin * limitations under the License. 15aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin */ 16aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 17aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#ifndef RUNTIME_OPTIONS_KEY 18aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#error "Please #define RUNTIME_OPTIONS_KEY before #including this file" 19aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#define RUNTIME_OPTIONS_KEY(...) // Don't display errors in this file in IDEs. 20aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#endif 21aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 22aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// This file defines the list of keys for RuntimeOptions. 23aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// These can be used with RuntimeOptions.Get/Set/etc, for example: 24aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// RuntimeOptions opt; bool* dex2oat_enabled = opt.Get(RuntimeOptions::Dex2Oat); 25aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// 26aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// Column Descriptions: 27aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// <<Type>> <<Key Name>> <<Default Value>> 28aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// 29aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// Default values are only used by Map::GetOrDefault(K<T>). 30aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// If a default value is omitted here, T{} is used as the default value, which is 31aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// almost-always the value of the type as if it was memset to all 0. 32aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// 33c449e8b79aaaf156ce055524c41474cc1200ed5aIgor Murashkin// Please keep the columns aligned if possible when adding new rows. 34c449e8b79aaaf156ce055524c41474cc1200ed5aIgor Murashkin// 35aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 36aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// Parse-able keys from the command line. 37aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, Zygote) 38aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, Help) 39aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, ShowVersion) 40aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, BootClassPath) 41aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPathLocations) // std::vector<std::string> 42aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, ClassPath) 43aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, Image) 44aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, CheckJni) 45aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, JniOptsForceCopy) 46aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (JDWP::JdwpOptions, JdwpOptions) 47aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, MemoryMaximumSize, gc::Heap::kDefaultMaximumSize) // -Xmx 48aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, MemoryInitialSize, gc::Heap::kDefaultInitialSize) // -Xms 49aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, HeapGrowthLimit) // Default is 0 for unlimited 50aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, HeapMinFree, gc::Heap::kDefaultMinFree) 51aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, HeapMaxFree, gc::Heap::kDefaultMaxFree) 52aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, NonMovingSpaceCapacity, gc::Heap::kDefaultNonMovingSpaceCapacity) 53aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (double, HeapTargetUtilization, gc::Heap::kDefaultTargetUtilization) 54aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (double, ForegroundHeapGrowthMultiplier, gc::Heap::kDefaultHeapGrowthMultiplier) 5510d6886c9ce3ed87431cf10d376a69c23950fa61Mathieu ChartierRUNTIME_OPTIONS_KEY (unsigned int, ParallelGCThreads, 0u) 56aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, ConcGCThreads) 57aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Memory<1>, StackSize) // -Xss 58aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, MaxSpinsBeforeThinLockInflation,Monitor::kDefaultMaxSpinsBeforeThinLockInflation) 59aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ 60aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin LongPauseLogThreshold, gc::Heap::kDefaultLongPauseLogThreshold) 61aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ 62aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin LongGCLogThreshold, gc::Heap::kDefaultLongGCLogThreshold) 63aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, DumpGCPerformanceOnShutdown) 64a4885cbaafd35fe9c60eb6cd95e41e2c86f54f66Mathieu ChartierRUNTIME_OPTIONS_KEY (Unit, DumpJITInfoOnShutdown) 65aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, IgnoreMaxFootprint) 66aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, LowMemoryMode) 6749b7134f29439326d3d20bfea7bfde0e360c320cHiroshi YamauchiRUNTIME_OPTIONS_KEY (bool, UseTLAB, (kUseTlab || kUseReadBarrier)) 68aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, EnableHSpaceCompactForOOM, true) 69e5de54cfab5f14ba0b8ff25d8d60901c7021943fCalin JuravleRUNTIME_OPTIONS_KEY (bool, UseJitCompilation, false) 70a73280df8cac1279b6dea0424722f42ef0048613Nicolas GeoffrayRUNTIME_OPTIONS_KEY (bool, DumpNativeStackOnSigQuit, true) 71c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, JITCompileThreshold, jit::Jit::kDefaultCompileThreshold) 7283f080ac824d0964941c3fbaa957cac874f827b0Nicolas GeoffrayRUNTIME_OPTIONS_KEY (unsigned int, JITWarmupThreshold) 7383f080ac824d0964941c3fbaa957cac874f827b0Nicolas GeoffrayRUNTIME_OPTIONS_KEY (unsigned int, JITOsrThreshold) 74b2771b41a956b50266d4d83fbb067f99faf7b7dcCalin JuravleRUNTIME_OPTIONS_KEY (unsigned int, JITPriorityThreadWeight) 752a894f433d126d6e8694c6235e29e66ef45a31d9Calin JuravleRUNTIME_OPTIONS_KEY (unsigned int, JITInvokeTransitionWeight) 760a3be1620a3560253cfa789cb9819013293c5654Nicolas GeoffrayRUNTIME_OPTIONS_KEY (MemoryKiB, JITCodeCacheInitialCapacity, jit::JitCodeCache::kInitialCapacity) 770a3be1620a3560253cfa789cb9819013293c5654Nicolas GeoffrayRUNTIME_OPTIONS_KEY (MemoryKiB, JITCodeCacheMaxCapacity, jit::JitCodeCache::kMaxCapacity) 7831f2c155975c5794d481df03eb0947cb48d2c6b5Calin JuravleRUNTIME_OPTIONS_KEY (bool, JITSaveProfilingInfo, false) 79aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ 80aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HSpaceCompactForOOMMinIntervalsMs,\ 81aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin MsToNs(100 * 1000)) // 100s 82aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 83aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin PropertiesList) // -D<whatever> -D<whatever> ... 84aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, JniTrace) 85aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, PatchOat) 86aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, Relocate, kDefaultMustRelocate) 87e722d2921615102941ca4b6717c9d9e1edae1192Nicolas GeoffrayRUNTIME_OPTIONS_KEY (bool, Dex2Oat, true) 88aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, ImageDex2Oat, true) 890d5a281c671444bfa75d63caf1427a8c0e6e1177Roland LevillainRUNTIME_OPTIONS_KEY (bool, Interpret, false) // -Xint 90aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // Disable the compiler for CC (for now). 91aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (XGcOption, GcOption) // -Xgc: 92aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (gc::space::LargeObjectSpaceType, \ 93aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin LargeObjectSpace, gc::Heap::kDefaultLargeObjectSpaceType) 94aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Memory<1>, LargeObjectThreshold, gc::Heap::kDefaultLargeObjectThreshold) 95aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (BackgroundGcOption, BackgroundGc) 96aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 97aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, DisableExplicitGC) 9801aaf6ef3e3e35cc8e41cf3fe899a7bf337042f4Calin JuravleRUNTIME_OPTIONS_KEY (Unit, NoSigChain) 99d3e7c6c76f564b58e66010c30b62bb56ef046f2cCalin JuravleRUNTIME_OPTIONS_KEY (Unit, ForceNativeBridge) 100aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (LogVerbosity, Verbose) 101aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, LockProfThreshold) 102aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, StackTraceFile) 103aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, MethodTrace) 104f83e733618066e3c672c9a7ee872a3bba8202e7fCalin JuravleRUNTIME_OPTIONS_KEY (std::string, MethodTraceFile, "/data/misc/trace/method-trace-file.bin") 105aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, MethodTraceFileSize, 10 * MB) 10640da286d3207d88ed8ff3f5caac4873874603428Andreas GampeRUNTIME_OPTIONS_KEY (Unit, MethodTraceStreaming) 107aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (TraceClockSource, ProfileClock, kDefaultTraceClockSource) // -Xprofile: 108aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (TestProfilerOptions, ProfilerOpts) // -Xenable-profiler, -Xprofile-* 109aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, Compiler) 110aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 111aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin CompilerOptions) // -Xcompiler-option ... 112aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 113aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin ImageCompilerOptions) // -Ximage-compiler-option ... 1147617abdb402fd0419daa3eefb2ad059ccbb8b6dbIgor MurashkinRUNTIME_OPTIONS_KEY (verifier::VerifyMode, \ 1157617abdb402fd0419daa3eefb2ad059ccbb8b6dbIgor Murashkin Verify, verifier::VerifyMode::kEnable) 116aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, NativeBridge) 117c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, ZygoteMaxFailedBoots, 10) 118c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, NoDexFileFallback) 119785049f8083e56e88dfeab5ff74fb3817f9854e3Dmitriy IvanovRUNTIME_OPTIONS_KEY (std::string, CpuAbiList) 120dd6712578b6aa8a292bc6249295b6d2a7b182717Andreas GampeRUNTIME_OPTIONS_KEY (std::string, Fingerprint) 1219724c636467d56632a45fdf6353e3d57d1925501Neil FullerRUNTIME_OPTIONS_KEY (ExperimentalFlags, Experimental, ExperimentalFlags::kNone) // -Xexperimental:{none, lambdas} 122aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 123aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// Not parse-able from command line, but can be provided explicitly. 124c449e8b79aaaf156ce055524c41474cc1200ed5aIgor Murashkin// (Do not add anything here that is defined in ParsedOptions::MakeParser) 1259bdf108885a27ba05fae8501725649574d7c491bVladimir MarkoRUNTIME_OPTIONS_KEY (std::vector<std::unique_ptr<const DexFile>>*, \ 1269bdf108885a27ba05fae8501725649574d7c491bVladimir Marko BootClassPathDexList) 127aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (InstructionSet, ImageInstructionSet, kRuntimeISA) 128aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (CompilerCallbacks*, CompilerCallbacksPtr) // TDOO: make unique_ptr 129aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool (*)(), HookIsSensitiveThread) 130aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (int32_t (*)(FILE* stream, const char* format, va_list ap), \ 131aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HookVfprintf, vfprintf) 132aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (void (*)(int32_t status), \ 133aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HookExit, exit) 134aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // We don't call abort(3) by default; see 135aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // Runtime::Abort. 136aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (void (*)(), HookAbort, nullptr) 13729d38e77c553c6cf71fc4dafe2d22b4e3f814872Andreas GampeRUNTIME_OPTIONS_KEY (std::string, OatFileManagerCompilerFilter, "speed") 138aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 139aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#undef RUNTIME_OPTIONS_KEY 140