Lines Matching refs:event
567 return perf_event_read_local(ee->event, value, enabled, running); in get_map_perf_counter()
628 struct perf_event *event; in __bpf_perf_event_output() local
639 event = ee->event; in __bpf_perf_event_output()
640 if (unlikely(event->attr.type != PERF_TYPE_SOFTWARE || in __bpf_perf_event_output()
641 event->attr.config != PERF_COUNT_SW_BPF_OUTPUT)) in __bpf_perf_event_output()
644 if (unlikely(event->oncpu != cpu)) in __bpf_perf_event_output()
647 return perf_event_output(event, sd, regs); in __bpf_perf_event_output()
1126 return ctx->event->bpf_cookie; in BPF_CALL_1()
1701 err = perf_event_read_local(ctx->event, &buf->counter, &buf->enabled, in BPF_CALL_3()
2125 int perf_event_attach_bpf_prog(struct perf_event *event, in perf_event_attach_bpf_prog() argument
2138 (!trace_kprobe_on_func_entry(event->tp_event) || in perf_event_attach_bpf_prog()
2139 !trace_kprobe_error_injectable(event->tp_event))) in perf_event_attach_bpf_prog()
2144 if (event->prog) in perf_event_attach_bpf_prog()
2147 old_array = bpf_event_rcu_dereference(event->tp_event->prog_array); in perf_event_attach_bpf_prog()
2159 event->prog = prog; in perf_event_attach_bpf_prog()
2160 event->bpf_cookie = bpf_cookie; in perf_event_attach_bpf_prog()
2161 rcu_assign_pointer(event->tp_event->prog_array, new_array); in perf_event_attach_bpf_prog()
2169 void perf_event_detach_bpf_prog(struct perf_event *event) in perf_event_detach_bpf_prog() argument
2177 if (!event->prog) in perf_event_detach_bpf_prog()
2180 old_array = bpf_event_rcu_dereference(event->tp_event->prog_array); in perf_event_detach_bpf_prog()
2181 ret = bpf_prog_array_copy(old_array, event->prog, NULL, 0, &new_array); in perf_event_detach_bpf_prog()
2185 bpf_prog_array_delete_safe(old_array, event->prog); in perf_event_detach_bpf_prog()
2187 rcu_assign_pointer(event->tp_event->prog_array, new_array); in perf_event_detach_bpf_prog()
2191 bpf_prog_put(event->prog); in perf_event_detach_bpf_prog()
2192 event->prog = NULL; in perf_event_detach_bpf_prog()
2198 int perf_event_query_prog_array(struct perf_event *event, void __user *info) in perf_event_query_prog_array() argument
2208 if (event->attr.type != PERF_TYPE_TRACEPOINT) in perf_event_query_prog_array()
2227 progs = bpf_event_rcu_dereference(event->tp_event->prog_array); in perf_event_query_prog_array()
2352 int bpf_get_perf_event_info(const struct perf_event *event, u32 *prog_id, in bpf_get_perf_event_info() argument
2360 prog = event->prog; in bpf_get_perf_event_info()
2369 flags = event->tp_event->flags; in bpf_get_perf_event_info()
2371 is_syscall_tp = is_syscall_trace_event(event->tp_event); in bpf_get_perf_event_info()
2374 *buf = is_tracepoint ? event->tp_event->tp->name in bpf_get_perf_event_info()
2375 : event->tp_event->name; in bpf_get_perf_event_info()
2384 err = bpf_get_kprobe_info(event, fd_type, buf, in bpf_get_perf_event_info()
2386 event->attr.type == PERF_TYPE_TRACEPOINT); in bpf_get_perf_event_info()
2390 err = bpf_get_uprobe_info(event, fd_type, buf, in bpf_get_perf_event_info()
2392 event->attr.type == PERF_TYPE_TRACEPOINT); in bpf_get_perf_event_info()