Fix macOS's sameple isn't used in background_hang_monitor (#30490)

This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2023-10-04 15:59:45 +09:00 committed by GitHub
parent 1552a77e5c
commit a31e2ea576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,10 @@ impl BackgroundHangMonitorRegister for HangMonitorRegister {
not(any(target_arch = "arm", target_arch = "aarch64"))
))]
let sampler = crate::sampler_linux::LinuxSampler::new();
#[cfg(any(target_os = "android", target_arch = "arm", target_arch = "aarch64"))]
#[cfg(all(
any(target_os = "android", target_os = "linux"),
any(target_arch = "arm", target_arch = "aarch64")
))]
let sampler = crate::sampler::DummySampler::new();
// When a component is registered, and there's an exit request that