Lines Matching refs:bpf
56 ebpf::BPF bpf; variable
58 res = bpf.init(
63 bpf.open_perf_event("cnt", PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK);
65 std::string getuid_fnname = bpf.get_syscall_fnname("getuid");
66 res = bpf.attach_kprobe(getuid_fnname, "on_sys_getuid");
69 res = bpf.detach_kprobe(getuid_fnname);
71 res = bpf.close_perf_event("cnt");
74 auto val = bpf.get_hash_table<int, uint64_t>("val");
80 bpf.get_hash_table<int, struct bpf_perf_event_value>("counter");
82 auto ret = bpf.get_hash_table<int, int>("ret");
113 ebpf::BPF bpf; variable
115 res = bpf.init(BPF_PROGRAM);
117 res = bpf.attach_perf_event(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK,
121 res = bpf.detach_perf_event(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK);
124 auto pid = bpf.get_hash_table<int, uint64_t>("pid");
130 bpf.get_hash_table<int, struct bpf_perf_event_value>("counter");
132 auto ret = bpf.get_hash_table<int, int>("ret");