Delete interpreter type-profiling code
[hiphop-php.git] / hphp / runtime / base / runtime-option.h
blob2ffaf5ef3c0df6af1026937f045269a91289ba8d
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_RUNTIME_OPTION_H_
18 #define incl_HPHP_RUNTIME_OPTION_H_
20 #include <folly/dynamic.h>
22 #include <unordered_map>
23 #include <vector>
24 #include <string>
25 #include <map>
26 #include <set>
27 #include <boost/container/flat_set.hpp>
28 #include <memory>
30 #include "hphp/runtime/base/config.h"
31 #include "hphp/util/hash-map-typedefs.h"
32 #include "hphp/util/functional.h"
34 namespace HPHP {
35 ///////////////////////////////////////////////////////////////////////////////
37 class AccessLogFileData;
38 struct VirtualHost;
39 struct IpBlockMap;
40 struct SatelliteServerInfo;
41 struct FilesMatch;
42 struct Hdf;
43 // Can we make sure this equals IniSetting::Map?
44 typedef folly::dynamic IniSettingMap;
46 constexpr int kDefaultInitialStaticStringTableSize = 500000;
48 /**
49 * Configurable options set from command line or configurable file at startup
50 * time.
52 class RuntimeOption {
53 public:
54 static void Load(IniSettingMap &ini, Hdf& config,
55 const std::vector<std::string>& iniClis = std::vector<std::string>(),
56 const std::vector<std::string>& hdfClis = std::vector<std::string>());
58 static bool ServerExecutionMode() {
59 return strcmp(ExecutionMode, "srv") == 0;
62 static bool ClientExecutionMode() {
63 return strcmp(ExecutionMode, "cli") == 0;
66 static const char *ExecutionMode;
67 static std::string BuildId;
68 static std::string InstanceId;
69 static std::string PidFile;
71 static std::string LogFile;
72 static std::string LogFileSymLink;
73 static int LogHeaderMangle;
74 static bool AlwaysEscapeLog;
75 static bool AlwaysLogUnhandledExceptions;
76 static bool NoSilencer;
77 static int ErrorUpgradeLevel; // Bitmask of errors to upgrade to E_USER_ERROR
78 static bool CallUserHandlerOnFatals;
79 static bool ThrowExceptionOnBadMethodCall;
80 static bool LogNativeStackOnOOM;
81 static int RuntimeErrorReportingLevel;
82 static int ForceErrorReportingLevel; // Bitmask ORed with the reporting level
84 static std::string ServerUser; // run server under this user account
86 static int MaxLoopCount;
87 static int MaxSerializedStringSize;
88 static bool NoInfiniteRecursionDetection;
89 static bool WarnTooManyArguments;
90 static bool EnableHipHopErrors;
91 static bool AssertActive;
92 static bool AssertWarning;
93 static int64_t NoticeFrequency; // output 1 out of NoticeFrequency notices
94 static int64_t WarningFrequency;
95 static int RaiseDebuggingFrequency;
96 static int64_t SerializationSizeLimit;
97 static int64_t StringOffsetLimit;
99 static std::string AccessLogDefaultFormat;
100 static std::vector<AccessLogFileData> AccessLogs;
102 static std::string AdminLogFormat;
103 static std::string AdminLogFile;
104 static std::string AdminLogSymLink;
106 static std::string Tier;
107 static std::string Host;
108 static std::string DefaultServerNameSuffix;
109 static std::string ServerType;
110 static std::string ServerIP;
111 static std::string ServerFileSocket;
112 static std::string ServerPrimaryIPv4;
113 static std::string ServerPrimaryIPv6;
114 static int ServerPort;
115 static int ServerPortFd;
116 static int ServerBacklog;
117 static int ServerConnectionLimit;
118 static int ServerThreadCount;
119 static int ProdServerPort;
120 static int QueuedJobsReleaseRate;
121 static int ServerWarmupThrottleRequestCount;
122 static bool ServerThreadRoundRobin;
123 static int ServerThreadDropCacheTimeoutSeconds;
124 static int ServerThreadJobLIFOSwitchThreshold;
125 static int ServerThreadJobMaxQueuingMilliSeconds;
126 static bool ServerThreadDropStack;
127 static bool ServerHttpSafeMode;
128 static bool ServerStatCache;
129 static bool ServerFixPathInfo;
130 static std::vector<std::string> ServerWarmupRequests;
131 static boost::container::flat_set<std::string> ServerHighPriorityEndPoints;
132 static bool ServerExitOnBindFail;
133 static int PageletServerThreadCount;
134 static bool PageletServerThreadRoundRobin;
135 static int PageletServerThreadDropCacheTimeoutSeconds;
136 static int PageletServerQueueLimit;
137 static bool PageletServerThreadDropStack;
139 static int RequestTimeoutSeconds;
140 static int PspTimeoutSeconds;
141 static int PspCpuTimeoutSeconds;
142 static int64_t MaxRequestAgeFactor;
143 static int64_t ServerMemoryHeadRoom;
144 static int64_t RequestMemoryMaxBytes;
145 static int64_t ImageMemoryMaxBytes;
146 static int ResponseQueueCount;
147 static int ServerGracefulShutdownWait;
148 static int ServerDanglingWait;
149 static bool ServerHarshShutdown;
150 static bool ServerEvilShutdown;
151 static bool ServerKillOnSIGTERM;
152 static int ServerShutdownListenWait;
153 static int ServerShutdownListenNoWork;
154 static std::vector<std::string> ServerNextProtocols;
155 static int GzipCompressionLevel;
156 static int GzipMaxCompressionLevel;
157 static std::string ForceCompressionURL;
158 static std::string ForceCompressionCookie;
159 static std::string ForceCompressionParam;
160 static bool EnableKeepAlive;
161 static bool ExposeHPHP;
162 static bool ExposeXFBServer;
163 static bool ExposeXFBDebug;
164 static std::string XFBDebugSSLKey;
165 static int ConnectionTimeoutSeconds;
166 static bool EnableOutputBuffering;
167 static std::string OutputHandler;
168 static bool ImplicitFlush;
169 static bool EnableEarlyFlush;
170 static bool ForceChunkedEncoding;
171 static int64_t MaxPostSize;
172 static bool AlwaysPopulateRawPostData;
173 static int64_t UploadMaxFileSize;
174 static std::string UploadTmpDir;
175 static bool EnableFileUploads;
176 static bool EnableUploadProgress;
177 static int64_t MaxFileUploads;
178 static int Rfc1867Freq;
179 static std::string Rfc1867Prefix;
180 static std::string Rfc1867Name;
181 static bool LibEventSyncSend;
182 static bool ExpiresActive;
183 static int ExpiresDefault;
184 static std::string DefaultCharsetName;
185 static bool ForceServerNameToHeader;
186 static bool EnableCufAsync;
187 static bool PathDebug;
188 static std::vector<std::shared_ptr<VirtualHost>> VirtualHosts;
189 static std::shared_ptr<IpBlockMap> IpBlocks;
190 static std::vector<std::shared_ptr<SatelliteServerInfo>>
191 SatelliteServerInfos;
193 // If a request has a body over this limit, switch to on-demand reading.
194 // -1 for no limit.
195 static int RequestBodyReadLimit;
197 static bool EnableSSL;
198 static int SSLPort;
199 static int SSLPortFd;
200 static std::string SSLCertificateFile;
201 static std::string SSLCertificateKeyFile;
202 static std::string SSLCertificateDir;
203 static bool TLSDisableTLS1_2;
204 static std::string TLSClientCipherSpec;
206 static int XboxServerThreadCount;
207 static int XboxServerMaxQueueLength;
208 static int XboxServerPort;
209 static int XboxDefaultLocalTimeoutMilliSeconds;
210 static int XboxDefaultRemoteTimeoutSeconds;
211 static int XboxServerInfoMaxRequest;
212 static int XboxServerInfoDuration;
213 static std::string XboxServerInfoWarmupDoc;
214 static std::string XboxServerInfoReqInitFunc;
215 static std::string XboxServerInfoReqInitDoc;
216 static bool XboxServerInfoAlwaysReset;
217 static bool XboxServerLogInfo;
218 static std::string XboxProcessMessageFunc;
219 static std::string XboxPassword;
220 static std::set<std::string> XboxPasswords;
222 static std::string SourceRoot;
223 static std::vector<std::string> IncludeSearchPaths;
224 static std::string FileCache;
225 static std::string DefaultDocument;
226 static std::string ErrorDocument404;
227 static bool ForbiddenAs404;
228 static std::string ErrorDocument500;
229 static std::string FatalErrorMessage;
230 static std::string FontPath;
231 static bool EnableStaticContentFromDisk;
232 static bool EnableOnDemandUncompress;
233 static bool EnableStaticContentMMap;
235 static bool Utf8izeReplace;
237 static std::string StartupDocument;
238 static std::string WarmupDocument;
239 static std::string RequestInitFunction;
240 static std::string RequestInitDocument;
241 static std::string AutoPrependFile;
242 static std::string AutoAppendFile;
244 static bool SafeFileAccess;
245 static std::vector<std::string> AllowedDirectories;
246 static std::set<std::string> AllowedFiles;
247 static hphp_string_imap<std::string> StaticFileExtensions;
248 static hphp_string_imap<std::string> PhpFileExtensions;
249 static std::set<std::string> ForbiddenFileExtensions;
250 static std::set<std::string> StaticFileGenerators;
251 static std::vector<std::shared_ptr<FilesMatch>> FilesMatches;
253 static bool WhitelistExec;
254 static bool WhitelistExecWarningOnly;
255 static std::vector<std::string> AllowedExecCmds;
257 static bool UnserializationWhitelistCheck;
258 static bool UnserializationWhitelistCheckWarningOnly;
260 static std::string TakeoverFilename;
261 static int AdminServerPort;
262 static int AdminThreadCount;
263 static std::string AdminPassword;
264 static std::set<std::string> AdminPasswords;
266 static std::string ProxyOrigin;
267 static int ProxyRetry;
268 static bool UseServeURLs;
269 static std::set<std::string> ServeURLs;
270 static bool UseProxyURLs;
271 static int ProxyPercentage;
272 static std::set<std::string> ProxyURLs;
273 static std::vector<std::string> ProxyPatterns;
274 static bool AlwaysUseRelativePath;
276 static int HttpDefaultTimeout;
277 static int HttpSlowQueryThreshold;
279 static bool TranslateLeakStackTrace;
280 static bool NativeStackTrace;
281 static bool FullBacktrace;
282 static bool ServerErrorMessage;
283 static bool TranslateSource;
284 static bool RecordInput;
285 static bool ClearInputOnSuccess;
286 static std::string ProfilerOutputDir;
287 static std::string CoreDumpEmail;
288 static bool CoreDumpReport;
289 static std::string StackTraceFilename;
290 static bool LocalMemcache;
291 static bool MemcacheReadOnly;
293 static bool EnableStats;
294 static bool EnableAPCStats;
295 static bool EnableWebStats;
296 static bool EnableMemoryStats;
297 static bool EnableMemcacheStats;
298 static bool EnableMemcacheKeyStats;
299 static bool EnableSQLStats;
300 static bool EnableSQLTableStats;
301 static bool EnableNetworkIOStatus;
302 static std::string StatsXSL;
303 static std::string StatsXSLProxy;
304 static int StatsSlotDuration;
305 static int StatsMaxSlot;
307 static bool EnableHotProfiler;
308 static int32_t ProfilerTraceBuffer;
309 static double ProfilerTraceExpansion;
310 static int32_t ProfilerMaxTraceBuffer;
312 static int64_t MaxRSS;
313 static int64_t MaxRSSPollingCycle;
314 static int64_t DropCacheCycle;
315 static int64_t MaxSQLRowCount;
316 static int64_t MaxMemcacheKeyCount;
317 static int64_t SocketDefaultTimeout;
318 static bool LockCodeMemory;
319 static int MaxArrayChain;
320 static bool WarnOnCollectionToArray;
321 static bool UseDirectCopy;
323 static bool DisableSmartAllocator;
325 static std::map<std::string, std::string> ServerVariables;
327 static std::map<std::string, std::string> EnvVariables;
329 // The file name that is used by LightProcess to bind the socket
330 // is the following prefix followed by the pid of the hphp process.
331 static std::string LightProcessFilePrefix;
332 static int LightProcessCount;
334 // Eval options
335 static bool EnableHipHopSyntax;
336 static bool EnableHipHopExperimentalSyntax;
337 static bool EnableShortTags;
338 static bool EnableAspTags;
339 static bool EnableXHP;
340 static bool EnableObjDestructCall;
341 static bool EnableEmitSwitch;
342 static bool EnableEmitterStats;
343 static bool EnableIntrinsicsExtension;
344 static bool CheckSymLink;
345 static int MaxUserFunctionId;
346 static bool EnableArgsInBacktraces;
347 static bool EnableZendCompat;
348 static bool EnableZendSorting;
349 static bool TimeoutsUseWallTime;
350 static bool CheckFlushOnUserClose;
351 static bool EvalAuthoritativeMode;
352 static bool IntsOverflowToInts;
353 static HackStrictOption StrictArrayFillKeys;
354 static HackStrictOption DisallowDynamicVarEnvFuncs;
355 static HackStrictOption IconvIgnoreCorrect;
356 static HackStrictOption MinMaxAllowDegenerate;
357 static bool LookForTypechecker;
359 static int GetScannerType();
361 static bool GetServerCustomBoolSetting(const std::string &settingName,
362 bool &val);
364 static std::set<std::string, stdltistr> DynamicInvokeFunctions;
366 static const uint32_t kPCREInitialTableSize = 96 * 1024;
368 static std::string ExtensionDir;
369 static std::vector<std::string> Extensions;
370 static std::string DynamicExtensionPath;
371 static std::vector<std::string> DynamicExtensions;
374 #define EVALFLAGS() \
375 /* F(type, name, defaultVal) */ \
376 /* \
377 * Maximum number of elements on the VM execution stack. \
378 */ \
379 F(uint64_t, VMStackElms, kEvalVMStackElmsDefault) \
380 /* \
381 * Initial space reserved for the global variable environment (in \
382 * number of global variables). \
383 */ \
384 F(uint32_t, VMInitialGlobalTableSize, \
385 kEvalVMInitialGlobalTableSizeDefault) \
386 F(bool, Jit, evalJitDefault()) \
387 F(bool, SimulateARM, simulateARMDefault()) \
388 F(uint32_t, JitLLVM, jitLLVMDefault()) \
389 F(bool, JitRequireWriteLease, false) \
390 F(uint64_t, JitAHotSize, ahotDefault()) \
391 F(uint64_t, JitASize, 60 << 20) \
392 F(uint64_t, JitAMaxUsage, maxUsageDef()) \
393 F(uint64_t, JitAProfSize, 64 << 20) \
394 F(uint64_t, JitAColdSize, 24 << 20) \
395 F(uint64_t, JitAFrozenSize, 40 << 20) \
396 F(uint64_t, JitGlobalDataSize, kJitGlobalDataDef) \
397 F(uint64_t, JitRelocationSize, kJitRelocationSizeDefault) \
398 F(bool, JitTimer, kJitTimerDefault) \
399 F(bool, AllowHhas, false) \
400 /* CheckReturnTypeHints:
401 0 - No checks or enforcement for return type hints.
402 1 - Raises E_WARNING if a return type hint fails.
403 2 - Raises E_RECOVERABLE_ERROR if regular return type hint fails,
404 raises E_WARNING if soft return type hint fails. If a regular
405 return type hint fails, it's possible for execution to resume
406 normally if the user error handler doesn't throw and returns
407 something other than boolean false.
408 3 - Same as 2, except if a regular type hint fails the runtime
409 will not allow execution to resume normally; if the user
410 error handler returns something other than boolean false,
411 the runtime will throw a fatal error (this goes together
412 with Option::HardReturnTypeHints). */ \
413 F(int32_t, CheckReturnTypeHints, 2) \
414 F(bool, SoftClosureReturnTypeHints, false) \
415 /* HackArrayWarnFrequency:
416 0 - no warnings
417 [1-UINT32_MAX] - raise warning every X times
418 */ \
419 F(uint32_t, HackArrayWarnFrequency, 0) \
420 F(bool, TraceArrays, false) \
421 F(bool, AllowScopeBinding, true) \
422 F(bool, JitNoGdb, true) \
423 F(bool, SpinOnCrash, false) \
424 F(uint32_t, DumpRingBufferOnCrash, 0) \
425 F(bool, PerfPidMap, true) \
426 F(bool, PerfDataMap, false) \
427 F(bool, KeepPerfPidMap, false) \
428 F(bool, RuntimeTypeProfile, false) \
429 F(int32_t, RuntimeTypeProfileLoggingFreq, 0) \
430 F(uint32_t, JitTargetCacheSize, 64 << 20) \
431 F(uint32_t, HHBCArenaChunkSize, 10 << 20) \
432 F(bool, ProfileBC, false) \
433 F(bool, ProfileHeapAcrossRequests, false) \
434 F(bool, ProfileHWEnable, true) \
435 F(string, ProfileHWEvents, std::string("")) \
436 F(bool, JitAlwaysInterpOne, false) \
437 F(uint32_t, JitMaxTranslations, 12) \
438 F(uint64_t, JitGlobalTranslationLimit, -1) \
439 F(uint32_t, JitMaxRegionInstrs, 1000) \
440 F(uint32_t, JitProfileInterpRequests, kDefaultProfileInterpRequests) \
441 F(bool, JitProfileWarmupRequests, false) \
442 F(uint32_t, NumSingleJitRequests, nsjrDefault()) \
443 F(uint32_t, JitProfileRequests, kDefaultProfileRequests) \
444 F(bool, JitProfileRecord, false) \
445 F(uint32_t, GdbSyncChunks, 128) \
446 F(bool, JitStressLease, false) \
447 F(bool, JitKeepDbgFiles, false) \
448 /* despite the unfortunate name, this enables function renaming and
449 * interception in the interpreter as well as the jit, and also
450 * implies all functions may be used with fb_intercept */ \
451 F(bool, JitEnableRenameFunction, false) \
452 F(bool, JitUseVtuneAPI, false) \
454 F(bool, JitDisabledByHphpd, false) \
455 F(bool, JitTransCounters, false) \
456 F(bool, JitPseudomain, jitPseudomainDefault()) \
457 F(bool, HHIRBytecodeControlFlow, controlFlowDefault()) \
458 F(bool, HHIRCse, true) \
459 F(bool, HHIRSimplification, true) \
460 F(bool, HHIRGenOpts, true) \
461 F(bool, HHIRJumpOpts, true) \
462 F(bool, HHIRRefcountOpts, refcountOptsDefault()) \
463 F(bool, HHIRRefcountOptsAlwaysSink, false) \
464 F(bool, HHIRExtraOptPass, true) \
465 F(uint32_t, HHIRNumFreeRegs, 64) \
466 F(bool, HHIREnableGenTimeInlining, true) \
467 F(uint32_t, HHIRInliningMaxCost, 13) \
468 F(uint32_t, HHIRInliningMaxDepth, 4) \
469 F(uint32_t, HHIRInliningMaxReturnDecRefs, 3) \
470 F(bool, HHIRInlineFrameOpts, true) \
471 F(bool, HHIRInlineSingletons, true) \
472 /* 1 (the default) gives most asserts. 2 adds less commonly \
473 * useful/more expensive asserts. */ \
474 F(uint32_t, HHIRGenerateAsserts, debug) \
475 F(bool, HHIRDirectExit, true) \
476 F(bool, HHIRDeadCodeElim, true) \
477 F(bool, HHIRPredictionOpts, true) \
478 F(bool, HHIRMemoryOpts, true) \
479 F(bool, HHIRStressCodegenBlocks, false) \
480 /* Register allocation flags */ \
481 F(bool, HHIREnablePreColoring, true) \
482 F(bool, HHIREnableCoalescing, true) \
483 F(bool, HHIRAllocSIMDRegs, true) \
484 /* Region compiler flags */ \
485 F(bool, JitLoops, loopsDefault()) \
486 F(string, JitRegionSelector, regionSelectorDefault()) \
487 F(bool, JitPGO, pgoDefault()) \
488 F(string, JitPGORegionSelector, pgoRegionSelectorDefault()) \
489 F(uint64_t, JitPGOThreshold, pgoThresholdDefault()) \
490 F(bool, JitPGOHotOnly, false) \
491 F(bool, JitPGOUsePostConditions, true) \
492 F(uint32_t, JitUnlikelyDecRefPercent,10) \
493 F(uint32_t, JitPGOReleaseVVMinPercent, 10) \
494 F(bool, JitPGOStringSpec, false) \
495 F(bool, JitPGOArrayGetStress, false) \
496 F(uint32_t, HotFuncCount, 4100) \
497 F(bool, HHIRValidateRefCount, debug) \
498 F(bool, HHIRRelaxGuards, true) \
499 /* DumpBytecode =1 dumps user php, =2 dumps systemlib & user php */ \
500 F(int32_t, DumpBytecode, 0) \
501 F(bool, DumpHhas, false) \
502 F(bool, DumpTC, false) \
503 F(bool, DumpTCAnchors, false) \
504 F(bool, DumpAst, false) \
505 F(bool, MapTCHuge, hugePagesSoundNice()) \
506 F(bool, MapHotTextHuge, hugePagesSoundNice()) \
507 F(bool, MapTgtCacheHuge, false) \
508 F(int32_t, MaxLowMemHugePages, hugePagesSoundNice() ? 8 : 0) \
509 F(uint32_t, TCNumHugeHotMB, 16) \
510 F(uint32_t, TCNumHugeColdMB, 4) \
511 F(bool, RandomHotFuncs, false) \
512 F(bool, DisableSomeRepoAuthNotices, true) \
513 F(uint32_t, InitialNamedEntityTableSize, 30000) \
514 F(uint32_t, InitialStaticStringTableSize, \
515 kDefaultInitialStaticStringTableSize) \
516 F(uint32_t, PCRETableSize, kPCREInitialTableSize) \
517 F(uint64_t, PCREExpireInterval, 2 * 60 * 60) \
518 F(bool, EnableNuma, ServerExecutionMode()) \
519 F(bool, EnableNumaLocal, ServerExecutionMode()) \
520 /* */
522 private:
523 using string = std::string;
525 // Custom settings. This should be accessed via the GetServerCustomSetting
526 // APIs.
527 static std::map<std::string, std::string> CustomSettings;
529 public:
530 #define F(type, name, unused) \
531 static type Eval ## name;
532 EVALFLAGS()
534 #undef F
536 static bool RecordCodeCoverage;
537 static std::string CodeCoverageOutputFile;
539 // Repo (hhvm bytecode repository) options
540 static std::string RepoLocalMode;
541 static std::string RepoLocalPath;
542 static std::string RepoCentralPath;
543 static std::string RepoEvalMode;
544 static std::string RepoJournal;
545 static bool RepoCommit;
546 static bool RepoDebugInfo;
547 static bool RepoAuthoritative;
548 static bool RepoPreload;
550 // Sandbox options
551 static bool SandboxMode;
552 static std::string SandboxPattern;
553 static std::string SandboxHome;
554 static std::string SandboxFallback;
555 static std::string SandboxConfFile;
556 static std::map<std::string, std::string> SandboxServerVariables;
557 static bool SandboxFromCommonRoot;
558 static std::string SandboxDirectoriesRoot;
559 static std::string SandboxLogsRoot;
561 // Debugger options
562 static bool EnableDebugger;
563 static bool EnableDebuggerColor;
564 static bool EnableDebuggerPrompt;
565 static bool EnableDebuggerServer;
566 static bool EnableDebuggerUsageLog;
567 static bool DebuggerDisableIPv6;
568 static int DebuggerServerPort;
569 static int DebuggerDefaultRpcPort;
570 static std::string DebuggerDefaultRpcAuth;
571 static std::string DebuggerRpcHostDomain;
572 static int DebuggerDefaultRpcTimeout;
573 static std::string DebuggerDefaultSandboxPath;
574 static std::string DebuggerStartupDocument;
575 static int DebuggerSignalTimeout;
577 // Mail options
578 static std::string SendmailPath;
579 static std::string MailForceExtraParameters;
581 // preg stack depth and debug support options
582 static int64_t PregBacktraceLimit;
583 static int64_t PregRecursionLimit;
584 static bool EnablePregErrorLog;
586 // pprof/hhprof server options
587 static bool HHProfServerEnabled;
588 static int HHProfServerPort;
589 static int HHProfServerThreads;
590 static int HHProfServerTimeoutSeconds;
591 static bool HHProfServerProfileClientMode;
592 static bool HHProfServerAllocationProfile;
593 static int HHProfServerFilterMinAllocPerReq;
594 static int HHProfServerFilterMinBytesPerReq;
596 // SimpleXML options
597 static bool SimpleXMLEmptyNamespaceMatchesAll;
599 // Cookie options
600 static bool AllowDuplicateCookies;
602 #ifdef FACEBOOK
603 // fb303 server
604 static bool EnableFb303Server;
605 static int Fb303ServerPort;
606 static int Fb303ServerThreadStackSizeMb;
607 static int Fb303ServerWorkerThreads;
608 static int Fb303ServerPoolThreads;
609 #endif
611 // Xenon options
612 static double XenonPeriodSeconds;
613 static bool XenonForceAlwaysOn;
615 static std::vector<void(*)(const IniSettingMap&, const Hdf&)>* OptionHooks;
616 static void AddOptionHook(void(*)(const IniSettingMap& ini, const Hdf&));
618 // Convenience switch to turn on/off code alternatives via command-line
619 // Do not commit code guarded by this flag, for evaluation only.
620 static int EnableAlternative;
622 static_assert(sizeof(RuntimeOption) == 1, "no instance variables");
624 ///////////////////////////////////////////////////////////////////////////////
627 #endif // incl_HPHP_RUNTIME_OPTION_H_