/*
 * 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* image_dex2oat_enabled = opt.Get(RuntimeOptions::ImageDex2Oat);
//
// 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,                PrimaryZygote)
RUNTIME_OPTIONS_KEY (Unit,                Help)
RUNTIME_OPTIONS_KEY (Unit,                ShowVersion)
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPath)           // std::vector<std::string>
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPathLocations)  // std::vector<std::string>
RUNTIME_OPTIONS_KEY (ParseIntList<':'>,   BootClassPathFds)        // std::vector<int>
RUNTIME_OPTIONS_KEY (ParseIntList<':'>,   BootClassPathImageFds)   // std::vector<int>
RUNTIME_OPTIONS_KEY (ParseIntList<':'>,   BootClassPathVdexFds)    // std::vector<int>
RUNTIME_OPTIONS_KEY (ParseIntList<':'>,   BootClassPathOatFds)     // std::vector<int>
RUNTIME_OPTIONS_KEY (std::string,         ClassPath)
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,Image)
RUNTIME_OPTIONS_KEY (Unit,                ForceJitZygote)
RUNTIME_OPTIONS_KEY (Unit,                AllowInMemoryCompilation)
RUNTIME_OPTIONS_KEY (Unit,                CheckJni)
RUNTIME_OPTIONS_KEY (Unit,                JniOptsForceCopy)
RUNTIME_OPTIONS_KEY (std::string,         JdwpOptions,                    "suspend=n,server=y")
RUNTIME_OPTIONS_KEY (JdwpProvider,        JdwpProvider,                   JdwpProvider::kUnset)
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 (MemoryKiB,           StopForNativeAllocs,            1 * GB)
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 (unsigned int,        FinalizerTimeoutMs,             10000u)
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 (bool,                MonitorTimeoutEnable,           false)
RUNTIME_OPTIONS_KEY (int,                 MonitorTimeout,                 Monitor::kDefaultMonitorTimeoutMs)
RUNTIME_OPTIONS_KEY (Unit,                DumpGCPerformanceOnShutdown)
RUNTIME_OPTIONS_KEY (Unit,                DumpRegionInfoBeforeGC)
RUNTIME_OPTIONS_KEY (Unit,                DumpRegionInfoAfterGC)
RUNTIME_OPTIONS_KEY (Unit,                DumpJITInfoOnShutdown)
RUNTIME_OPTIONS_KEY (Unit,                IgnoreMaxFootprint)
RUNTIME_OPTIONS_KEY (bool,                AlwaysLogExplicitGcs,           true)
RUNTIME_OPTIONS_KEY (Unit,                LowMemoryMode)
RUNTIME_OPTIONS_KEY (bool,                UseTLAB,                        kUseTlab)
RUNTIME_OPTIONS_KEY (bool,                EnableHSpaceCompactForOOM,      true)
RUNTIME_OPTIONS_KEY (bool,                UseJitCompilation,              true)
RUNTIME_OPTIONS_KEY (bool,                UseProfiledJitCompilation,      false)
RUNTIME_OPTIONS_KEY (bool,                DumpNativeStackOnSigQuit,       true)
RUNTIME_OPTIONS_KEY (bool,                MadviseRandomAccess,            false)
RUNTIME_OPTIONS_KEY (unsigned int,        MadviseWillNeedVdexFileSize,    0)
RUNTIME_OPTIONS_KEY (unsigned int,        MadviseWillNeedOdexFileSize,    0)
RUNTIME_OPTIONS_KEY (unsigned int,        MadviseWillNeedArtFileSize,     0)
RUNTIME_OPTIONS_KEY (JniIdType,           OpaqueJniIds,                   JniIdType::kDefault)  // -Xopaque-jni-ids:{true, false, swapable}
RUNTIME_OPTIONS_KEY (bool,                AutoPromoteOpaqueJniIds,        true)  // testing use only. -Xauto-promote-opaque-jni-ids:{true, false}
RUNTIME_OPTIONS_KEY (unsigned int,        JITOptimizeThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        JITWarmupThreshold)
RUNTIME_OPTIONS_KEY (unsigned int,        JITPriorityThreadWeight)
RUNTIME_OPTIONS_KEY (unsigned int,        JITInvokeTransitionWeight)
RUNTIME_OPTIONS_KEY (int,                 JITPoolThreadPthreadPriority,   jit::kJitPoolThreadPthreadDefaultPriority)
RUNTIME_OPTIONS_KEY (int,                 JITZygotePoolThreadPthreadPriority,   jit::kJitZygotePoolThreadPthreadDefaultPriority)
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 (bool,                Relocate,                       kDefaultMustRelocate)
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 (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 (unsigned int,        TargetSdkVersion, \
                                          static_cast<unsigned int>(SdkVersion::kUnset))
RUNTIME_OPTIONS_KEY (hiddenapi::EnforcementPolicy,
                                          HiddenApiPolicy,
                                          hiddenapi::EnforcementPolicy::kDisabled)
RUNTIME_OPTIONS_KEY (hiddenapi::EnforcementPolicy,
                                          CorePlatformApiPolicy,
                                          hiddenapi::EnforcementPolicy::kDisabled)
RUNTIME_OPTIONS_KEY (std::string,         NativeBridge)
RUNTIME_OPTIONS_KEY (unsigned int,        ZygoteMaxFailedBoots,           10)
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)  // TODO: make unique_ptr
RUNTIME_OPTIONS_KEY (bool (*)(),          HookIsSensitiveThread)
RUNTIME_OPTIONS_KEY (int32_t (*)(FILE* stream, const char* format, va_list ap), \
                                          HookVfprintf,                   vfprintf)
// Use `art::FastExit` instead of `exit` so that we won't get DCHECK failures
// in global data destructors (see b/28106055).
RUNTIME_OPTIONS_KEY (void (*)(int32_t status), \
                                          HookExit,                       art::FastExit)
                                                                          // 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,                OnlyUseTrustedOatFiles)
RUNTIME_OPTIONS_KEY (Unit,                DenyArtApexDataFiles)
RUNTIME_OPTIONS_KEY (unsigned int,        VerifierLoggingThreshold,       100)

RUNTIME_OPTIONS_KEY (bool,                FastClassNotFoundException,     true)
RUNTIME_OPTIONS_KEY (bool,                VerifierMissingKThrowFatal,     true)

// Setting this to true causes ART to disable Zygote native fork loop. ART also
// internally enables this if ZygoteJit is enabled.
RUNTIME_OPTIONS_KEY (bool,                ForceJavaZygoteForkLoop,        false)

// Whether to allow loading of the perfetto hprof plugin.
// Even with this option set, we will still only actually load the plugin
// if we are on a userdebug build or the app is debuggable or profileable.
//
// We do not want to enable this by default because PerfettoHprof does not
// work on host, and we do not want to enable it in tests.
//
// Switching this on adds ~500us to the startup on userdebug builds, or for
// profileable / debuggable apps.
//
// This is set to true in frameworks/base/core/jni/AndroidRuntime.cpp.
RUNTIME_OPTIONS_KEY (bool,                PerfettoHprof,                  false)

// This is to enable/disable Perfetto Java Heap Stack Profiling
RUNTIME_OPTIONS_KEY (bool,                PerfettoJavaHeapStackProf,      false)

#undef RUNTIME_OPTIONS_KEY
