background_hang_monitor/
lib.rs1#![deny(unsafe_code)]
6
7pub mod background_hang_monitor;
8mod sampler;
9#[cfg(all(
10 feature = "sampler",
11 target_os = "linux",
12 not(any(
13 target_arch = "arm",
14 target_arch = "aarch64",
15 target_env = "ohos",
16 target_env = "musl"
17 ))
18))]
19mod sampler_linux;
20#[cfg(all(feature = "sampler", target_os = "android"))]
21mod sampler_linux;
22#[cfg(all(feature = "sampler", target_os = "macos"))]
23mod sampler_mac;
24#[cfg(all(feature = "sampler", target_os = "windows"))]
25mod sampler_windows;
26
27pub use self::background_hang_monitor::*;
28#[cfg(any(
29 not(feature = "sampler"),
30 all(
31 target_os = "linux",
32 any(
33 target_arch = "arm",
34 target_arch = "aarch64",
35 target_env = "ohos",
36 target_env = "musl"
37 )
38 ),
39 all(target_os = "windows", target_arch = "aarch64"),
40))]
41pub(crate) use crate::sampler::DummySampler as SamplerImpl;
42#[cfg(all(
43 feature = "sampler",
44 target_os = "linux",
45 not(any(
46 target_arch = "arm",
47 target_arch = "aarch64",
48 target_env = "ohos",
49 target_env = "musl"
50 ))
51))]
52pub(crate) use crate::sampler_linux::LinuxSampler as SamplerImpl;
53#[cfg(all(feature = "sampler", target_os = "android"))]
54pub(crate) use crate::sampler_linux::LinuxSampler as SamplerImpl;
55#[cfg(all(feature = "sampler", target_os = "macos"))]
56pub(crate) use crate::sampler_mac::MacOsSampler as SamplerImpl;
57#[cfg(all(
58 feature = "sampler",
59 target_os = "windows",
60 any(target_arch = "x86_64", target_arch = "x86")
61))]
62pub(crate) use crate::sampler_windows::WindowsSampler as SamplerImpl;