diff --git a/hphp/runtime/base/runtime_option.cpp b/hphp/runtime/base/runtime_option.cpp index 07f4a81e9..c51bfa337 100644 --- a/hphp/runtime/base/runtime_option.cpp +++ b/hphp/runtime/base/runtime_option.cpp @@ -398,6 +398,19 @@ static inline bool evalJitDefault() { return stat(path, &dummy) == 0; } +static inline std::string regionSelectorDefault() { +#ifdef HHVM_REGION_SELECTOR_TRACELET + return "tracelet"; +#else +#ifdef HHVM_REGION_SELECTOR_LEGACY + return "legacy"; +#else + return ""; +#endif +#endif +} + + const uint64_t kEvalVMStackElmsDefault = #ifdef VALGRIND 0x800 diff --git a/hphp/runtime/base/runtime_option.h b/hphp/runtime/base/runtime_option.h index 7b9d9a22a..1292c14a7 100644 --- a/hphp/runtime/base/runtime_option.h +++ b/hphp/runtime/base/runtime_option.h @@ -444,7 +444,7 @@ public: F(bool, HHIRDeadCodeElim, true) \ F(bool, HHIRPredictionOpts, true) \ F(bool, HHIRStressCodegenBlocks, false) \ - F(string, JitRegionSelector, "") \ + F(string, JitRegionSelector, regionSelectorDefault()) \ /* DumpBytecode =1 dumps user php, =2 dumps systemlib & user php */ \ F(int32_t, DumpBytecode, 0) \ F(bool, DumpTC, false) \