Lines Matching refs:kprobe
1 use crate::debug::kprobe::args::KprobeInfo;
7 use kprobe::{Kprobe, KprobeBuilder, KprobeOps, KprobePoint};
37 pub fn insert_kprobe(&mut self, kprobe: LockKprobe) { in insert_kprobe()
38 let probe_point = kprobe.read().probe_point().clone(); in insert_kprobe()
39 self.insert_break_point(probe_point.break_address(), kprobe.clone()); in insert_kprobe()
40 self.insert_debug_point(probe_point.debug_address(), kprobe); in insert_kprobe()
48 fn insert_break_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_break_point()
50 list.push(kprobe); in insert_break_point()
58 fn insert_debug_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_debug_point()
60 list.push(kprobe); in insert_debug_point()
98 pub fn remove_kprobe(&mut self, kprobe: &LockKprobe) { in remove_kprobe()
99 let probe_point = kprobe.read().probe_point().clone(); in remove_kprobe()
100 self.remove_one_break(probe_point.break_address(), kprobe); in remove_kprobe()
101 self.remove_one_debug(probe_point.debug_address(), kprobe); in remove_kprobe()
111 fn remove_one_break(&mut self, address: usize, kprobe: &LockKprobe) { in remove_one_break()
113 list.retain(|x| !Arc::ptr_eq(x, kprobe)); in remove_one_break()
127 fn remove_one_debug(&mut self, address: usize, kprobe: &LockKprobe) { in remove_one_debug()
129 list.retain(|x| !Arc::ptr_eq(x, kprobe)); in remove_one_debug()
154 let kprobe = match existed_point { in register_kprobe() localVariable
162 let (kprobe, probe_point) = kprobe_builder.install(); in register_kprobe()
164 kprobe in register_kprobe()
167 let kprobe = Arc::new(RwLock::new(kprobe)); in register_kprobe() localVariable
168 KPROBE_MANAGER.lock().insert_kprobe(kprobe.clone()); in register_kprobe()
169 Ok(kprobe) in register_kprobe()
176 pub fn unregister_kprobe(kprobe: LockKprobe) { in unregister_kprobe()
177 let kprobe_addr = kprobe.read().probe_point().break_address(); in unregister_kprobe()
178 KPROBE_MANAGER.lock().remove_kprobe(&kprobe); in unregister_kprobe()