diff --git a/hphp/compiler/compiler.cpp b/hphp/compiler/compiler.cpp index 50e3bf16b8265..f4014a49acf29 100644 --- a/hphp/compiler/compiler.cpp +++ b/hphp/compiler/compiler.cpp @@ -908,7 +908,7 @@ std::unique_ptr computeIndex( coro::blockingWait(coro::collectAll( indexPackage.index(indexUnit), coro::co_invoke([&]() -> coro::Task { - if (RO::EvalEnableDecl) { + if (Cfg::Eval::EnableDecl) { co_return co_await indexBuiltinSymbolDecls(indexUnit, executor, client); } @@ -1055,7 +1055,7 @@ bool process(CompilerOptions &po) { sample.setStr("push_phases", po.push_phases); sample.setStr("matched_overrides", po.matched_overrides); sample.setStr("use_hphpc", "true"); - sample.setStr("use_hhbbc", RO::EvalUseHHBBC ? "true" : "false"); + sample.setStr("use_hhbbc", Cfg::Eval::UseHHBBC ? "true" : "false"); // Track the unit-emitters created for system during // hphp_process_init(). @@ -1098,7 +1098,7 @@ bool process(CompilerOptions &po) { // HHBBC specific state (if we're going to run it). Optional hhbbcInputs; Optional>> hhbbcConfig; - if (RO::EvalUseHHBBC) { + if (Cfg::Eval::UseHHBBC) { hhbbcInputs.emplace(); // We want to do this as early as possible hhbbcConfig.emplace( @@ -1161,7 +1161,7 @@ bool process(CompilerOptions &po) { if (Option::GenerateTextHHBC || Option::GenerateHhasHHBC) { auto old_repo_auth = RuntimeOption::RepoAuthoritative; - RuntimeOption::RepoAuthoritative = RuntimeOption::EvalUseHHBBC; + RuntimeOption::RepoAuthoritative = Cfg::Eval::UseHHBBC; SCOPE_EXIT { RuntimeOption::RepoAuthoritative = old_repo_auth; }; genText(*ue, po.outputDir); } @@ -1170,7 +1170,7 @@ bool process(CompilerOptions &po) { ++numUnits; - if (!RO::EvalUseHHBBC) { + if (!Cfg::Eval::UseHHBBC) { // HHBBC assigns m_sn and the SHA1, but we have to do it ourself // if we're not running it. auto const sn = nextSn++; @@ -1192,7 +1192,7 @@ bool process(CompilerOptions &po) { // Process unit-emitters produced locally (usually systemlib stuff). auto const emitLocalUnit = [&] (Package::UEVec ues) -> coro::Task { - if (RO::EvalUseHHBBC) { + if (Cfg::Eval::UseHHBBC) { // If we're using HHBBC, turn them into WholeProgramInput // key/values (after checking uniqueness), upload the values, // and store them in the WholeProgramInput. @@ -1230,7 +1230,7 @@ bool process(CompilerOptions &po) { std::vector files, Client::ExecMetadata metadata) -> coro::Task { - if (RO::EvalUseHHBBC) { + if (Cfg::Eval::UseHHBBC) { // Run the HHBBC parse job, which produces WholeProgramInput // key/values. auto hhbbcConfigRef = co_await hhbbcConfig->getCopy(); @@ -1331,7 +1331,7 @@ bool process(CompilerOptions &po) { return p.m_module_use && moduleInDeployment.contains(p.m_module_use); }; - if (RO::EvalUseHHBBC) { + if (Cfg::Eval::UseHHBBC) { // Retrieve HHBBC WPI (Key, Ref) pairs that were already parsed. // No Async I/O is necessary in this case. for (size_t i = 0, n = rpaths.size(); i < n; ++i) { @@ -1459,7 +1459,7 @@ bool process(CompilerOptions &po) { Timer emitTimer(Timer::WallTime, "emit"); addInputsToPackage(*package, po); - if (!RO::EvalUseHHBBC && Option::GenerateBinaryHHBC) { + if (!Cfg::Eval::UseHHBBC && Option::GenerateBinaryHHBC) { // Initialize autoload and repo for emitUnit() to populate autoload.emplace(); repo.emplace(outputFile); @@ -1522,7 +1522,7 @@ bool process(CompilerOptions &po) { auto const logSample = [&] { // Only log big builds. - if (numUnits >= RO::EvalHHBBCMinUnitsToLog) { + if (numUnits >= Cfg::Eval::HHBBCMinUnitsToLog) { sample.force_init = true; StructuredLog::log("hhvm_whole_program", sample); } @@ -1537,7 +1537,7 @@ bool process(CompilerOptions &po) { repo->finish(getGlobalData(), *autoload, packageInfo); return true; }; - if (!RO::EvalUseHHBBC) { + if (!Cfg::Eval::UseHHBBC) { logSample(); dispose(std::move(executor), std::move(client)); return finish(); diff --git a/hphp/compiler/option.cpp b/hphp/compiler/option.cpp index ccf206274fbf5..43396e8113c74 100644 --- a/hphp/compiler/option.cpp +++ b/hphp/compiler/option.cpp @@ -153,9 +153,6 @@ void Option::Load(const IniSetting::Map& ini, Hdf &config) { Config::Bind(ForceEnableSymbolRefs, ini, config, "ForceEnableSymbolRefs", false); - Config::Bind(RuntimeOption::EvalUseHHBBC, ini, config, "UseHHBBC", - RuntimeOption::EvalUseHHBBC); - Config::Bind(ParserGroupSize, ini, config, "ParserGroupSize", kDefaultParserGroupSize); Config::Bind(ParserDirGroupSizeLimit, ini, config, diff --git a/hphp/compiler/package.cpp b/hphp/compiler/package.cpp index 517a4a39cf16b..1c1b0be1f18ab 100644 --- a/hphp/compiler/package.cpp +++ b/hphp/compiler/package.cpp @@ -46,6 +46,7 @@ #include "hphp/runtime/vm/type-alias-emitter.h" #include "hphp/runtime/vm/unit-emitter.h" #include "hphp/runtime/vm/unit-parser.h" +#include "hphp/util/configs/eval.h" #include "hphp/util/exception.h" #include "hphp/util/extern-worker.h" #include "hphp/util/hash.h" @@ -385,7 +386,7 @@ Package::parseRun(const std::string& content, /* forDebuggerEval */ false, repoOptions, mode, - RO::EvalEnableDecl ? &provider : nullptr + Cfg::Eval::EnableDecl ? &provider : nullptr ); } catch (const CompilerAbort& exn) { ParseMeta meta; @@ -1136,7 +1137,7 @@ Package::UnitDecls IndexJob::run( auto symbols = hackc::decls_to_symbols(*decls.decls); auto summary = summary_of_symbols(symbols); s_indexMetas.emplace_back(summary); - if (!RO::EvalEnableDecl) { + if (!Cfg::Eval::EnableDecl) { // If decl-directed bytecode is disabled, parseRun() will not need // these decls, so don't bother storing them. return Package::UnitDecls{}; @@ -1163,7 +1164,7 @@ coro::Task Package::index(const IndexCallback& callback) { coro::Task Package::indexAll(const IndexCallback& callback) { // If EnableDecl==true, all source files should be included in the // index, not just ondemand-eligible files. - auto const filterFiles = !RO::EvalEnableDecl; + auto const filterFiles = !Cfg::Eval::EnableDecl; auto const filterDirs = false; // Compute the groups to index diff --git a/hphp/doc/configs.specification b/hphp/doc/configs.specification index 6112a10f76c05..f0f7b013fc511 100644 --- a/hphp/doc/configs.specification +++ b/hphp/doc/configs.specification @@ -304,6 +304,96 @@ The format can be found in hphp/tools/configs/generate_configs.rs - bool Eval.WarnOnSkipFrameLookup = true, UNKNOWN +- uint32_t Eval.EnableCodeCoverage = 0, UNKNOWN + + 0 - Code coverage cannot be enabled through request param + 1 - Code coverage can be enabled through request param + 2 - Code coverage enabled + +- uint32_t Eval.EnablePerFileCoverage = 0, UNKNOWN + + 0 - Per-file coverage cannot be enabled through request param + 1 - Per-file coverage can be enabled through request param + 2 - Per-file coverage enabled + +- bool Eval.EnableFuncCoverage = false, UNKNOWN + +- uint64_t Eval.FactsWorkers, UNKNOWN + + The number of worker threads to spawn for facts extraction. + +- bool Eval.FactsExcludeModuleMembership = false, UNKNOWN + + Whether to force the old Facts SQLite DB format. + +- bool Eval.HackCompilerInheritConfig = true, UNKNOWN + + Whether the HackC compiler should inherit the compiler config of the + HHVM process that launches it. + +- bool Eval.EnableDecl = false, UNKNOWN, unitcacheflag + + enable decl-directed bytecode compilation + +- uint32_t Eval.LogDeclDeps = 0, UNKNOWN + +- uint32_t Eval.LogDeclErrors = 0, UNKNOWN + +- bool Eval.LogAllDeclTearing = false, UNKNOWN + +- std::string Eval.EmbeddedDataExtractPath = "/var/run/hhvm_%{type}_%{buildid}", UNKNOWN, postprocess + + When using embedded data, extract it to the ExtractPath or the + ExtractFallback. + +- std::string Eval.EmbeddedDataFallbackPath = "/tmp/hhvm_%{type}_%{buildid}_XXXXXX", UNKNOWN, postprocess + + See Eval.EmbeddedDataExtractPath + +- bool Eval.EmbeddedDataTrustExtract = true, UNKNOWN + + Whether to trust existing versions of extracted embedded data. + +- bool Eval.LogThreadCreateBacktraces = false, UNKNOWN + +- bool Eval.FailJitPrologs = false, UNKNOWN + +- bool Eval.UseHHBBC, UNKNOWN, compileroption(UseHHBBC) + +- uint32_t Eval.HHBBCMinUnitsToLog = 1000, UNKNOWN + + Threshold number of units to log to hhvm_whole_program table. + systemlib has around 200 units, so use a larger default to avoid + logging for unit tests. + +- bool Eval.CachePerRepoOptionsPath = true, UNKNOWN + +- bool Eval.LogHackcMemStats = false, UNKNOWN + +- uint32_t Eval.TsameCollisionSampleRate = 1, UNKNOWN + +- uint32_t Eval.WarnOnTooManyArguments = 0, emil + + 0 -> no warning, 1 -> warning, 2 -> exception + +- uint32_t Eval.GetClassBadArgument = 0, emil + + 0 -> no warning, 1 -> warning, 2 -> exception + +- uint32_t Eval.WarnOnIncDecInvalidType = 0, UNKNOWN + + 0 - No restrictions on types that can be incremented or decremented + 1 - Warn when incrementing or decrementing non numeric types + 2 - Throw when incrementing or decrementing non numeric types + +- uint32_t Eval.WarnOnImplicitCoercionOfEnumValue = 0, UNKNOWN + + This flag exists to control behaviour when implicit coercion is + taking place on an enum value. + 0 - No warning + 1 - Warning + 2 - Do not do implicit coercion + - uint32_t Eval.MaxHighArenaHugePages = 0, UNKNOWN - uint32_t Eval.Num1GPagesForReqHeap = 0, UNKNOWN diff --git a/hphp/hhbbc/main.cpp b/hphp/hhbbc/main.cpp index 6a09dce8c6d44..db77b60beb40e 100644 --- a/hphp/hhbbc/main.cpp +++ b/hphp/hhbbc/main.cpp @@ -52,6 +52,7 @@ #include "hphp/hhbbc/parallel.h" #include "hphp/hhbbc/representation.h" +#include "hphp/util/configs/eval.h" #include "hphp/util/configs/jit.h" #include "hphp/util/configs/php7.h" #include "hphp/util/logger.h" @@ -536,7 +537,7 @@ void compile_repo() { repo.finish(get_global_data(), autoload, packageInfo); // Only log big builds. - if (numUnits >= RO::EvalHHBBCMinUnitsToLog) { + if (numUnits >= Cfg::Eval::HHBBCMinUnitsToLog) { sample.force_init = true; StructuredLog::log("hhvm_whole_program", sample); } diff --git a/hphp/runtime/base/configs/eval-impl.cpp b/hphp/runtime/base/configs/eval-impl.cpp index 248563203ad03..e844c6dd63442 100644 --- a/hphp/runtime/base/configs/eval-impl.cpp +++ b/hphp/runtime/base/configs/eval-impl.cpp @@ -16,6 +16,7 @@ #include "hphp/runtime/base/configs/eval-loader.h" +#include "hphp/util/build-info.h" #include "hphp/util/compilation-flags.h" #include "hphp/util/process-cpu.h" @@ -29,6 +30,14 @@ uint64_t EvalLoader::VMStackElmsDefault() { #endif } +uint64_t EvalLoader::FactsWorkersDefault() { + return Process::GetCPUCount(); +} + +bool EvalLoader::UseHHBBCDefault() { + return !getenv("HHVM_DISABLE_HHBBC"); +} + uint32_t EvalLoader::UnixServerWorkersDefault() { return Process::GetCPUCount(); } @@ -37,4 +46,12 @@ bool EvalLoader::CrashOnStaticAnalysisErrorDefault() { return debug; } +void EvalLoader::EmbeddedDataExtractPathPostProcess(std::string& path) { + replacePlaceholders(path); +} + +void EvalLoader::EmbeddedDataFallbackPathPostProcess(std::string& path) { + replacePlaceholders(path); +} + } diff --git a/hphp/runtime/base/enum-util.cpp b/hphp/runtime/base/enum-util.cpp index 3f002f0a4b1ce..aa9f2adc5a5a7 100644 --- a/hphp/runtime/base/enum-util.cpp +++ b/hphp/runtime/base/enum-util.cpp @@ -46,7 +46,7 @@ bool isCoercibleToInteger(const TypedValue *cell, int64_t &num, const char* call return false; } - switch (RuntimeOption::EvalWarnOnImplicitCoercionOfEnumValue) { + switch (Cfg::Eval::WarnOnImplicitCoercionOfEnumValue) { case 0: return true; case 1: diff --git a/hphp/runtime/base/execution-context.cpp b/hphp/runtime/base/execution-context.cpp index 5bb4d48c02250..4649695e27df2 100644 --- a/hphp/runtime/base/execution-context.cpp +++ b/hphp/runtime/base/execution-context.cpp @@ -1511,7 +1511,7 @@ void ExecutionContext::requestExit() { if (Logger::UseRequestLog) Logger::SetThreadHook(nullptr); if (m_requestTrace) record_trace(std::move(*m_requestTrace)); if (!RO::RepoAuthoritative) m_requestStartForTearing.reset(); - if (RO::EvalLogDeclDeps) m_loadedRdepMap.clear(); + if (Cfg::Eval::LogDeclDeps) m_loadedRdepMap.clear(); } /** diff --git a/hphp/runtime/base/isame-log.cpp b/hphp/runtime/base/isame-log.cpp index 35910cae2cea8..96c9ccd2045f2 100644 --- a/hphp/runtime/base/isame-log.cpp +++ b/hphp/runtime/base/isame-log.cpp @@ -19,6 +19,8 @@ #include "hphp/runtime/ext/std/ext_std_errorfunc.h" #include "hphp/runtime/vm/jit/fixup.h" #include "hphp/runtime/vm/unit-parser.h" + +#include "hphp/util/configs/eval.h" #include "hphp/util/stack-trace.h" namespace HPHP { @@ -67,19 +69,19 @@ bool log_impl(const char* event, uint32_t rate, bool tsame_log(const StringData* input, const StringData* arg) { FTRACE(1, "tsame collision {} != {}\n", input->slice(), arg->slice()); - return log_impl("tsame", RO::EvalTsameCollisionSampleRate, input->slice(), + return log_impl("tsame", Cfg::Eval::TsameCollisionSampleRate, input->slice(), arg->slice()); } int tstrcmp_log(const char* s1, const char* s2) { FTRACE(1, "tstrcmp collision {} != {}\n", s1, s2); - log_impl("tstrcmp", RO::EvalTsameCollisionSampleRate, s1, s2); + log_impl("tstrcmp", Cfg::Eval::TsameCollisionSampleRate, s1, s2); return 0; } int tstrcmp_log_slice(folly::StringPiece s1, folly::StringPiece s2) { FTRACE(1, "tstrcmp_slice collision {} != {}\n", s1, s2); - log_impl("tstrcmp_slice", RO::EvalTsameCollisionSampleRate, s1, s2); + log_impl("tstrcmp_slice", Cfg::Eval::TsameCollisionSampleRate, s1, s2); return 0; } } diff --git a/hphp/runtime/base/program-functions.cpp b/hphp/runtime/base/program-functions.cpp index c8df83a906f12..bbcebfa71229c 100644 --- a/hphp/runtime/base/program-functions.cpp +++ b/hphp/runtime/base/program-functions.cpp @@ -1991,14 +1991,14 @@ static int execute_program_impl(int argc, char** argv) { try { type_scan::init( addTypeToEmbeddedPath( - RuntimeOption::EvalEmbeddedDataExtractPath, + Cfg::Eval::EmbeddedDataExtractPath, "type_scanners" ), addTypeToEmbeddedPath( - RuntimeOption::EvalEmbeddedDataFallbackPath, + Cfg::Eval::EmbeddedDataFallbackPath, "type_scanners" ), - RuntimeOption::EvalEmbeddedDataTrustExtract + Cfg::Eval::EmbeddedDataTrustExtract ); } catch (const type_scan::InitException& exn) { Logger::Error("Unable to initialize GC type-scanners: %s", exn.what()); @@ -2009,14 +2009,14 @@ static int execute_program_impl(int argc, char** argv) { // It's okay if this fails. init_member_reflection( addTypeToEmbeddedPath( - RuntimeOption::EvalEmbeddedDataExtractPath, + Cfg::Eval::EmbeddedDataExtractPath, "member_reflection" ), addTypeToEmbeddedPath( - RuntimeOption::EvalEmbeddedDataFallbackPath, + Cfg::Eval::EmbeddedDataFallbackPath, "member_reflection" ), - RuntimeOption::EvalEmbeddedDataTrustExtract + Cfg::Eval::EmbeddedDataTrustExtract ); if (!ShmCounters::initialize(true, Logger::Error)) { @@ -2566,7 +2566,7 @@ void hphp_process_init(bool skipExtensions) { jit::mcgen::processInit(); jit::processInitProfData(); - if (RuntimeOption::EvalEnableDecl) { + if (Cfg::Eval::EnableDecl) { if (!skipExtensions) { ExtensionRegistry::moduleDeclInit(); } diff --git a/hphp/runtime/base/runtime-option.cpp b/hphp/runtime/base/runtime-option.cpp index 315a70baf56af..01449e3bfd686 100644 --- a/hphp/runtime/base/runtime-option.cpp +++ b/hphp/runtime/base/runtime-option.cpp @@ -414,7 +414,7 @@ const RepoOptions& RepoOptions::forFile(const std::string& path) { // configs that may be added. Since we expect to see a single config // per repository we expect that this will be a reasonably safe, // optimization. - if (RuntimeOption::EvalCachePerRepoOptionsPath) { + if (Cfg::Eval::CachePerRepoOptionsPath) { if (!s_lastSeenRepoConfig->empty() && isParentOf(*s_lastSeenRepoConfig, path)) { if (auto const r = test(*s_lastSeenRepoConfig)) return *r; @@ -1676,9 +1676,6 @@ void RuntimeOption::Load( s_enable_static_arena = Config::GetBool(ini, config, "Eval.UseTLStaticArena", true); - replacePlaceholders(EvalEmbeddedDataExtractPath); - replacePlaceholders(EvalEmbeddedDataFallbackPath); - if (!jit::mcgen::retranslateAllEnabled()) { Cfg::Jit::WorkerThreads = 0; if (EvalJitSerdesMode != JitSerdesMode::Off) { diff --git a/hphp/runtime/base/runtime-option.h b/hphp/runtime/base/runtime-option.h index 99f15e0070927..ae947633f7d60 100644 --- a/hphp/runtime/base/runtime-option.h +++ b/hphp/runtime/base/runtime-option.h @@ -433,69 +433,6 @@ struct RuntimeOption { #define EVALFLAGS() \ /* F(type, name, defaultVal) */ \ - /* \ - * 0 - Code coverage cannot be enabled through request param \ - * 1 - Code coverage can be enabled through request param \ - * 2 - Code coverage enabled \ - */ \ - F(uint32_t, EnableCodeCoverage, 0) \ - /* \ - * 0 - Per-file coverage cannot be enabled through request param \ - * 1 - Per-file coverage can be enabled through request param \ - * 2 - Per-file coverage enabled \ - */ \ - F(uint32_t, EnablePerFileCoverage, 0) \ - F(bool, EnableFuncCoverage, false) \ - /* The number of worker threads to spawn for facts extraction. */ \ - F(uint64_t, FactsWorkers, Process::GetCPUCount()) \ - /* Whether to force the old Facts SQLite DB format. */ \ - F(bool, FactsExcludeModuleMembership, false) \ - /* Whether the HackC compiler should inherit the compiler config of the - HHVM process that launches it. */ \ - F(bool, HackCompilerInheritConfig, true) \ - /* enable decl-directed bytecode compilation */ \ - F(bool, EnableDecl, false) \ - F(uint32_t, LogDeclDeps, 0) \ - F(uint32_t, LogDeclErrors, 0) \ - F(bool, LogAllDeclTearing, false) \ - /* When using embedded data, extract it to the ExtractPath or the - * ExtractFallback. */ \ - F(string, EmbeddedDataExtractPath, "/var/run/hhvm_%{type}_%{buildid}") \ - F(string, EmbeddedDataFallbackPath, "/tmp/hhvm_%{type}_%{buildid}_XXXXXX") \ - /* Whether to trust existing versions of extracted embedded data. */ \ - F(bool, EmbeddedDataTrustExtract, true) \ - F(bool, LogThreadCreateBacktraces, false) \ - F(bool, FailJitPrologs, false) \ - F(bool, UseHHBBC, !getenv("HHVM_DISABLE_HHBBC")) \ - /* Threshold number of units to log to hhvm_whole_program table. - systemlib has around 200 units, so use a larger default to avoid - logging for unit tests. */ \ - F(uint32_t, HHBBCMinUnitsToLog, 1000) \ - F(bool, CachePerRepoOptionsPath, true) \ - F(bool, LogHackcMemStats, false) \ - F(uint32_t, TsameCollisionSampleRate, 1) \ - /* WarnOnTooManyArguments: - * 0 -> no warning, 1 -> warning, 2 -> exception - */ \ - F(uint32_t, WarnOnTooManyArguments, 0) \ - /* GetClassBadArgument: - * 0 -> no warning, 1 -> warning, 2 -> exception - */ \ - F(uint32_t, GetClassBadArgument, 0) \ - /* WarnOnIncDecInvalidType: - * 0 - No restrictions on types that can be incremented or decremented - * 1 - Warn when incrementing or decrementing non numeric types - * 2 - Throw when incrementing or decrementing non numeric types - */ \ - F(uint32_t, WarnOnIncDecInvalidType, 0) \ - /* WarnOnImplicitCoercionOfEnumValue - * This flag exists to control behaviour when implicit coercion is - * taking place on an enum value. - * 0 - No warning - * 1 - Warning - * 2 - Do not do implicit coercion - */ \ - F(uint32_t, WarnOnImplicitCoercionOfEnumValue, 0) \ F(bool, EnableLogBridge, true) \ F(bool, MoreAccurateMemStats, true) \ F(bool, MemInfoCheckCgroup2, true) \ diff --git a/hphp/runtime/base/tv-arith.cpp b/hphp/runtime/base/tv-arith.cpp index 2e8530f218d02..96ba6b51cb09a 100644 --- a/hphp/runtime/base/tv-arith.cpp +++ b/hphp/runtime/base/tv-arith.cpp @@ -31,6 +31,8 @@ #include "hphp/runtime/ext/std/ext_std_math.h" #include "hphp/runtime/vm/class-meth-data-ref.h" +#include "hphp/util/configs/eval.h" + namespace HPHP { ////////////////////////////////////////////////////////////////////// @@ -246,7 +248,7 @@ void stringIncDecOp(Op op, tv_lval cell, StringData* sd) { } void raiseIncDecInvalidType(tv_lval cell) { - switch (RuntimeOption::EvalWarnOnIncDecInvalidType) { + switch (Cfg::Eval::WarnOnIncDecInvalidType) { case 0: break; case 1: diff --git a/hphp/runtime/base/unit-cache.cpp b/hphp/runtime/base/unit-cache.cpp index 2c1825d219d68..668cc117eea01 100644 --- a/hphp/runtime/base/unit-cache.cpp +++ b/hphp/runtime/base/unit-cache.cpp @@ -490,9 +490,9 @@ enum class UnitChange { * Iterate over the dependencies of `u` and check if the hash of any of those * dependencies on disk differs from the hash recorded in the unit. * See `changeReason` for more details. This functions asserts that either: - * - `RO::EvalEnableDecl` is false + * - `Cfg::Eval::EnableDecl` is false * - `u->deps()` is empty. - * If `RO::EvalEnableDecl` is true and `u->deps()` is non-empty, then we are in + * If `Cfg::Eval::EnableDecl` is true and `u->deps()` is non-empty, then we are in * an invalid state: tracking declarations despite not having decl driven * bytecode enabled. * @@ -504,7 +504,7 @@ bool anyDepsChanged( Stream::Wrapper* wrapper ) { assertx(u); - assertx(RO::EvalEnableDecl || u->deps().empty()); + assertx(Cfg::Eval::EnableDecl || u->deps().empty()); for (auto& [file, hash] : u->deps()) { if (getHashForFile(file, wrapper, options.dir()) != hash) { return true; @@ -1272,7 +1272,7 @@ CachedUnit lookupUnitNonRepoAuth(const StringData* requestedPath, g_context->onLoadWithOptions(requestedPath->data(), options); } - if (RuntimeOption::EvalEnableDecl || Cfg::Eval::AutoloadInitEarly) { + if (Cfg::Eval::EnableDecl || Cfg::Eval::AutoloadInitEarly) { // Initialize AutoloadHandler before we parse the file so HhvmDeclProvider // can respond to queries from HackC. AutoloadHandler::s_instance.getCheck(); diff --git a/hphp/runtime/base/unit-cache.h b/hphp/runtime/base/unit-cache.h index 88046db7f6f4e..a6cbdc2e81483 100644 --- a/hphp/runtime/base/unit-cache.h +++ b/hphp/runtime/base/unit-cache.h @@ -97,7 +97,6 @@ Unit* lookupSyslibUnit(StringData* path); R(EvalAssemblerFoldDefaultValues) \ R(RepoDebugInfo) \ R(EvalAssemblerMaxScalarSize) \ - R(EvalEnableDecl) \ std::string mangleUnitSha1(const folly::StringPiece fileSha1, const folly::StringPiece fileName, diff --git a/hphp/runtime/ext/facts/fact-extractor.cpp b/hphp/runtime/ext/facts/fact-extractor.cpp index 577abce94a5ab..be907c06a77fd 100644 --- a/hphp/runtime/ext/facts/fact-extractor.cpp +++ b/hphp/runtime/ext/facts/fact-extractor.cpp @@ -30,6 +30,7 @@ #include "hphp/runtime/ext/facts/thread-factory.h" #include "hphp/runtime/vm/unit-parser.h" #include "hphp/util/configs/autoload.h" +#include "hphp/util/configs/eval.h" #include "hphp/util/logger.h" #include "hphp/util/match.h" #include "hphp/util/text-util.h" @@ -122,7 +123,7 @@ std::vector> facts_from_paths( const std::vector& pathsAndHashes) { folly::CPUThreadPoolExecutor exec{ std::min( - RuntimeOption::EvalFactsWorkers, + Cfg::Eval::FactsWorkers, static_cast(pathsAndHashes.size())), make_thread_factory("FactExtractor")}; diff --git a/hphp/runtime/ext/fb/ext_fb.cpp b/hphp/runtime/ext/fb/ext_fb.cpp index 18cd7feacbe3c..6e26736ac5e11 100644 --- a/hphp/runtime/ext/fb/ext_fb.cpp +++ b/hphp/runtime/ext/fb/ext_fb.cpp @@ -1213,12 +1213,12 @@ void HHVM_FUNCTION(fb_enable_code_coverage) { raise_notice("Calling fb_enable_code_coverage from a nested " "VM instance may cause unpredicable results"); } - if (RuntimeOption::EvalEnableCodeCoverage == 0) { + if (Cfg::Eval::EnableCodeCoverage == 0) { SystemLib::throwRuntimeExceptionObject( "Calling fb_enable_code_coverage without enabling the setting " "Eval.EnableCodeCoverage"); } - if (RuntimeOption::EvalEnableCodeCoverage == 1) { + if (Cfg::Eval::EnableCodeCoverage == 1) { if (!isEnableCodeCoverageReqParamTrue()) { SystemLib::throwRuntimeExceptionObject( "Calling fb_enable_code_coverage without adding " @@ -1230,7 +1230,7 @@ void HHVM_FUNCTION(fb_enable_code_coverage) { "Calling fb_enable_code_coverage with " "'enable_per_file_coverage' in request params"); } - if (RuntimeOption::EvalEnablePerFileCoverage == 2) { + if (Cfg::Eval::EnablePerFileCoverage == 2) { SystemLib::throwRuntimeExceptionObject( "Calling fb_enable_code_coverage with " "Eval.EnablePerFileCoverage=2"); diff --git a/hphp/runtime/ext/hh/ext_hh.cpp b/hphp/runtime/ext/hh/ext_hh.cpp index 62c2fe999225e..b751c6008df1a 100644 --- a/hphp/runtime/ext/hh/ext_hh.cpp +++ b/hphp/runtime/ext/hh/ext_hh.cpp @@ -1023,16 +1023,16 @@ void check_coverage_flags() { if (RO::RepoAuthoritative) { throw_invalid_operation_exception(s_no_repo_mode.get()); } - if (RO::EvalEnableCodeCoverage == 2) { + if (Cfg::Eval::EnableCodeCoverage == 2) { throw_invalid_operation_exception(s_no_code_cov_2.get()); } if (isEnableCodeCoverageReqParamTrue()) { throw_invalid_operation_exception(s_plain_cov_req_param_set.get()); } - if (RO::EvalEnablePerFileCoverage == 0) { + if (Cfg::Eval::EnablePerFileCoverage == 0) { throw_invalid_operation_exception(s_no_flag_set.get()); } - if (RO::EvalEnablePerFileCoverage == 1) { + if (Cfg::Eval::EnablePerFileCoverage == 1) { if (!isEnablePerFileCoverageReqParamTrue()) { throw_invalid_operation_exception(s_no_req_param_set.get()); } diff --git a/hphp/runtime/vm/builtin-symbol-map.cpp b/hphp/runtime/vm/builtin-symbol-map.cpp index 229a770e77687..b90528e02cab7 100644 --- a/hphp/runtime/vm/builtin-symbol-map.cpp +++ b/hphp/runtime/vm/builtin-symbol-map.cpp @@ -52,7 +52,7 @@ SymbolMap s_modules; void registerBuiltinSymbols(const std::string& serialized_decls) { // We should *never* call this function unless decl driven bytecode is enabled - assertx(RuntimeOption::EvalEnableDecl); + assertx(Cfg::Eval::EnableDecl); auto decls = hackc::binary_to_decls_and_blob(serialized_decls); @@ -85,7 +85,7 @@ Optional getBuiltinDecls( }; // We should only ever call this if `EnableDecl` is set, and asserting on // `symbol` here is a smoke check - assertx(RuntimeOption::EvalEnableDecl && symbol); + assertx(Cfg::Eval::EnableDecl && symbol); switch (kind) { case AutoloadMap::KindOf::Type: case AutoloadMap::KindOf::TypeAlias: @@ -102,7 +102,7 @@ Optional getBuiltinDecls( } hphp_fast_set getAllBuiltinDecls() { - assertx(RuntimeOption::EvalEnableDecl); + assertx(Cfg::Eval::EnableDecl); hphp_fast_set res; for (const auto& it: s_types) { res.emplace(it.second.get()); diff --git a/hphp/runtime/vm/builtin-symbol-map.h b/hphp/runtime/vm/builtin-symbol-map.h index f6fa8dd60efdb..4549937cd8cbd 100644 --- a/hphp/runtime/vm/builtin-symbol-map.h +++ b/hphp/runtime/vm/builtin-symbol-map.h @@ -31,7 +31,7 @@ namespace HPHP::Native { /** * Record all declarations in file `name` with source code `contents`. - * @precondition: RuntimeOption::EvalEnableDecl is true + * @precondition: Cfg::Eval::EnableDecl is true * @precondition: `name` and `contents` represent PHP that is shipped with HHVM */ void registerBuiltinSymbols(const std::string& serialized_decls); diff --git a/hphp/runtime/vm/cti.cpp b/hphp/runtime/vm/cti.cpp index 626bf057e695b..f19005099bb6a 100644 --- a/hphp/runtime/vm/cti.cpp +++ b/hphp/runtime/vm/cti.cpp @@ -137,7 +137,7 @@ auto const next_ip_saved = r15; // used when next_ip needs to be moved to a Offset compile_cti(Func* func, PC unitpc) { auto const needsCoverageCheck = !RuntimeOption::RepoAuthoritative && - RuntimeOption::EvalEnableCodeCoverage > 0; + Cfg::Eval::EnableCodeCoverage > 0; std::lock_guard lock(g_mutex); auto cti_entry = func->ctiEntry(); if (cti_entry) return cti_entry; // we lost the compile race diff --git a/hphp/runtime/vm/decl-provider.cpp b/hphp/runtime/vm/decl-provider.cpp index f38f18e3d1ed8..a07e86b5387f4 100644 --- a/hphp/runtime/vm/decl-provider.cpp +++ b/hphp/runtime/vm/decl-provider.cpp @@ -19,6 +19,8 @@ #include "hphp/runtime/base/zend-string.h" #include "hphp/runtime/vm/builtin-symbol-map.h" #include "hphp/runtime/vm/decl-provider.h" + +#include "hphp/util/configs/eval.h" #include "hphp/util/sha1.h" #include @@ -33,7 +35,7 @@ std::unique_ptr HhvmDeclProvider::create(AutoloadMap* map, const RepoOptionsFlags& options, const std::filesystem::path& repoRoot) { - if (!RuntimeOption::EvalEnableDecl) { + if (!Cfg::Eval::EnableDecl) { return {nullptr}; } if (!map) { diff --git a/hphp/runtime/vm/func.cpp b/hphp/runtime/vm/func.cpp index 928e4f6f9e373..0abddddce69d7 100644 --- a/hphp/runtime/vm/func.cpp +++ b/hphp/runtime/vm/func.cpp @@ -1207,7 +1207,7 @@ struct EmbeddedCoverageLinkMap { EmbeddedCoverageLinkMap s_covLinks; static InitFiniNode s_covLinksReinit([]{ - if (RO::RepoAuthoritative || !RO::EvalEnableFuncCoverage) return; + if (RO::RepoAuthoritative || !Cfg::Eval::EnableFuncCoverage) return; s_covLinks.emplace(RO::EvalFuncCountHint); }, InitFiniNode::When::PostRuntimeOptions, "s_funcVec reinit"); @@ -1225,7 +1225,7 @@ rds::Handle Func::GetCoverageIndex() { } rds::Handle Func::getCoverageHandle() const { - assertx(!RO::RepoAuthoritative && RO::EvalEnableFuncCoverage); + assertx(!RO::RepoAuthoritative && Cfg::Eval::EnableFuncCoverage); assertx(!isNoInjection() && !isMethCaller()); CoverageLinkMap::const_accessor cnsAcc; @@ -1253,7 +1253,7 @@ void Func::EnableCoverage() { "Cannot enable function call coverage in repo authoritative mode" ); } - if (!RO::EvalEnableFuncCoverage) { + if (!Cfg::Eval::EnableFuncCoverage) { SystemLib::throwInvalidOperationExceptionObject( "Cannot enable function call coverage (you must set " "Eval.EnableFuncCoverage = true)" @@ -1311,7 +1311,7 @@ Array Func::GetCoverage() { } void Func::recordCall() const { - if (RO::RepoAuthoritative || !RO::EvalEnableFuncCoverage) return; + if (RO::RepoAuthoritative || !Cfg::Eval::EnableFuncCoverage) return; if (tl_called_functions.isNull()) return; if (isNoInjection() || isMethCaller()) return; @@ -1323,7 +1323,7 @@ void Func::recordCall() const { } void Func::recordCallNoCheck() const { - assertx(!RO::RepoAuthoritative && RO::EvalEnableFuncCoverage); + assertx(!RO::RepoAuthoritative && Cfg::Eval::EnableFuncCoverage); assertx(!tl_called_functions.isNull()); assertx(tl_called_functions->isDict()); assertx(!isNoInjection() && !isMethCaller()); diff --git a/hphp/runtime/vm/jit/ir-opcode.cpp b/hphp/runtime/vm/jit/ir-opcode.cpp index 6cc8a67c42fe0..67e856d4e52b6 100644 --- a/hphp/runtime/vm/jit/ir-opcode.cpp +++ b/hphp/runtime/vm/jit/ir-opcode.cpp @@ -247,7 +247,7 @@ bool opcodeMayRaise(Opcode opc) { case IsTypeStructShallow: return Cfg::Eval::IsExprEnableUnresolvedWarning || Cfg::Eval::IsVecNotices || - RuntimeOption::EvalWarnOnImplicitCoercionOfEnumValue; + Cfg::Eval::WarnOnImplicitCoercionOfEnumValue; case StaticAnalysisError: return !Cfg::Eval::CrashOnStaticAnalysisError; diff --git a/hphp/runtime/vm/jit/irgen-func-prologue.cpp b/hphp/runtime/vm/jit/irgen-func-prologue.cpp index 0dab12180b632..fefc95c860e82 100644 --- a/hphp/runtime/vm/jit/irgen-func-prologue.cpp +++ b/hphp/runtime/vm/jit/irgen-func-prologue.cpp @@ -45,6 +45,7 @@ #include "hphp/runtime/vm/jit/translator.h" #include "hphp/runtime/vm/jit/type.h" +#include "hphp/util/configs/eval.h" #include "hphp/util/text-util.h" namespace HPHP::jit::irgen { @@ -340,7 +341,7 @@ void emitCalleeCoeffectChecks(IRGS& env, const Func* callee, } void emitCalleeRecordFuncCoverage(IRGS& env, const Func* callee) { - if (RO::RepoAuthoritative || !RO::EvalEnableFuncCoverage) return; + if (RO::RepoAuthoritative || !Cfg::Eval::EnableFuncCoverage) return; if (callee->isNoInjection() || callee->isMethCaller()) return; ifThen( diff --git a/hphp/runtime/vm/jit/irgen-incdec.h b/hphp/runtime/vm/jit/irgen-incdec.h index 0abacb0f945c8..83968f2cbaeac 100644 --- a/hphp/runtime/vm/jit/irgen-incdec.h +++ b/hphp/runtime/vm/jit/irgen-incdec.h @@ -19,6 +19,8 @@ #include "hphp/runtime/vm/jit/irgen-exit.h" #include "hphp/runtime/vm/jit/irgen-internal.h" +#include "hphp/util/configs/eval.h" + namespace HPHP::jit::irgen { //////////////////////////////////////////////////////////////////////////////// @@ -30,7 +32,7 @@ namespace HPHP::jit::irgen { inline SSATmp* incDec(IRGS& env, IncDecOp op, SSATmp* src) { // Old behavior handles non int/double types. New behavior warns/fatals for // non int/double types. - if (RuntimeOption::EvalWarnOnIncDecInvalidType == 0) { + if (Cfg::Eval::WarnOnIncDecInvalidType == 0) { if (src->isA(TNull)) { if (isInc(op)) PUNT(Inc-Null); return src; diff --git a/hphp/runtime/vm/jit/service-request-handlers.cpp b/hphp/runtime/vm/jit/service-request-handlers.cpp index 9ed56275342f4..6dd8e84b8b53a 100644 --- a/hphp/runtime/vm/jit/service-request-handlers.cpp +++ b/hphp/runtime/vm/jit/service-request-handlers.cpp @@ -144,7 +144,7 @@ TranslationResult getTranslation(SrcKey sk) { } if (UNLIKELY(!RO::RepoAuthoritative && sk.unit()->isCoverageEnabled())) { - assertx(RO::EvalEnablePerFileCoverage); + assertx(Cfg::Eval::EnablePerFileCoverage); SKTRACE(2, sk, "punting because per file code coverage is enabled\n"); return TranslationResult::failTransiently(); } diff --git a/hphp/runtime/vm/jit/tc-prologue.cpp b/hphp/runtime/vm/jit/tc-prologue.cpp index 8d6600a25d325..04a8caf52657b 100644 --- a/hphp/runtime/vm/jit/tc-prologue.cpp +++ b/hphp/runtime/vm/jit/tc-prologue.cpp @@ -83,7 +83,7 @@ uint32_t PrologueTranslator::paramIndexHelper(const Func* f, uint32_t passed) { } Optional PrologueTranslator::getCached() { - if (UNLIKELY(RuntimeOption::EvalFailJitPrologs)) { + if (UNLIKELY(Cfg::Eval::FailJitPrologs)) { return TranslationResult::failTransiently(); } diff --git a/hphp/runtime/vm/runtime-compiler.cpp b/hphp/runtime/vm/runtime-compiler.cpp index 64984b2b5cac3..5a989183bedce 100644 --- a/hphp/runtime/vm/runtime-compiler.cpp +++ b/hphp/runtime/vm/runtime-compiler.cpp @@ -296,7 +296,7 @@ std::unique_ptr compile_systemlib_string_to_ue( CodeSource::Systemlib, fname, extension, - RuntimeOption::EvalEnableDecl ? &empty_map : nullptr, + Cfg::Eval::EnableDecl ? &empty_map : nullptr, nullptr, true, false diff --git a/hphp/runtime/vm/runtime.cpp b/hphp/runtime/vm/runtime.cpp index b1eac03b49cfc..430a8e6947606 100644 --- a/hphp/runtime/vm/runtime.cpp +++ b/hphp/runtime/vm/runtime.cpp @@ -26,11 +26,13 @@ #include "hphp/runtime/ext/core/ext_core_closure.h" #include "hphp/runtime/ext/generator/ext_generator.h" #include "hphp/runtime/vm/bytecode.h" +#include "hphp/runtime/vm/jit/translator-inline.h" +#include "hphp/runtime/ext/string/ext_string.h" + +#include "hphp/util/configs/eval.h" #include "hphp/util/conv-10.h" #include "hphp/util/trace.h" #include "hphp/util/text-util.h" -#include "hphp/runtime/vm/jit/translator-inline.h" -#include "hphp/runtime/ext/string/ext_string.h" #include #include @@ -320,7 +322,7 @@ void throwMissingArgument(const Func* func, int got) { void raiseTooManyArguments(const Func* func, int got) { assertx(!func->hasVariadicCaptureParam()); - if (!RuntimeOption::EvalWarnOnTooManyArguments && !func->isCPPBuiltin()) { + if (!Cfg::Eval::WarnOnTooManyArguments && !func->isCPPBuiltin()) { return; } @@ -329,7 +331,7 @@ void raiseTooManyArguments(const Func* func, int got) { auto const amount = func->numRequiredParams() < total ? "at most" : "exactly"; auto const errMsg = formatArgumentErrMsg(func, amount, total, got); - if (RuntimeOption::EvalWarnOnTooManyArguments > 1 || func->isCPPBuiltin()) { + if (Cfg::Eval::WarnOnTooManyArguments > 1 || func->isCPPBuiltin()) { SystemLib::throwRuntimeExceptionObject(Variant(errMsg)); } else { raise_warning(errMsg); diff --git a/hphp/runtime/vm/type-profile.cpp b/hphp/runtime/vm/type-profile.cpp index 774c5f8600f01..9ee25953081a6 100644 --- a/hphp/runtime/vm/type-profile.cpp +++ b/hphp/runtime/vm/type-profile.cpp @@ -81,8 +81,8 @@ void profileRequestStart() { rl_typeProfileLocals->requestKind = getRequestKind(); auto const codeCoverageForceInterp = []{ - if (RuntimeOption::EvalEnableCodeCoverage > 1) return true; - if (RuntimeOption::EvalEnableCodeCoverage == 1) { + if (Cfg::Eval::EnableCodeCoverage > 1) return true; + if (Cfg::Eval::EnableCodeCoverage == 1) { if (RuntimeOption::RepoAuthoritative) return false; return isEnableCodeCoverageReqParamTrue(); } @@ -91,8 +91,8 @@ void profileRequestStart() { auto const shouldUsePerFileCoverage = []{ if (RO::RepoAuthoritative) return false; - if (RO::EvalEnablePerFileCoverage > 1) return true; - return RO::EvalEnablePerFileCoverage == 1 && + if (Cfg::Eval::EnablePerFileCoverage > 1) return true; + return Cfg::Eval::EnablePerFileCoverage == 1 && isEnablePerFileCoverageReqParamTrue(); }(); diff --git a/hphp/runtime/vm/unit-emitter.cpp b/hphp/runtime/vm/unit-emitter.cpp index bc73d5672b94e..b0d6b34105554 100644 --- a/hphp/runtime/vm/unit-emitter.cpp +++ b/hphp/runtime/vm/unit-emitter.cpp @@ -49,6 +49,7 @@ #include "hphp/util/alloc.h" #include "hphp/util/blob-encoder.h" #include "hphp/util/configs/debugger.h" +#include "hphp/util/configs/eval.h" #include "hphp/util/logger.h" #include "hphp/util/read-only-arena.h" #include "hphp/util/sha1.h" @@ -503,10 +504,10 @@ Id UnitEmitter::addModule(const Module& m) { void UnitEmitter::logDeclInfo() const { if ((m_errorSyms.empty() && m_missingSyms.empty()) || - !StructuredLog::coinflip(RO::EvalLogDeclErrors)) return; + !StructuredLog::coinflip(Cfg::Eval::LogDeclErrors)) return; StructuredLogEntry ent; - ent.setInt("sample_rate", RO::EvalLogDeclErrors); + ent.setInt("sample_rate", Cfg::Eval::LogDeclErrors); ent.setInt("num_deps", m_deps.size()); std::vector errors; diff --git a/hphp/runtime/vm/unit-parser.cpp b/hphp/runtime/vm/unit-parser.cpp index de89060d1a228..94e27d21ee86b 100644 --- a/hphp/runtime/vm/unit-parser.cpp +++ b/hphp/runtime/vm/unit-parser.cpp @@ -136,7 +136,7 @@ CompilerResult hackc_compile( options.initAliasedNamespaces(native_env); options.initHhbcFlags(native_env.hhbc_flags); options.initParserFlags(native_env.parser_flags); - if (RO::EvalHackCompilerInheritConfig) { + if (Cfg::Eval::HackCompilerInheritConfig) { for (auto& [k, v] : RO::IncludeRoots) { native_env.include_roots.emplace_back(hackc::StringMapEntry{k, v}); } diff --git a/hphp/runtime/vm/unit.cpp b/hphp/runtime/vm/unit.cpp index 2ca60f8fb1649..6df739d7ff945 100644 --- a/hphp/runtime/vm/unit.cpp +++ b/hphp/runtime/vm/unit.cpp @@ -209,7 +209,7 @@ bool Unit::isCoverageEnabled() const { } void Unit::enableCoverage() { if (!m_coverage.bound()) { - assertx(!RO::RepoAuthoritative && RO::EvalEnablePerFileCoverage); + assertx(!RO::RepoAuthoritative && Cfg::Eval::EnablePerFileCoverage); m_coverage.bind( rds::Mode::Normal, rds::LinkName{"UnitCoverage", origFilepath()} @@ -400,7 +400,7 @@ void Unit::initialMerge() { data_map::register_start(this); } - if (!RO::RepoAuthoritative && RO::EvalEnablePerFileCoverage) { + if (!RO::RepoAuthoritative && Cfg::Eval::EnablePerFileCoverage) { m_coverage.bind( rds::Mode::Normal, rds::LinkName{"UnitCoverage", origFilepath()} @@ -441,7 +441,7 @@ void Unit::merge() { } } - if (RO::EvalLogDeclDeps) { + if (Cfg::Eval::LogDeclDeps) { logDeclInfo(); auto const thisPath = filepath(); @@ -520,8 +520,8 @@ void Unit::logTearing(int64_t nsecs) { } void Unit::logDeclInfo() const { - if (!RO::EvalLogAllDeclTearing && - !StructuredLog::coinflip(RO::EvalLogDeclDeps)) return; + if (!Cfg::Eval::LogAllDeclTearing && + !StructuredLog::coinflip(Cfg::Eval::LogDeclDeps)) return; auto const thisPath = filepath(); auto const& options = RepoOptions::forFile(thisPath->data()); @@ -578,12 +578,12 @@ void Unit::logDeclInfo() const { logVec("torn_rdeps", tears); logVec("loaded_rdeps", non_tears); - if ((RO::EvalLogAllDeclTearing && (!rev_tears.empty() || !tears.empty()))) { + if ((Cfg::Eval::LogAllDeclTearing && (!rev_tears.empty() || !tears.empty()))) { ent.setInt("sample_rate", 1); StructuredLog::log("hhvm_decl_logging", ent); - } else if(!RO::EvalLogAllDeclTearing || - StructuredLog::coinflip(RO::EvalLogDeclDeps)) { - ent.setInt("sample_rate", RO::EvalLogDeclDeps); + } else if(!Cfg::Eval::LogAllDeclTearing || + StructuredLog::coinflip(Cfg::Eval::LogDeclDeps)) { + ent.setInt("sample_rate", Cfg::Eval::LogDeclDeps); StructuredLog::log("hhvm_decl_logging", ent); } } diff --git a/hphp/runtime/vm/unit.h b/hphp/runtime/vm/unit.h index 0ff6033838715..30cb19162a088 100644 --- a/hphp/runtime/vm/unit.h +++ b/hphp/runtime/vm/unit.h @@ -323,7 +323,7 @@ struct Unit { /* * Enable or disable the coverage map for this unit. * - * Pre: !RO::RepoAuthoritative && RO::EvalEnablePerFileCoverage + * Pre: !RO::RepoAuthoritative && Cfg::Eval::EnablePerFileCoverage */ void enableCoverage(); void disableCoverage(); @@ -350,7 +350,7 @@ struct Unit { * Return an RDS handle that when initialized indicates that coverage is * enabled for this unit. * - * Pre: !RO::RepoAuthoritative && RO::EvalEnablePerFileCoverage + * Pre: !RO::RepoAuthoritative && Cfg::Eval::EnablePerFileCoverage */ rds::Handle coverageDataHandle() const;