Home
last modified time | relevance | path

Searched refs:pmu_fd (Results 1 – 5 of 5) sorted by relevance

/external/linux-kselftest/tools/testing/selftests/bpf/prog_tests/
Dtp_attach_query.c7 int i, j, bytes, efd, err, prog_fd[num_progs], pmu_fd[num_progs]; in test_tp_attach_query() local
54 pmu_fd[i] = syscall(__NR_perf_event_open, &attr, -1 /* pid */, in test_tp_attach_query()
57 if (CHECK(pmu_fd[i] < 0, "perf_event_open", "err %d errno %d\n", in test_tp_attach_query()
58 pmu_fd[i], errno)) in test_tp_attach_query()
60 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_ENABLE, 0); in test_tp_attach_query()
68 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
76 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_SET_BPF, prog_fd[i]); in test_tp_attach_query()
84 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
93 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, in test_tp_attach_query()
102 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
[all …]
Dsend_signal.c15 int err = -1, pmu_fd, prog_fd, info_map_fd, status_map_fd; in test_send_signal_common() local
81 pmu_fd = syscall(__NR_perf_event_open, attr, pid, -1, in test_send_signal_common()
83 if (CHECK(pmu_fd < 0, test_name, "perf_event_open error: %s\n", in test_send_signal_common()
89 err = ioctl(pmu_fd, PERF_EVENT_IOC_ENABLE, 0); in test_send_signal_common()
94 err = ioctl(pmu_fd, PERF_EVENT_IOC_SET_BPF, prog_fd); in test_send_signal_common()
134 close(pmu_fd); in test_send_signal_common()
194 int pmu_fd; in test_send_signal_nmi() local
199 pmu_fd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, in test_send_signal_nmi()
201 if (pmu_fd == -1) { in test_send_signal_nmi()
210 close(pmu_fd); in test_send_signal_nmi()
Dtask_fd_query_tp.c8 int err, bytes, efd, prog_fd, pmu_fd; in test_task_fd_query_tp_core() local
36 pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, in test_task_fd_query_tp_core()
42 err = ioctl(pmu_fd, PERF_EVENT_IOC_ENABLE, 0); in test_task_fd_query_tp_core()
47 err = ioctl(pmu_fd, PERF_EVENT_IOC_SET_BPF, prog_fd); in test_task_fd_query_tp_core()
54 err = bpf_task_fd_query(getpid(), pmu_fd, 0, buf, &len, &prog_id, in test_task_fd_query_tp_core()
66 close(pmu_fd); in test_task_fd_query_tp_core()
Dstacktrace_build_id_nmi.c22 int err, pmu_fd, prog_fd; in test_stacktrace_build_id_nmi() local
49 pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, in test_stacktrace_build_id_nmi()
52 if (CHECK(pmu_fd < 0, "perf_event_open", in test_stacktrace_build_id_nmi()
54 pmu_fd, errno)) in test_stacktrace_build_id_nmi()
57 link = bpf_program__attach_perf_event(prog, pmu_fd); in test_stacktrace_build_id_nmi()
60 close(pmu_fd); in test_stacktrace_build_id_nmi()
/external/linux-kselftest/tools/testing/selftests/bpf/
Dget_cgroup_id_user.c52 int err, bytes, efd, prog_fd, pmu_fd; in main() local
112 pmu_fd = syscall(__NR_perf_event_open, &attr, getpid(), -1, -1, 0); in main()
113 if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n", pmu_fd, in main()
117 err = ioctl(pmu_fd, PERF_EVENT_IOC_ENABLE, 0); in main()
122 err = ioctl(pmu_fd, PERF_EVENT_IOC_SET_BPF, prog_fd); in main()
143 close(pmu_fd); in main()