Searched refs:stats_fd (Results 1 – 6 of 6) sorted by relevance
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A 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()
|
H A 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()
|
/openbmc/linux/tools/testing/selftests/kvm/ |
H A D | kvm_binary_stats_test.c | 24 static void stats_test(int stats_fd) in stats_test() argument 38 read_stats_header(stats_fd, &header); in stats_test() 46 ret = pread(stats_fd, id, header.name_size, sizeof(header)); in stats_test() 74 stats_desc = read_stats_descriptors(stats_fd, &header); in stats_test() 158 ret = pread(stats_fd, stats_data, size_data, header.data_offset); in stats_test() 163 read_stat_data(stats_fd, &header, pdesc, stats_data, in stats_test() 171 close(stats_fd); in stats_test() 172 TEST_ASSERT(fcntl(stats_fd, F_GETFD) == -1, "Stats fd not freed"); in stats_test()
|
/openbmc/qemu/accel/kvm/ |
H A D | kvm-all.c | 4155 ret = pread(stats_fd, kvm_stats_desc, in find_stats_descriptors() 4272 int stats_fd = cpu->kvm_vcpu_stats_fd; in query_stats_vcpu() local 4275 if (stats_fd == -1) { in query_stats_vcpu() 4287 int stats_fd = cpu->kvm_vcpu_stats_fd; in query_stats_schema_vcpu() local 4290 if (stats_fd == -1) { in query_stats_schema_vcpu() 4304 int stats_fd; in query_stats_cb() local 4310 if (stats_fd == -1) { in query_stats_cb() 4315 close(stats_fd); in query_stats_cb() 4341 int stats_fd; in query_stats_schemas_cb() local 4344 if (stats_fd == -1) { in query_stats_schemas_cb() [all …]
|
/openbmc/linux/tools/testing/selftests/kvm/lib/ |
H A D | kvm_util.c | 717 if (vmp->stats_fd) { in kvm_vm_free() 719 close(vmp->stats_fd); in kvm_vm_free() 2069 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, in read_stats_descriptors() argument 2081 ret = pread(stats_fd, stats_desc, total_size, header->desc_offset); in read_stats_descriptors() 2101 void read_stat_data(int stats_fd, struct kvm_stats_header *header, in read_stat_data() argument 2112 ret = pread(stats_fd, data, size, in read_stat_data() 2142 if (!vm->stats_fd) { in __vm_get_stat() 2143 vm->stats_fd = vm_get_stats_fd(vm); in __vm_get_stat() 2144 read_stats_header(vm->stats_fd, &vm->stats_header); in __vm_get_stat() 2145 vm->stats_desc = read_stats_descriptors(vm->stats_fd, in __vm_get_stat() [all …]
|
/openbmc/linux/tools/testing/selftests/kvm/include/ |
H A D | kvm_util_base.h | 116 int stats_fd; member 382 static inline void read_stats_header(int stats_fd, struct kvm_stats_header *header) in read_stats_header() argument 386 ret = pread(stats_fd, header, sizeof(*header), 0); in read_stats_header() 392 struct kvm_stats_desc *read_stats_descriptors(int stats_fd, 417 void read_stat_data(int stats_fd, struct kvm_stats_header *header,
|