runtime_options.def revision 01aaf6ef3e3e35cc8e41cf3fe899a7bf337042f4
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) 69c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (bool, UseJIT, false) 70c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, JITCompileThreshold, jit::Jit::kDefaultCompileThreshold) 71c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (MemoryKiB, JITCodeCacheCapacity, jit::JitCodeCache::kDefaultCapacity) 72aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \ 73aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HSpaceCompactForOOMMinIntervalsMs,\ 74aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin MsToNs(100 * 1000)) // 100s 75aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 76aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin PropertiesList) // -D<whatever> -D<whatever> ... 77aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, JniTrace) 78aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, PatchOat) 79aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, Relocate, kDefaultMustRelocate) 80aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, Dex2Oat, true) 81aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, ImageDex2Oat, true) 82aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // kPoisonHeapReferences currently works with 83aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // the interpreter only. 84aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // TODO: make it work with the compiler. 85aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, Interpret, (kPoisonHeapReferences || kUseReadBarrier)) // -Xint 86aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // Disable the compiler for CC (for now). 87aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (XGcOption, GcOption) // -Xgc: 88aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (gc::space::LargeObjectSpaceType, \ 89aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin LargeObjectSpace, gc::Heap::kDefaultLargeObjectSpaceType) 90aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Memory<1>, LargeObjectThreshold, gc::Heap::kDefaultLargeObjectThreshold) 91aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (BackgroundGcOption, BackgroundGc) 92aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 93aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, DisableExplicitGC) 9401aaf6ef3e3e35cc8e41cf3fe899a7bf337042f4Calin JuravleRUNTIME_OPTIONS_KEY (Unit, NoSigChain) 95aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (LogVerbosity, Verbose) 96aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, LockProfThreshold) 97aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, StackTraceFile) 98aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, MethodTrace) 99aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, MethodTraceFile, "/data/method-trace-file.bin") 100aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, MethodTraceFileSize, 10 * MB) 10140da286d3207d88ed8ff3f5caac4873874603428Andreas GampeRUNTIME_OPTIONS_KEY (Unit, MethodTraceStreaming) 102aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (TraceClockSource, ProfileClock, kDefaultTraceClockSource) // -Xprofile: 103aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (TestProfilerOptions, ProfilerOpts) // -Xenable-profiler, -Xprofile-* 104aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, Compiler) 105aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 106aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin CompilerOptions) // -Xcompiler-option ... 107aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::vector<std::string>, \ 108aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin ImageCompilerOptions) // -Ximage-compiler-option ... 109aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool, Verify, true) 110aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (std::string, NativeBridge) 111c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (unsigned int, ZygoteMaxFailedBoots, 10) 112c449e8b79aaaf156ce055524c41474cc1200ed5aIgor MurashkinRUNTIME_OPTIONS_KEY (Unit, NoDexFileFallback) 113785049f8083e56e88dfeab5ff74fb3817f9854e3Dmitriy IvanovRUNTIME_OPTIONS_KEY (std::string, CpuAbiList) 114158f35c98e2ec0d40d2c032b8cdce5fb60944a7fIgor MurashkinRUNTIME_OPTIONS_KEY (bool, ExperimentalLambdas, false) // -X[no]experimental-lambdas 115aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 116aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin// Not parse-able from command line, but can be provided explicitly. 117c449e8b79aaaf156ce055524c41474cc1200ed5aIgor Murashkin// (Do not add anything here that is defined in ParsedOptions::MakeParser) 118aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (const std::vector<const DexFile*>*, \ 119aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin BootClassPathDexList) // TODO: make unique_ptr 120aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (InstructionSet, ImageInstructionSet, kRuntimeISA) 121aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (CompilerCallbacks*, CompilerCallbacksPtr) // TDOO: make unique_ptr 122aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (bool (*)(), HookIsSensitiveThread) 123aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (int32_t (*)(FILE* stream, const char* format, va_list ap), \ 124aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HookVfprintf, vfprintf) 125aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (void (*)(int32_t status), \ 126aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin HookExit, exit) 127aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // We don't call abort(3) by default; see 128aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin // Runtime::Abort. 129aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor MurashkinRUNTIME_OPTIONS_KEY (void (*)(), HookAbort, nullptr) 130aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin 131aaebaa0121be3b9d9f13630585304482cbcaeb4bIgor Murashkin#undef RUNTIME_OPTIONS_KEY 132