Use cfg!() instead of #[cfg] for most profiling code

This makes it less likely that it breaks again in the future as most
code gets checked by the compiler even when profiling support is not
enabled.
This commit is contained in:
bjorn3
2026-04-12 18:32:50 +02:00
parent 142871660e
commit 38f36d406b
4 changed files with 40 additions and 22 deletions
-1
View File
@@ -198,7 +198,6 @@ pub(crate) fn kmain_ap(cpu_id: crate::cpu_set::LogicalCpuId) -> ! {
hint::spin_loop();
}
#[cfg(feature = "profiling")]
profiling::maybe_run_profiling_helper_forever(cpu_id);
if !cfg!(feature = "multi_core") {