Home
last modified time | relevance | path

Searched refs:info (Results 1 – 25 of 216) sorted by relevance

123456789

/tools/testing/selftests/powerpc/ptrace/
Dptrace-pkey.c69 static int child(struct shared_info *info) in child() argument
77 ret = wait_parent(&info->child_sync); in child()
85 CHILD_FAIL_IF(pkey1 < 0, &info->child_sync); in child()
91 CHILD_FAIL_IF(pkey2 < 0, &info->child_sync); in child()
94 CHILD_FAIL_IF(pkey3 < 0, &info->child_sync); in child()
96 info->amr1 |= 3ul << pkeyshift(pkey1); in child()
97 info->amr2 |= 3ul << pkeyshift(pkey2); in child()
102 info->invalid_amr = info->amr2 | (~0x0UL & ~info->expected_uamor); in child()
108 info->expected_iamr |= 1ul << pkeyshift(pkey1); in child()
110 info->expected_iamr &= ~(1ul << pkeyshift(pkey1)); in child()
[all …]
Dcore-pkey.c110 static int child(struct shared_info *info) in child() argument
117 ret = wait_parent(&info->child_sync); in child()
139 info->amr |= 3ul << pkeyshift(pkey1) | 2ul << pkeyshift(pkey2); in child()
142 info->iamr |= 1ul << pkeyshift(pkey1); in child()
144 info->iamr &= ~(1ul << pkeyshift(pkey1)); in child()
146 info->iamr &= ~(1ul << pkeyshift(pkey2) | 1ul << pkeyshift(pkey3)); in child()
148 info->uamor |= 3ul << pkeyshift(pkey1) | 3ul << pkeyshift(pkey2); in child()
151 user_write, info->amr, pkey1, pkey2, pkey3); in child()
153 set_amr(info->amr); in child()
161 info->core_time = time(NULL); in child()
[all …]
Dptrace-hwbreak.c241 static int ptrace_sethwdebug(pid_t child_pid, struct ppc_hw_breakpoint *info) in ptrace_sethwdebug() argument
243 int wh = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, info); in ptrace_sethwdebug()
323 static void get_ppc_hw_breakpoint(struct ppc_hw_breakpoint *info, int type, in get_ppc_hw_breakpoint() argument
326 info->version = 1; in get_ppc_hw_breakpoint()
327 info->trigger_type = type; in get_ppc_hw_breakpoint()
328 info->condition_mode = PPC_BREAKPOINT_CONDITION_NONE; in get_ppc_hw_breakpoint()
329 info->addr = (__u64)addr; in get_ppc_hw_breakpoint()
330 info->addr2 = (__u64)addr + len; in get_ppc_hw_breakpoint()
331 info->condition_value = 0; in get_ppc_hw_breakpoint()
333 info->addr_mode = PPC_BREAKPOINT_MODE_EXACT; in get_ppc_hw_breakpoint()
[all …]
/tools/bpf/bpftool/
Dlink.c60 show_link_header_json(struct bpf_link_info *info, json_writer_t *wtr) in show_link_header_json() argument
62 jsonw_uint_field(wtr, "id", info->id); in show_link_header_json()
63 if (info->type < ARRAY_SIZE(link_type_name)) in show_link_header_json()
64 jsonw_string_field(wtr, "type", link_type_name[info->type]); in show_link_header_json()
66 jsonw_uint_field(wtr, "type", info->type); in show_link_header_json()
68 jsonw_uint_field(json_wtr, "prog_id", info->prog_id); in show_link_header_json()
86 static void show_iter_json(struct bpf_link_info *info, json_writer_t *wtr) in show_iter_json() argument
88 const char *target_name = u64_to_ptr(info->iter.target_name); in show_iter_json()
93 jsonw_uint_field(wtr, "map_id", info->iter.map.map_id); in show_iter_json()
96 static int get_prog_info(int prog_id, struct bpf_prog_info *info) in get_prog_info() argument
[all …]
Dmap.c88 static void *alloc_value(struct bpf_map_info *info) in alloc_value() argument
90 if (map_is_per_cpu(info->type)) in alloc_value()
91 return malloc(round_up(info->value_size, 8) * in alloc_value()
94 return malloc(info->value_size); in alloc_value()
158 static void print_entry_json(struct bpf_map_info *info, unsigned char *key, in print_entry_json() argument
163 if (!map_is_per_cpu(info->type)) { in print_entry_json()
165 print_hex_data_json(key, info->key_size); in print_entry_json()
167 print_hex_data_json(value, info->value_size); in print_entry_json()
176 do_dump_btf(&d, info, key, value); in print_entry_json()
182 step = round_up(info->value_size, 8); in print_entry_json()
[all …]
Dstruct_ops.c41 static const char *get_kern_struct_ops_name(const struct bpf_map_info *info) in get_kern_struct_ops_name() argument
51 t = btf__type_by_id(kern_btf, info->btf_vmlinux_value_type_id); in get_kern_struct_ops_name()
104 struct bpf_map_info *info; in map_info_alloc() local
109 info = calloc(1, map_info_alloc_len); in map_info_alloc()
110 if (!info) in map_info_alloc()
115 return info; in map_info_alloc()
133 struct bpf_map_info *info, __u32 info_len) in get_next_struct_ops_map() argument
135 __u32 id = info->id; in get_next_struct_ops_map()
156 err = bpf_obj_get_info_by_fd(fd, info, &info_len); in get_next_struct_ops_map()
163 if (info->type == BPF_MAP_TYPE_STRUCT_OPS && in get_next_struct_ops_map()
[all …]
Dprog.c130 struct bpf_prog_info info = {}; in show_prog_maps() local
131 __u32 len = sizeof(info); in show_prog_maps()
136 info.nr_map_ids = num_maps; in show_prog_maps()
137 info.map_ids = ptr_to_u64(map_ids); in show_prog_maps()
139 err = bpf_obj_get_info_by_fd(fd, &info, &len); in show_prog_maps()
140 if (err || !info.nr_map_ids) in show_prog_maps()
146 for (i = 0; i < info.nr_map_ids; i++) in show_prog_maps()
151 for (i = 0; i < info.nr_map_ids; i++) in show_prog_maps()
153 i == info.nr_map_ids - 1 ? "" : ","); in show_prog_maps()
351 static void print_prog_header_json(struct bpf_prog_info *info) in print_prog_header_json() argument
[all …]
Dbtf.c106 kind = BTF_INFO_KIND(t->info); in dump_btf_type()
119 switch (BTF_INFO_KIND(t->info)) { in dump_btf_type()
164 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
179 if (BTF_INFO_KFLAG(t->info)) { in dump_btf_type()
210 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
238 const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union" in dump_btf_type()
260 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
303 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
443 struct bpf_map_info info = {}; in do_dump() local
444 __u32 len = sizeof(info); in do_dump()
[all …]
Djit_disasm.c85 struct disassemble_info info; in disasm_print_insn() local
102 init_disassemble_info(&info, stdout, in disasm_print_insn()
105 init_disassemble_info(&info, stdout, in disasm_print_insn()
120 info.arch = bfd_get_arch(bfdf); in disasm_print_insn()
121 info.mach = bfd_get_mach(bfdf); in disasm_print_insn()
123 info.disassembler_options = disassembler_options; in disasm_print_insn()
124 info.buffer = image; in disasm_print_insn()
125 info.buffer_length = len; in disasm_print_insn()
127 disassemble_init_for_target(&info); in disasm_print_insn()
130 disassemble = disassembler(info.arch, in disasm_print_insn()
[all …]
/tools/testing/selftests/ptrace/
Dget_syscall_info.c113 struct ptrace_syscall_info info = { in TEST() local
116 const size_t size = sizeof(info); in TEST()
118 (void *) &info.entry - (void *) &info; in TEST()
120 (void *) &info.entry.args[6] - (void *) &info; in TEST()
122 (void *) (&info.exit.is_error + 1) - in TEST()
123 (void *) &info; in TEST()
157 (unsigned long) &info))) { in TEST()
163 ASSERT_EQ(PTRACE_SYSCALL_INFO_NONE, info.op) { in TEST()
166 ASSERT_TRUE(info.arch) { in TEST()
169 ASSERT_TRUE(info.instruction_pointer) { in TEST()
[all …]
/tools/testing/selftests/pidfd/
Dpidfd_wait.c34 static int sys_waitid(int which, pid_t pid, siginfo_t *info, int options, in sys_waitid() argument
37 return syscall(__NR_waitid, which, pid, info, options, ru); in sys_waitid()
51 siginfo_t info = { in TEST() local
58 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
66 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
77 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST()
79 ASSERT_EQ(WIFEXITED(info.si_status), true); in TEST()
80 ASSERT_EQ(WEXITSTATUS(info.si_status), 0); in TEST()
83 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST()
84 ASSERT_EQ(info.si_code, CLD_EXITED); in TEST()
[all …]
Dpidfd_setns_test.c143 const struct ns_info *info = &ns_info[i]; in FIXTURE_SETUP() local
144 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
148 info->name, self->pid); in FIXTURE_SETUP()
235 const struct ns_info *info = &ns_info[i]; in FIXTURE_SETUP() local
237 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
241 info->name, self->pid); in FIXTURE_SETUP()
246 self->child_pid1, info->name); in FIXTURE_SETUP()
254 info->name, self->child_pid1); in FIXTURE_SETUP()
259 self->child_pid2, info->name); in FIXTURE_SETUP()
267 info->name, self->child_pid1); in FIXTURE_SETUP()
[all …]
/tools/testing/selftests/sync/
Dsync.c86 struct sync_file_info *info; in sync_file_info() local
90 info = calloc(1, sizeof(*info)); in sync_file_info()
91 if (info == NULL) in sync_file_info()
94 err = ioctl(fd, SYNC_IOC_FILE_INFO, info); in sync_file_info()
96 free(info); in sync_file_info()
100 num_fences = info->num_fences; in sync_file_info()
103 info->flags = 0; in sync_file_info()
104 info->num_fences = num_fences; in sync_file_info()
108 free(info); in sync_file_info()
112 info->sync_fence_info = (uint64_t)(unsigned long)fence_info; in sync_file_info()
[all …]
/tools/testing/selftests/size/
Dget_size.c87 struct sysinfo info; in _start() local
94 ccode = syscall(SYS_sysinfo, &info); in _start()
105 used = info.totalram - info.freeram - info.bufferram; in _start()
108 print_k_value(" Total: ", info.totalram, info.mem_unit); in _start()
109 print_k_value(" Free: ", info.freeram, info.mem_unit); in _start()
110 print_k_value(" Buffer: ", info.bufferram, info.mem_unit); in _start()
111 print_k_value(" In use: ", used, info.mem_unit); in _start()
/tools/perf/util/
Dpfm.c123 print_attr_flags(pfm_event_attr_info_t *info) in print_attr_flags() argument
127 if (info->is_dfl) { in print_attr_flags()
132 if (info->is_precise) { in print_attr_flags()
142 print_libpfm_events_detailed(pfm_event_info_t *info, bool long_desc) in print_libpfm_events_detailed() argument
150 printf(" %s\n", info->name); in print_libpfm_events_detailed()
151 printf(" [%s]\n", info->desc); in print_libpfm_events_detailed()
153 if (info->equiv) in print_libpfm_events_detailed()
154 printf(" Equiv: %s\n", info->equiv); in print_libpfm_events_detailed()
156 printf(" Code : 0x%"PRIx64"\n", info->code); in print_libpfm_events_detailed()
158 pfm_for_each_event_attr(j, info) { in print_libpfm_events_detailed()
[all …]
Dbpf-event.c55 for (i = 0; i < info_linear->info.nr_jited_ksyms; i++) { in machine__process_bpf_event_load()
56 u64 *addrs = (u64 *)(uintptr_t)(info_linear->info.jited_ksyms); in machine__process_bpf_event_load()
121 struct bpf_prog_info *info, in synthesize_bpf_prog_name() argument
125 u8 (*prog_tags)[BPF_TAG_SIZE] = (void *)(uintptr_t)(info->prog_tags); in synthesize_bpf_prog_name()
126 void *func_infos = (void *)(uintptr_t)(info->func_info); in synthesize_bpf_prog_name()
127 u32 sub_prog_cnt = info->nr_jited_ksyms; in synthesize_bpf_prog_name()
137 finfo = func_infos + sub_id * info->func_info_rec_size; in synthesize_bpf_prog_name()
142 if (info->name[0]) in synthesize_bpf_prog_name()
143 short_name = info->name; in synthesize_bpf_prog_name()
174 struct bpf_prog_info *info; in perf_event__synthesize_one_bpf_prog() local
[all …]
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi_signal_restart.c88 info("signal received %s requeue\n", in handle_signal()
99 info("Waiter running\n"); in waiterfn()
100 info("Calling FUTEX_LOCK_PI on f2=%x @ %p\n", f2, &f2); in waiterfn()
107 info("w2:futex: %x\n", f2); in waiterfn()
113 info("Waiter exiting with %d\n", waiter_ret); in waiterfn()
156 info("m1:f2: %x\n", f2); in main()
157 info("Creating waiter\n"); in main()
165 info("Calling FUTEX_LOCK_PI on f2=%x @ %p\n", f2, &f2); in main()
166 info("m2:f2: %x\n", f2); in main()
168 info("m3:f2: %x\n", f2); in main()
[all …]
/tools/iio/
Diio_generic_buffer.c82 static void print1byte(uint8_t input, struct iio_channel_info *info) in print1byte() argument
88 input >>= info->shift; in print1byte()
89 input &= info->mask; in print1byte()
90 if (info->is_signed) { in print1byte()
91 int8_t val = (int8_t)(input << (8 - info->bits_used)) >> in print1byte()
92 (8 - info->bits_used); in print1byte()
93 printf("%05f ", ((float)val + info->offset) * info->scale); in print1byte()
95 printf("%05f ", ((float)input + info->offset) * info->scale); in print1byte()
99 static void print2byte(uint16_t input, struct iio_channel_info *info) in print2byte() argument
102 if (info->be) in print2byte()
[all …]
/tools/testing/selftests/android/ion/
Dionapp_import.c26 struct ion_buffer_info info; in main() local
53 memset(&info, 0, sizeof(info)); in main()
54 info.buffd = shared_fd; in main()
55 info.buflen = ION_BUFFER_LEN; in main()
57 ret = ion_import_buffer_fd(&info); in main()
63 map_buf = info.buffer; in main()
64 map_len = info.buflen; in main()
72 ion_close_buffer_fd(&info); in main()
Dionapp_export.c35 struct ion_buffer_info info; in main() local
84 info.heap_type = heap_type; in main()
85 info.heap_size = heap_size; in main()
86 info.flag_type = flags; in main()
97 ret = ion_export_buffer_fd(&info); in main()
102 client_fd = info.ionfd; in main()
103 shared_fd = info.buffd; in main()
104 map_buf = info.buffer; in main()
105 map_len = info.buflen; in main()
121 ion_close_buffer_fd(&info); in main()
Dionmap_test.c87 struct ion_buffer_info info; in main() local
91 info.heap_type = ION_HEAP_TYPE_SYSTEM; in main()
92 info.heap_size = 4096; in main()
93 info.flag_type = ION_FLAG_CACHED; in main()
95 ret = ion_export_buffer_fd(&info); in main()
108 ret = import_vgem_fd(vgem_fd, info.buffd, &handle); in main()
116 ret = ioctl(info.buffd, DMA_BUF_IOCTL_SYNC, &sync); in main()
120 memset(info.buffer, 0xff, 4096); in main()
123 ret = ioctl(info.buffd, DMA_BUF_IOCTL_SYNC, &sync); in main()
133 ion_close_buffer_fd(&info); in main()
/tools/virtio/
Dvirtio_test.c55 struct vq_info *info = vq->priv; in vq_notify() local
58 r = write(info->kick, &v, sizeof v); in vq_notify()
68 void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) in vhost_vq_setup() argument
70 struct vhost_vring_state state = { .index = info->idx }; in vhost_vq_setup()
71 struct vhost_vring_file file = { .index = info->idx }; in vhost_vq_setup()
74 .index = info->idx, in vhost_vq_setup()
75 .desc_user_addr = (uint64_t)(unsigned long)info->vring.desc, in vhost_vq_setup()
76 .avail_user_addr = (uint64_t)(unsigned long)info->vring.avail, in vhost_vq_setup()
77 .used_user_addr = (uint64_t)(unsigned long)info->vring.used, in vhost_vq_setup()
82 state.num = info->vring.num; in vhost_vq_setup()
[all …]
/tools/testing/selftests/exec/
Dload_address.c14 int ExtractStatistics(struct dl_phdr_info *info, size_t size, void *data) in ExtractStatistics() argument
19 if (info->dlpi_name != NULL && info->dlpi_name[0] != '\0') { in ExtractStatistics()
24 stats->load_address = (unsigned long long) info->dlpi_addr; in ExtractStatistics()
27 for (i = 0; i < info->dlpi_phnum; i++) { in ExtractStatistics()
28 if (info->dlpi_phdr[i].p_type != PT_LOAD) in ExtractStatistics()
31 if (info->dlpi_phdr[i].p_align > stats->alignment) in ExtractStatistics()
32 stats->alignment = info->dlpi_phdr[i].p_align; in ExtractStatistics()
/tools/testing/selftests/bpf/prog_tests/
Denable_stats.c9 struct bpf_prog_info info; in test_enable_stats() local
10 __u32 info_len = sizeof(info); in test_enable_stats()
30 memset(&info, 0, info_len); in test_enable_stats()
31 err = bpf_obj_get_info_by_fd(prog_fd, &info, &info_len); in test_enable_stats()
35 if (CHECK(info.run_time_ns == 0, "check_stats_enabled", in test_enable_stats()
39 CHECK(info.run_cnt != skel->bss->count, "check_run_cnt_valid", in test_enable_stats()
/tools/lib/bpf/
Dbpf_prog_linfo.c100 struct bpf_prog_linfo *bpf_prog_linfo__new(const struct bpf_prog_info *info) in bpf_prog_linfo__new() argument
106 nr_linfo = info->nr_line_info; in bpf_prog_linfo__new()
115 if (info->line_info_rec_size < in bpf_prog_linfo__new()
125 prog_linfo->rec_size = info->line_info_rec_size; in bpf_prog_linfo__new()
130 memcpy(prog_linfo->raw_linfo, (void *)(long)info->line_info, data_sz); in bpf_prog_linfo__new()
132 nr_jited_func = info->nr_jited_ksyms; in bpf_prog_linfo__new()
134 !info->jited_line_info || in bpf_prog_linfo__new()
135 info->nr_jited_line_info != nr_linfo || in bpf_prog_linfo__new()
136 info->jited_line_info_rec_size < sizeof(__u64) || in bpf_prog_linfo__new()
137 info->nr_jited_func_lens != nr_jited_func || in bpf_prog_linfo__new()
[all …]

123456789