summaryrefslogtreecommitdiffstats
path: root/runtime/runtime_options.def
blob: 4121ad69edc10681e9d1cec6152663cb83049aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License")
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef RUNTIME_OPTIONS_KEY
#error "Please #define RUNTIME_OPTIONS_KEY before #including this file"
#define RUNTIME_OPTIONS_KEY(...)  // Don't display errors in this file in IDEs.
#endif

// This file defines the list of keys for RuntimeOptions.
// These can be used with RuntimeOptions.Get/Set/etc, for example:
//         RuntimeOptions opt; bool* dex2oat_enabled = opt.Get(RuntimeOptions::Dex2Oat);
//
// Column Descriptions:
//                   <<Type>>             <<Key Name>>                  <<Default Value>>
//
// Default values are only used by Map::GetOrDefault(K<T>).
// If a default value is omitted here, T{} is used as the default value, which is
// almost-always the value of the type as if it was memset to all 0.
//
// Please keep the columns aligned if possible when adding new rows.
//

// Parse-able keys from the command line.
RUNTIME_OPTIONS_KEY (Unit,                Zygote)
RUNTIME_OPTIONS_KEY (Unit,                Help)
RUNTIME_OPTIONS_KEY (Unit,                ShowVersion)
RUNTIME_OPTIONS_KEY (std::string,         BootClassPath)
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPathLocations)  // std::vector<std::string>
RUNTIME_OPTIONS_KEY (std::string,         ClassPath)
RUNTIME_OPTIONS_KEY (std::string,         Image)
RUNTIME_OPTIONS_KEY (Unit,                CheckJni)
RUNTIME_OPTIONS_KEY (Unit,                JniOptsForceCopy)
RUNTIME_OPTIONS_KEY (std::string,         JdwpOptions, "")
RUNTIME_OPTIONS_KEY (JdwpProvider,        JdwpProvider,                   JdwpProvider::kNone)
RUNTIME_OPTIONS_KEY (MemoryKiB,           MemoryMaximumSize,              gc::Heap::kDefaultMaximumSize)  // -Xmx
RUNTIME_OPTIONS_KEY (MemoryKiB,           MemoryInitialSize,              gc::Heap::kDefaultInitialSize)  // -Xms
RUNTIME_OPTIONS_KEY (MemoryKiB,           HeapGrowthLimit)                // Default is 0 for unlimited
RUNTIME_OPTIONS_KEY (MemoryKiB,           HeapMinFree,                    gc::Heap::kDefaultMinFree)
RUNTIME_OPTIONS_KEY (MemoryKiB,           HeapMaxFree,                    gc::Heap::kDefaultMaxFree)
RUNTIME_OPTIONS_KEY (MemoryKiB,           NonMovingSpaceCapacity,         gc::Heap::kDefaultNonMovingSpaceCapacity)
RUNTIME_OPTIONS_KEY (double,              HeapTargetUtilization,          gc::Heap::kDefaultTargetUtilization)
RUNTIME_OPTIONS_KEY (double,              ForegroundHeapGrowthMultiplier, gc::Heap::kDefaultHeapGrowthMultiplier)
RUNTIME_OPTIONS_KEY (unsigned int,        ParallelGCThreads,              0u)
RUNTIME_OPTIONS_KEY (unsigned int,        ConcGCThreads)
RUNTIME_OPTIONS_KEY (Memory<1>,           StackSize)  // -Xss
RUNTIME_OPTIONS_KEY (unsigned int,        MaxSpinsBeforeThinLockInflation,Monitor::kDefaultMaxSpinsBeforeThinLockInflation)
RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \
                                          LongPauseLogThreshold,          gc::Heap::kDefaultLongPauseLogThreshold)
RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \
                                          LongGCLogThreshold,             gc::Heap::kDefaultLongGCLogThreshold)
RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \
                                          ThreadSuspendTimeout,           ThreadList::kDefaultThreadSuspendTimeout)
