/DragonOS/user/apps/test_ebpf/syscall_ebpf/syscall_ebpf-ebpf/src/ |
H A D | main.rs | 10 pub fn syscall_ebpf(ctx: ProbeContext) -> u32 { in syscall_ebpf() 11 try_syscall_ebpf(ctx).unwrap_or_else(|ret| ret) in syscall_ebpf() 14 fn try_syscall_ebpf(ctx: ProbeContext) -> Result<u32, u32> { in try_syscall_ebpf() 16 &*ctx.regs in try_syscall_ebpf() 32 info!(&ctx, "invoke syscall {}", syscall_num); in try_syscall_ebpf()
|
/DragonOS/kernel/src/arch/riscv64/ |
H A D | cpu.rs | 122 let ctx = PerCpuVar::new(data).unwrap(); in init_local_context() localVariable 125 LOCAL_CONTEXT = Some(ctx); in init_local_context() 130 let ctx = unsafe { local_context().force_get(hartid) }; in init_local_context() localVariable 131 ctx.sync_to_cpu(); in init_local_context()
|
/DragonOS/kernel/src/bpf/map/ |
H A D | lru.rs | 52 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 58 let res = cb(key, value, ctx); in for_each_elem() 133 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 134 self.per_cpu_maps.get_mut().for_each_elem(cb, ctx, flags) in for_each_elem()
|
H A D | hash_map.rs | 54 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 60 let res = cb(key, value, ctx); in for_each_elem() 135 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 136 self.per_cpu_maps.get_mut().for_each_elem(cb, ctx, flags) in for_each_elem()
|
H A D | array_map.rs | 113 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 122 let res = cb(&key, value, ctx); in for_each_elem() 199 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem() 200 self.per_cpu_data.get_mut().for_each_elem(cb, ctx, flags) in for_each_elem() 263 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, _flags: u64) -> Result<u32> { in for_each_elem() 270 let res = cb(&key, value, ctx); in for_each_elem()
|
H A D | mod.rs | 35 pub type BpfCallBackFn = fn(key: &[u8], value: &[u8], ctx: *const u8) -> i32;
|
/DragonOS/kernel/src/bpf/helper/ |
H A D | mod.rs | 49 ctx: *mut c_void, in raw_perf_event_output() 58 let res = perf_event_output(ctx, &map, flags, data); in raw_perf_event_output() 68 ctx: *mut c_void, in perf_event_output() 85 crate::perf::perf_event_output(ctx, fd as usize, flags, data)?; in perf_event_output() 184 ctx: *const c_void, in raw_map_for_each_elem() 189 let res = map_for_each_elem(&map, cb, ctx as _, flags); in raw_map_for_each_elem() 200 ctx: *const u8, in map_for_each_elem() 204 let value = binding.for_each_elem(cb, ctx, flags); in map_for_each_elem()
|
/DragonOS/kernel/src/ |
H A D | lib.rs | 188 fn trace(ctx: &UnwindContext<'_>, arg: *mut Self::Arg) -> UnwindReasonCode { in trace() 191 let pc = _Unwind_GetIP(ctx); in trace()
|
/DragonOS/kernel/crates/rbpf/src/ |
H A D | cranelift.rs | 134 let mut ctx = self.module.make_context(); in compile_function() localVariable 135 ctx.func = Function::with_name_signature(UserFuncName::testcase(name.as_bytes()), sig); in compile_function() 139 let mut builder: FunctionBuilder = FunctionBuilder::new(&mut ctx.func, &mut func_ctx); in compile_function() 153 self.module.define_function(func_id, &mut ctx).unwrap(); in compile_function() 155 self.module.clear_context(&mut ctx); in compile_function()
|