diff --git a/ircd/prof.cc b/ircd/prof.cc index 3a6a30ca9..755169db6 100644 --- a/ircd/prof.cc +++ b/ircd/prof.cc @@ -22,6 +22,15 @@ ircd::prof::log "prof" }; +#ifndef __linux__ +[[gnu::weak]] +decltype(ircd::prof::psi::supported) +ircd::prof::psi::supported +{ + false +}; +#endif + uint64_t ircd::prof::time_real() noexcept diff --git a/modules/console.cc b/modules/console.cc index d1bd71b19..aa799223f 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -1229,6 +1229,12 @@ console_cmd__vg(opt &out, const string_view &line) bool console_cmd__prof__psi(opt &out, const string_view &line) { + if(!prof::psi::supported) + throw error + { + "Pressure Still Information is not supported." + }; + const auto show_file{[&out] (const string_view &name, prof::psi::file &file) {