RUNTIME_OPTIONS_KEY (Unit,                DumpGCPerformanceOnShutdown)
RUNTIME_OPTIONS_KEY (Unit,                DumpJITInfoOnShutdown)
RUNTIME_OPTIONS_KEY (Unit,                IgnoreMaxFootprint)
RUNTIME_OPTIONS_KEY (Unit,                LowMemoryMode)
RUNTIME_OPTIONS_KEY (bool,                UseTLAB,                        (kUseTlab || kUseReadBarrier))
RUNTIME_OPTIONS_KEY (bool,                EnableHSpaceCompactForOOM,      true)
RUNTIME_OPTIONS_KEY (bool,                UseJitCompilation,              false)
RUNTIME_OPTIONS_KEY (bool,                DumpNativeStackOnSigQuit,       true)
RUNTIME_OPTIONS_KEY (bool,                MadviseRandomAccess,            false)
RUNTIME_OPTIONS_KEY (unsigned int,        JITCompileThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        JITWarmupThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        JITOsrThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        JITPriorityThreadWeight)
RUNTIME_OPTIONS_KEY (unsigned int,        JITInvokeTransitionWeight)
RUNTIME_OPTIONS_KEY (MemoryKiB,           JITCodeCacheInitialCapacity,    jit::JitCodeCache::kInitialCapacity)
RUNTIME_OPTIONS_KEY (MemoryKiB,           JITCodeCacheMaxCapacity,        jit::JitCodeCache::kMaxCapacity)
RUNTIME_OPTIONS_KEY (MillisecondsToNanoseconds, \
                                          HSpaceCompactForOOMMinIntervalsMs,\
                                                                          MsToNs(100 * 1000))  // 100s
RUNTIME_OPTIONS_KEY (std::vector<std::string>, \
                                          PropertiesList)  // -D<whatever> -D<whatever> ...
RUNTIME_OPTIONS_KEY (std::string,         JniTrace)
RUNTIME_OPTIONS_KEY (std::string,         PatchOat)
RUNTIME_OPTIONS_KEY (bool,                Relocate,                       kDefaultMustRelocate)
RUNTIME_OPTIONS_KEY (bool,                Dex2Oat,                        true)
RUNTIME_OPTIONS_KEY (bool,                ImageDex2Oat,                   true)
RUNTIME_OPTIONS_KEY (bool,                Interpret,                      false) // -Xint
                                                        // Disable the compiler for CC (for now).
RUNTIME_OPTIONS_KEY (XGcOption,           GcOption)  // -Xgc:
RUNTIME_OPTIONS_KEY (gc::space::LargeObjectSpaceType, \
                                          LargeObjectSpace,               gc::Heap::kDefaultLargeObjectSpaceType)
RUNTIME_OPTIONS_KEY (Memory<1>,           LargeObjectThreshold,           gc::Heap::kDefaultLargeObjectThreshold)
RUNTIME_OPTIONS_KEY (BackgroundGcOption,  BackgroundGc)

RUNTIME_OPTIONS_KEY (Unit,                DisableExplicitGC)
RUNTIME_OPTIONS_KEY (Unit,                NoSigChain)
RUNTIME_OPTIONS_KEY (Unit,                ForceNativeBridge)
RUNTIME_OPTIONS_KEY (LogVerbosity,        Verbose)
RUNTIME_OPTIONS_KEY (unsigned int,        LockProfThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        StackDumpLockProfThreshold)
RUNTIME_OPTIONS_KEY (bool,                UseTombstonedTraces, false)
RUNTIME_OPTIONS_KEY (std::string,         StackTraceFile)
RUNTIME_OPTIONS_KEY (Unit,                MethodTrace)
RUNTIME_OPTIONS_KEY (std::string,         MethodTraceFile,                "/data/misc/trace/method-trace-file.bin")
RUNTIME_OPTIONS_KEY (unsigned int,        MethodTraceFileSize,            10 * MB)
RUNTIME_OPTIONS_KEY (Unit,                MethodTraceStreaming)
RUNTIME_OPTIONS_KEY (TraceClockSource,    ProfileClock,                   kDefaultTraceClockSource)  // -Xprofile:
RUNTIME_OPTIONS_KEY (ProfileSaverOptions, ProfileSaverOpts)  // -Xjitsaveprofilinginfo, -Xps-*
RUNTIME_OPTIONS_KEY (std::string,         Compiler)
RUNTIME_OPTIONS_KEY (std::vector<std::string>, \
                                          CompilerOptions)  // -Xcompiler-option ...
