use std::sync::Arc;
use perf_event_open_sys::bindings::perf_event_attr;
use crate::events::util::CachedPmuType;
use crate::{Builder, Counter};
used_in_docs!(Counter);
used_in_docs!(Builder);
pub mod x86;
mod breakpoint;
mod cache;
mod dynamic;
mod hardware;
mod probe;
mod raw;
mod software;
mod tracepoint;
mod util;
pub mod error {
pub use crate::events::dynamic::{DynamicBuilderError, MissingParameterError};
}
pub use self::breakpoint::{Breakpoint, BreakpointAccess};
#[allow(deprecated)]
pub use self::cache::WhichCache;
pub use self::cache::{Cache, CacheId, CacheOp, CacheResult};
pub use self::dynamic::{Dynamic, DynamicBuilder};
pub use self::hardware::Hardware;
pub use self::probe::{KProbe, UProbe};
pub use self::raw::Raw;
pub use self::software::Software;
pub use self::tracepoint::Tracepoint;
pub trait Event: Sized {
fn update_attrs(self, attr: &mut perf_event_attr);
fn update_attrs_with_data(self, attr: &mut perf_event_attr) -> Option<Arc<dyn EventData>> {
self.update_attrs(attr);
None
}
}
pub trait EventData: Send + Sync {}
impl<T: Send + Sync> EventData for T {}