use super::OnItem; use anyhow::Result; use log::debug; use uprobestats_bpf_bindgen::MalwareSignal; use uprobestats_proto::config::uprobestats_config::Task; // SAFETY: `MalwareSignal` is a struct defined in the given `MAP_PATH`, and is guaranteed to match the // layout of the corresponding C struct. unsafe impl OnItem for MalwareSignal { const MAP_PATH: &'static str = "/sys/fs/bpf/uprobestats/map_MalwareSignal_output_buf"; fn on_item(&self, _task: &Task) -> Result<()> { if self.wm_bound_uid.initialized { debug!("wm_bound_uid: {:?}", self.wm_bound_uid); } if self.component_enabled_setting.initialized { debug!("component_enabled_setting: {:?}", self.component_enabled_setting); } Ok(()) } }