|
38 | 38 | //! ``` |
39 | 39 |
|
40 | 40 | pub mod offline_symbolize; |
41 | | -mod ring_buffer; |
42 | 41 | mod sampler; |
43 | 42 | mod symbolize; |
| 43 | +mod sys; |
44 | 44 | pub mod tracepoint; |
45 | 45 |
|
46 | | -/// Upper bound of userspace virtual addresses. Addresses at or above this limit |
47 | | -/// are kernel addresses. |
48 | | -/// |
49 | | -/// - x86_64: canonical address hole starts at bit 47 |
50 | | -/// - aarch64: TTBR0 (user) vs TTBR1 (kernel) selected by bit 63 |
51 | | -#[cfg(target_arch = "x86_64")] |
52 | | -pub(crate) const USER_ADDR_LIMIT: u64 = 0x0000_8000_0000_0000; |
53 | | -#[cfg(target_arch = "aarch64")] |
54 | | -pub(crate) const USER_ADDR_LIMIT: u64 = 0x8000_0000_0000_0000; |
55 | | -#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))] |
56 | | -compile_error!("perf-self-profile: USER_ADDR_LIMIT not defined for this architecture"); |
57 | | - |
58 | 46 | pub use offline_symbolize::SymbolTableEntry; |
59 | | -pub use sampler::{EventSource, PerfSampler, Sample, SamplerConfig}; |
| 47 | +pub use sampler::{EventSource, Sample, SamplerConfig}; |
60 | 48 | pub use symbolize::{CodeInfo, MapsEntry, SymbolInfo}; |
61 | 49 | pub use symbolize::{parse_proc_maps, read_proc_maps}; |
62 | | -pub use symbolize::{resolve_symbol, resolve_symbol_with_maps, resolve_symbols_with_maps}; |
| 50 | + |
| 51 | +// Platform-dispatched re-exports |
| 52 | +pub use sys::PerfSampler; |
| 53 | +pub use sys::resolve_symbol; |
| 54 | + |
| 55 | +// blazesym-dependent APIs |
| 56 | +#[cfg(target_os = "linux")] |
| 57 | +pub use sys::{resolve_symbol_with_maps, resolve_symbols_with_maps}; |
0 commit comments