RUNTIME_OPTIONS_KEY (std::vector<std::string>, \
                                          ImageCompilerOptions)  // -Ximage-compiler-option ...
RUNTIME_OPTIONS_KEY (verifier::VerifyMode, \
                                          Verify,                         verifier::VerifyMode::kEnable)
RUNTIME_OPTIONS_KEY (int,                 TargetSdkVersion,               Runtime::kUnsetSdkVersion)
RUNTIME_OPTIONS_KEY (Unit,                HiddenApiChecks)
RUNTIME_OPTIONS_KEY (std::string,         NativeBridge)
RUNTIME_OPTIONS_KEY (unsigned int,        ZygoteMaxFailedBoots,           10)
RUNTIME_OPTIONS_KEY (Unit,                NoDexFileFallback)
RUNTIME_OPTIONS_KEY (std::string,         CpuAbiList)
RUNTIME_OPTIONS_KEY (std::string,         Fingerprint)
RUNTIME_OPTIONS_KEY (ExperimentalFlags,   Experimental,     ExperimentalFlags::kNone) // -Xexperimental:{...}
RUNTIME_OPTIONS_KEY (std::list<ti::AgentSpec>,         AgentLib)  // -agentlib:<libname>=<options>
RUNTIME_OPTIONS_KEY (std::list<ti::AgentSpec>,         AgentPath)  // -agentpath:<libname>=<options>
RUNTIME_OPTIONS_KEY (std::vector<Plugin>,            Plugins)  // -Xplugin:<library>

// Not parse-able from command line, but can be provided explicitly.
// (Do not add anything here that is defined in ParsedOptions::MakeParser)
RUNTIME_OPTIONS_KEY (std::vector<std::unique_ptr<const DexFile>>*, \
                                          BootClassPathDexList)
RUNTIME_OPTIONS_KEY (InstructionSet,      ImageInstructionSet,            kRuntimeISA)
RUNTIME_OPTIONS_KEY (CompilerCallbacks*,  CompilerCallbacksPtr)  // TDOO: make unique_ptr
RUNTIME_OPTIONS_KEY (bool (*)(),          HookIsSensitiveThread)
RUNTIME_OPTIONS_KEY (int32_t (*)(FILE* stream, const char* format, va_list ap), \
                                          HookVfprintf,                   vfprintf)
// Use _exit instead of exit so that we won't get DCHECK failures in global data
// destructors. b/28106055.
RUNTIME_OPTIONS_KEY (void (*)(int32_t status), \
                                          HookExit,                       _exit)
                                                                          // We don't call abort(3) by default; see
                                                                          // Runtime::Abort.
RUNTIME_OPTIONS_KEY (void (*)(),          HookAbort,                      nullptr)

RUNTIME_OPTIONS_KEY (bool,                SlowDebug,                      false)

RUNTIME_OPTIONS_KEY (unsigned int,        GlobalRefAllocStackTraceLimit,  0)  // 0 = off
RUNTIME_OPTIONS_KEY (Unit,                UseStderrLogger)

RUNTIME_OPTIONS_KEY (Unit,                OnlyUseSystemOatFiles)

#undef RUNTIME_OPTIONS_KEY