JitRegister: Fix IsEnabled when using VTune without perf

Set `s_is_enabled` to `true` in `Init` when `USE_VTUNE` is defined so
that `IsEnabled` returns true even if perf isn't being used.
This commit is contained in:
Dentomologist 2026-01-18 14:23:58 -08:00
parent 710905138c
commit 935f537a80

View File

@ -34,6 +34,10 @@ static bool s_is_enabled = false;
void Init(const std::string& perf_dir)
{
#ifdef USE_VTUNE
s_is_enabled = true;
#endif
if (!perf_dir.empty() || getenv("PERF_BUILDID_DIR"))
{
const std::string dir = perf_dir.empty() ? "/tmp" : perf_dir;