Lines Matching refs:StatusTuple
58 StatusTuple BPF::init(const std::string& bpf_program, in init()
79 return StatusTuple(-1, "Unable to initialize BPF program"); in init()
81 return StatusTuple(0); in init()
91 StatusTuple BPF::detach_all() { in detach_all()
160 return StatusTuple(-1, error_msg); in detach_all()
162 return StatusTuple(0); in detach_all()
165 StatusTuple BPF::attach_kprobe(const std::string& kernel_func, in attach_kprobe()
171 return StatusTuple(-1, "kprobe %s already attached", probe_event.c_str()); in attach_kprobe()
181 return StatusTuple(-1, "Unable to attach %skprobe for %s using %s", in attach_kprobe()
190 return StatusTuple(0); in attach_kprobe()
193 StatusTuple BPF::attach_uprobe(const std::string& binary_path, in attach_uprobe()
204 return StatusTuple(-1, "uprobe %s already attached", probe_event.c_str()); in attach_uprobe()
214 return StatusTuple( in attach_uprobe()
225 return StatusTuple(0); in attach_uprobe()
228 StatusTuple BPF::attach_usdt(const USDT& usdt, pid_t pid) { in attach_usdt()
233 return StatusTuple(-1, "Unable to enable USDT " + u.print_name()); in attach_usdt()
258 return StatusTuple(-1, err_msg); in attach_usdt()
260 return StatusTuple(0); in attach_usdt()
265 return StatusTuple(-1, "USDT %s not found", usdt.print_name().c_str()); in attach_usdt()
268 StatusTuple BPF::attach_tracepoint(const std::string& tracepoint, in attach_tracepoint()
271 return StatusTuple(-1, "Tracepoint %s already attached", in attach_tracepoint()
276 return StatusTuple(-1, "Unable to parse Tracepoint %s", tracepoint.c_str()); in attach_tracepoint()
288 return StatusTuple(-1, "Unable to attach Tracepoint %s using %s", in attach_tracepoint()
296 return StatusTuple(0); in attach_tracepoint()
299 StatusTuple BPF::attach_perf_event(uint32_t ev_type, uint32_t ev_config, in attach_perf_event()
305 return StatusTuple(-1, "Perf event type %d config %d already attached", in attach_perf_event()
326 return StatusTuple(-1, "Failed to attach perf event type %d config %d", in attach_perf_event()
336 return StatusTuple(0); in attach_perf_event()
339 StatusTuple BPF::attach_perf_event_raw(void* perf_event_attr, in attach_perf_event_raw()
346 return StatusTuple(-1, "Perf event type %d config %d already attached", in attach_perf_event_raw()
367 return StatusTuple(-1, "Failed to attach perf event type %d config %d", in attach_perf_event_raw()
377 return StatusTuple(0); in attach_perf_event_raw()
380 StatusTuple BPF::detach_kprobe(const std::string& kernel_func, in detach_kprobe()
386 return StatusTuple(-1, "No open %skprobe for %s", in detach_kprobe()
392 return StatusTuple(0); in detach_kprobe()
395 StatusTuple BPF::detach_uprobe(const std::string& binary_path, in detach_uprobe()
405 return StatusTuple(-1, "No open %suprobe for binary %s symbol %s addr %lx", in detach_uprobe()
411 return StatusTuple(0); in detach_uprobe()
414 StatusTuple BPF::detach_usdt(const USDT& usdt, pid_t pid) { in detach_usdt()
437 return StatusTuple(-1, err_msg); in detach_usdt()
439 return StatusTuple(0); in detach_usdt()
443 return StatusTuple(-1, "USDT %s not found", usdt.print_name().c_str()); in detach_usdt()
446 StatusTuple BPF::detach_tracepoint(const std::string& tracepoint) { in detach_tracepoint()
449 return StatusTuple(-1, "No open Tracepoint %s", tracepoint.c_str()); in detach_tracepoint()
453 return StatusTuple(0); in detach_tracepoint()
456 StatusTuple BPF::detach_perf_event(uint32_t ev_type, uint32_t ev_config) { in detach_perf_event()
459 return StatusTuple(-1, "Perf Event type %d config %d not attached", ev_type, in detach_perf_event()
463 return StatusTuple(0); in detach_perf_event()
466 StatusTuple BPF::detach_perf_event_raw(void* perf_event_attr) { in detach_perf_event_raw()
471 StatusTuple BPF::open_perf_event(const std::string& name, uint32_t type, in open_perf_event()
476 return StatusTuple(-1, "open_perf_event: unable to find table_storage %s", in open_perf_event()
482 return StatusTuple(0); in open_perf_event()
485 StatusTuple BPF::close_perf_event(const std::string& name) { in close_perf_event()
488 return StatusTuple(-1, "Perf Event for %s not open", name.c_str()); in close_perf_event()
490 return StatusTuple(0); in close_perf_event()
493 StatusTuple BPF::open_perf_buffer(const std::string& name, in open_perf_buffer()
500 return StatusTuple(-1, in open_perf_buffer()
506 return StatusTuple(-1, "open_perf_buffer page_cnt must be a power of two"); in open_perf_buffer()
509 return StatusTuple(0); in open_perf_buffer()
512 StatusTuple BPF::close_perf_buffer(const std::string& name) { in close_perf_buffer()
515 return StatusTuple(-1, "Perf buffer for %s not open", name.c_str()); in close_perf_buffer()
517 return StatusTuple(0); in close_perf_buffer()
532 StatusTuple BPF::load_func(const std::string& func_name, bpf_prog_type type, in load_func()
536 return StatusTuple(0); in load_func()
541 return StatusTuple(-1, "Can't find start of function %s", in load_func()
557 return StatusTuple(-1, "Failed to load %s: %d", func_name.c_str(), fd); in load_func()
562 return StatusTuple(0); in load_func()
565 StatusTuple BPF::unload_func(const std::string& func_name) { in unload_func()
568 return StatusTuple(0); in unload_func()
572 return StatusTuple(-1, "Can't close FD for %s: %d", it->first.c_str(), res); in unload_func()
575 return StatusTuple(0); in unload_func()
594 StatusTuple BPF::check_binary_symbol(const std::string& binary_path, in check_binary_symbol()
603 return StatusTuple( in check_binary_symbol()
614 return StatusTuple(0); in check_binary_symbol()
664 StatusTuple BPF::detach_kprobe_event(const std::string& event, in detach_kprobe_event()
669 return StatusTuple(-1, "Unable to detach kprobe %s", event.c_str()); in detach_kprobe_event()
670 return StatusTuple(0); in detach_kprobe_event()
673 StatusTuple BPF::detach_uprobe_event(const std::string& event, in detach_uprobe_event()
678 return StatusTuple(-1, "Unable to detach uprobe %s", event.c_str()); in detach_uprobe_event()
679 return StatusTuple(0); in detach_uprobe_event()
682 StatusTuple BPF::detach_tracepoint_event(const std::string& tracepoint, in detach_tracepoint_event()
688 return StatusTuple(0); in detach_tracepoint_event()
691 StatusTuple BPF::detach_perf_event_all_cpu(open_probe_t& attr) { in detach_perf_event_all_cpu()
707 return StatusTuple(-1, err_msg); in detach_perf_event_all_cpu()
708 return StatusTuple(0); in detach_perf_event_all_cpu()
769 StatusTuple USDT::init() { in init()
778 return StatusTuple(-1, "No valid Binary Path or PID provided"); in init()
781 return StatusTuple(-1, "Unable to load USDT " + print_name()); in init()
796 return StatusTuple(-1, "Unable to find USDT " + print_name()); in init()
802 return StatusTuple( in init()
807 return StatusTuple(0); in init()