Searched refs:stats_fd (Results 1 – 5 of 5) sorted by relevance
/linux-6.1.9/tools/testing/selftests/kvm/ |
D | kvm_binary_stats_test.c | 23 static void stats_test(int stats_fd) in stats_test() argument 37 read_stats_header(stats_fd, &header); in stats_test() 45 ret = read(stats_fd, id, header.name_size); in stats_test() 71 stats_desc = read_stats_descriptors(stats_fd, &header); in stats_test() 163 ret = pread(stats_fd, stats_data, size_data, header.data_offset); in stats_test() 168 read_stat_data(stats_fd, &header, pdesc, stats_data, in stats_test() 180 int stats_fd = vm_get_stats_fd(vm); in vm_stats_test() local 182 stats_test(stats_fd); in vm_stats_test() 183 close(stats_fd); in vm_stats_test() 184 TEST_ASSERT(fcntl(stats_fd, F_GETFD) == -1, "Stats fd not freed"); in vm_stats_test() [all …]
|
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/ |
D | prog_run_opts.c | 26 int err, stats_fd = -1, prog_fd; in test_prog_run_opts() local 38 stats_fd = bpf_enable_stats(BPF_STATS_RUN_TIME); in test_prog_run_opts() 39 if (!ASSERT_GE(stats_fd, 0, "enable_stats good fd")) in test_prog_run_opts() 75 if (stats_fd >= 0) in test_prog_run_opts() 76 close(stats_fd); in test_prog_run_opts()
|
D | enable_stats.c | 8 int stats_fd, err, prog_fd; in test_enable_stats() local 17 stats_fd = bpf_enable_stats(BPF_STATS_RUN_TIME); in test_enable_stats() 18 if (CHECK(stats_fd < 0, "get_stats_fd", "failed %d\n", errno)) { in test_enable_stats() 44 close(stats_fd); in test_enable_stats()
|
/linux-6.1.9/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 606 if (vmp->stats_fd) { in kvm_vm_free() 608 close(vmp->stats_fd); in kvm_vm_free() 1930 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, in read_stats_descriptors() argument 1942 ret = pread(stats_fd, stats_desc, total_size, header->desc_offset); in read_stats_descriptors() 1962 void read_stat_data(int stats_fd, struct kvm_stats_header *header, in read_stat_data() argument 1973 ret = pread(stats_fd, data, size, in read_stat_data() 2003 if (!vm->stats_fd) { in __vm_get_stat() 2004 vm->stats_fd = vm_get_stats_fd(vm); in __vm_get_stat() 2005 read_stats_header(vm->stats_fd, &vm->stats_header); in __vm_get_stat() 2006 vm->stats_desc = read_stats_descriptors(vm->stats_fd, in __vm_get_stat() [all …]
|
/linux-6.1.9/tools/testing/selftests/kvm/include/ |
D | kvm_util_base.h | 92 int stats_fd; member 323 static inline void read_stats_header(int stats_fd, struct kvm_stats_header *header) in read_stats_header() argument 327 ret = read(stats_fd, header, sizeof(*header)); in read_stats_header() 331 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, 356 void read_stat_data(int stats_fd, struct kvm_stats_header *header,
|