diff --git a/src/PerfCounters_x86.h b/src/PerfCounters_x86.h index 76c35d67cc9..da2e2cdd586 100644 --- a/src/PerfCounters_x86.h +++ b/src/PerfCounters_x86.h @@ -344,10 +344,12 @@ static void check_for_zen_speclockmap() { LOG(debug) << "SpecLockMap is disabled"; } else { LOG(debug) << "SpecLockMap is not disabled"; - fprintf(stderr, - "On Zen CPUs, rr will not work reliably unless you disable the " - "hardware SpecLockMap optimization.\nFor instructions on how to " - "do this, see https://github.com/rr-debugger/rr/wiki/Zen\n"); + if (!Flags::get().suppress_environment_warnings) { + fprintf(stderr, + "On Zen CPUs, rr will not work reliably unless you disable the " + "hardware SpecLockMap optimization.\nFor instructions on how to " + "do this, see https://github.com/rr-debugger/rr/wiki/Zen\n"); + } } } }