Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 120) sorted by relevance

12345

/tools/testing/radix-tree/
Dtag_check.c14 __simple_checks(struct radix_tree_root *tree, unsigned long index, int tag) in __simple_checks() argument
19 item_check_absent(tree, index); in __simple_checks()
20 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
22 item_insert(tree, index); in __simple_checks()
23 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
24 item_tag_set(tree, index, tag); in __simple_checks()
25 ret = item_tag_get(tree, index, tag); in __simple_checks()
29 ret = item_tag_get(tree, index, !tag); in __simple_checks()
31 ret = item_delete(tree, index); in __simple_checks()
33 item_insert(tree, index); in __simple_checks()
[all …]
Dtest.c12 item_tag_set(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_set() argument
14 return radix_tree_tag_set(root, index, tag); in item_tag_set()
18 item_tag_clear(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_clear() argument
20 return radix_tree_tag_clear(root, index, tag); in item_tag_clear()
23 int item_tag_get(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_get() argument
25 return radix_tree_tag_get(root, index, tag); in item_tag_get()
28 struct item *item_create(unsigned long index, unsigned int order) in item_create() argument
32 ret->index = index; in item_create()
37 int item_insert(struct radix_tree_root *root, unsigned long index) in item_insert() argument
39 struct item *item = item_create(index, 0); in item_insert()
[all …]
Dtest.h9 unsigned long index; member
13 struct item *item_create(unsigned long index, unsigned int order);
14 int item_insert(struct radix_tree_root *root, unsigned long index);
15 void item_sanity(struct item *item, unsigned long index);
16 void item_free(struct item *item, unsigned long index);
17 int item_delete(struct radix_tree_root *root, unsigned long index);
18 int item_delete_rcu(struct xarray *xa, unsigned long index);
19 struct item *item_lookup(struct radix_tree_root *root, unsigned long index);
21 void item_check_present(struct radix_tree_root *root, unsigned long index);
22 void item_check_absent(struct radix_tree_root *root, unsigned long index);
[all …]
Dregression3.c45 printv(2, "tagged %ld %p\n", iter.index, *slot); in regression3_test()
52 printv(2, "retry at %ld\n", iter.index); in regression3_test()
61 printv(2, "slot %ld %p\n", iter.index, *slot); in regression3_test()
67 printv(2, "retry at %ld\n", iter.index); in regression3_test()
74 printv(2, "slot %ld %p\n", iter.index, *slot); in regression3_test()
75 if (!iter.index) { in regression3_test()
76 printv(2, "next at %ld\n", iter.index); in regression3_test()
84 printv(2, "tagged %ld %p\n", iter.index, *slot); in regression3_test()
85 if (!iter.index) { in regression3_test()
86 printv(2, "next at %ld\n", iter.index); in regression3_test()
Dbenchmark.c56 unsigned long index; in benchmark_insert() local
61 for (index = 0 ; index < size ; index += step) in benchmark_insert()
62 item_insert(root, index); in benchmark_insert()
77 unsigned long index; in benchmark_tagging() local
82 for (index = 0 ; index < size ; index += step) in benchmark_tagging()
83 radix_tree_tag_set(root, index, 0); in benchmark_tagging()
98 unsigned long index; in benchmark_delete() local
103 for (index = 0 ; index < size ; index += step) in benchmark_delete()
104 item_delete(root, index); in benchmark_delete()
Dmultiorder.c15 static int item_insert_order(struct xarray *xa, unsigned long index, in item_insert_order() argument
18 XA_STATE_ORDER(xas, xa, index, order); in item_insert_order()
19 struct item *item = item_create(index, order); in item_insert_order()
41 int index[NUM_ENTRIES] = {0, 2, 4, 8, 16, 32, 34, 36, 64, 72, 128}; in multiorder_iteration() local
47 err = item_insert_order(xa, index[i], order[i]); in multiorder_iteration()
53 if (j <= (index[i] | ((1 << order[i]) - 1))) in multiorder_iteration()
62 assert((xas.xa_index | mask) == (index[i] | mask)); in multiorder_iteration()
65 assert((item->index | mask) == (index[i] | mask)); in multiorder_iteration()
81 int index[MT_NUM_ENTRIES] = {0, 2, 4, 16, 32, 40, 64, 72, 128}; in multiorder_tagged_iteration() local
90 assert(!item_insert_order(xa, index[i], order[i])); in multiorder_tagged_iteration()
[all …]
Dregression1.c52 unsigned long index; member
55 static struct page *page_alloc(int index) in page_alloc() argument
60 p->index = index; in page_alloc()
Diteration_check.c21 void my_item_insert(struct xarray *xa, unsigned long index) in my_item_insert() argument
23 XA_STATE(xas, xa, index); in my_item_insert()
24 struct item *item = item_create(index, 0); in my_item_insert()
30 xas_set_order(&xas, index, order); in my_item_insert()
Dregression2.c64 unsigned long index; member
71 p->index = page_count++; in page_alloc()
/tools/virtio/ringtest/
Dring.c35 unsigned short index; member
99 .index = i, in alloc_ring()
114 unsigned head, index; in add_inbuf() local
133 index = ring[head].index; in add_inbuf()
134 data[index].buf = buf; in add_inbuf()
135 data[index].data = datap; in add_inbuf()
146 unsigned index; in get_buf() local
154 index = ring[head].index & (ring_size - 1); in get_buf()
155 datap = data[index].data; in get_buf()
156 *bufp = data[index].buf; in get_buf()
[all …]
Dvirtio_ring_0_9.c155 unsigned index; in get_buf() local
160 index = ring.used->ring[head].id; in get_buf()
161 if ((index ^ guest.last_used_idx ^ 0x8000) & ~(ring_size - 1)) in get_buf()
165 index &= ring_size - 1; in get_buf()
173 index = head; in get_buf()
176 index = ring.used->ring[head].id; in get_buf()
181 *lenp = ring.desc[index].len; in get_buf()
185 datap = data[index].data; in get_buf()
186 *bufp = (void*)(unsigned long)ring.desc[index].addr; in get_buf()
187 data[index].data = NULL; in get_buf()
[all …]
/tools/perf/ui/browsers/
Dscripts.c29 int index; member
52 c->names[c->index] = name; in add_script_option()
53 if (asprintf(&c->paths[c->index], in add_script_option()
58 c->index++; in add_script_option()
68 if (c->index >= SCRIPT_MAX_NO) in scripts_config()
70 c->names[c->index] = strdup(var + 7); in scripts_config()
71 if (!c->names[c->index]) in scripts_config()
73 if (asprintf(&c->paths[c->index], "%s %s", value, in scripts_config()
76 c->index++; in scripts_config()
115 custom_perf = scriptc.index; in list_scripts()
[all …]
/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c400 uint16_t index[4]; in nested_pg_map() local
423 index[0] = (nested_paddr >> 12) & 0x1ffu; in nested_pg_map()
424 index[1] = (nested_paddr >> 21) & 0x1ffu; in nested_pg_map()
425 index[2] = (nested_paddr >> 30) & 0x1ffu; in nested_pg_map()
426 index[3] = (nested_paddr >> 39) & 0x1ffu; in nested_pg_map()
430 if (!pml4e[index[3]].readable) { in nested_pg_map()
431 pml4e[index[3]].address = vm_phy_page_alloc(vm, in nested_pg_map()
434 pml4e[index[3]].writable = true; in nested_pg_map()
435 pml4e[index[3]].readable = true; in nested_pg_map()
436 pml4e[index[3]].executable = true; in nested_pg_map()
[all …]
Dprocessor.c229 uint16_t index[4]; in virt_pg_map() local
252 index[0] = (vaddr >> 12) & 0x1ffu; in virt_pg_map()
253 index[1] = (vaddr >> 21) & 0x1ffu; in virt_pg_map()
254 index[2] = (vaddr >> 30) & 0x1ffu; in virt_pg_map()
255 index[3] = (vaddr >> 39) & 0x1ffu; in virt_pg_map()
259 if (!pml4e[index[3]].present) { in virt_pg_map()
260 pml4e[index[3]].address = vm_phy_page_alloc(vm, in virt_pg_map()
263 pml4e[index[3]].writable = true; in virt_pg_map()
264 pml4e[index[3]].present = true; in virt_pg_map()
269 pdpe = addr_gpa2hva(vm, pml4e[index[3]].address * vm->page_size); in virt_pg_map()
[all …]
/tools/testing/selftests/ptp/
Dtestptp.c58 static void do_flag_test(int fd, unsigned int index) in do_flag_test() argument
75 extts_request.index = index; in do_flag_test()
172 int index = 0; in main() local
210 index = atoi(optarg); in main()
359 extts_request.index = index; in main()
373 printf("event index %u at %lld.%09u\n", event.index, in main()
385 do_flag_test(fd, index); in main()
396 desc.index = i; in main()
402 desc.name, desc.index, desc.func, desc.chan); in main()
422 perout_request.index = index; in main()
[all …]
/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/
Dtc_flower.sh241 local index
250 index=$((BASE_INDEX - i))
261 "tc filter add dev $h2 ingress protocol ip pref $index \
262 handle $index \
273 tc_check_packets "dev $h2 ingress" $index 1
278 index=$((BASE_INDEX - i))
283 tc_check_packets "dev $h2 ingress" $index 2
286 tc filter del dev $h2 ingress protocol ip pref $index \
287 handle $index flower
656 local index=$3
[all …]
/tools/vm/
Dpage-types.c256 unsigned long index, in do_u64_read() argument
261 if (index > ULONG_MAX / 8) in do_u64_read()
262 fatal("index overflow: %lu\n", index); in do_u64_read()
264 bytes = pread(fd, buf, count * 8, (off_t)index * 8); in do_u64_read()
276 unsigned long index, in kpageflags_read() argument
279 return do_u64_read(kpageflags_fd, opt_kpageflags, buf, index, pages); in kpageflags_read()
283 unsigned long index, in kpagecgroup_read() argument
289 return do_u64_read(kpagecgroup_fd, opt_kpageflags, buf, index, pages); in kpagecgroup_read()
293 unsigned long index, in kpagecount_read() argument
298 buf, index, pages); in kpagecount_read()
[all …]
/tools/perf/util/arm-spe-decoder/
Darm-spe-decoder.c28 static u64 arm_spe_calc_ip(int index, u64 payload) in arm_spe_calc_ip() argument
34 if (index == SPE_ADDR_PKT_HDR_INDEX_INS || in arm_spe_calc_ip()
35 index == SPE_ADDR_PKT_HDR_INDEX_BRANCH) { in arm_spe_calc_ip()
47 } else if (index == SPE_ADDR_PKT_HDR_INDEX_DATA_VIRT) { in arm_spe_calc_ip()
57 } else if (index == SPE_ADDR_PKT_HDR_INDEX_DATA_PHYS) { in arm_spe_calc_ip()
61 pr_err("unsupported address packet index: 0x%x\n", index); in arm_spe_calc_ip()
150 idx = decoder->packet.index; in arm_spe_read_record()
Darm-spe-pkt-decoder.c149 packet->index = ret - 1; in arm_spe_get_events()
165 packet->index = buf[0] & 0x3; in arm_spe_get_context()
174 packet->index = buf[0] & 0x3; in arm_spe_get_op_type()
186 packet->index = ((buf[0] & 0x3) << 3) | (buf[1] & 0x7); in arm_spe_get_counter()
188 packet->index = buf[0] & 0x7; in arm_spe_get_counter()
203 packet->index = ((buf[0] & 0x3) << 3) | (buf[1] & 0x7); in arm_spe_get_addr()
205 packet->index = buf[0] & 0x7; in arm_spe_get_addr()
277 int ret, ns, el, idx = packet->index; in arm_spe_pkt_desc()
461 name, payload, packet->index); in arm_spe_pkt_desc()
/tools/testing/selftests/arm64/mte/
Dmte_common_util.c175 int index; in mte_allocate_file_memory() local
184 for (index = INIT_BUFFER_SIZE; index < size; index += INIT_BUFFER_SIZE) in mte_allocate_file_memory()
186 index -= INIT_BUFFER_SIZE; in mte_allocate_file_memory()
187 write(fd, buffer, size - index); in mte_allocate_file_memory()
194 int index; in mte_allocate_file_memory_tag_range() local
204 for (index = INIT_BUFFER_SIZE; index < map_size; index += INIT_BUFFER_SIZE) in mte_allocate_file_memory_tag_range()
206 index -= INIT_BUFFER_SIZE; in mte_allocate_file_memory_tag_range()
207 write(fd, buffer, map_size - index); in mte_allocate_file_memory_tag_range()
/tools/testing/selftests/kvm/x86_64/
Duser_msr_test.c156 run->msr.data = run->msr.index; in handle_rdmsr()
159 if (run->msr.index == MSR_SYSCALL_MASK || in handle_rdmsr()
160 run->msr.index == MSR_GS_BASE) { in handle_rdmsr()
165 if (run->msr.index == 0xdeadbeef) { in handle_rdmsr()
176 if (run->msr.index == MSR_IA32_POWER_CTL) { in handle_wrmsr()
183 if (run->msr.index == 0xdeadbeef) { in handle_wrmsr()
/tools/testing/selftests/tc-testing/
Dtdc_batch.py99 index = 0 variable
106 cmd = formatter(device, prio, handle_start + index, skip, src_mac,
109 index += 1
110 if index >= number:
/tools/perf/ui/
Dbrowser.c191 return browser->top_idx + row == browser->index; in ui_browser__is_current_entry()
258 browser->index = browser->top_idx = 0; in ui_browser__reset_index()
317 pct = ((browser->index * (browser->height - 1)) / in ui_browser__scrollbar_set()
378 browser->index += offset; in ui_browser__update_nr_entries()
424 if (browser->index == browser->nr_entries - 1) in ui_browser__run()
426 ++browser->index; in ui_browser__run()
427 if (browser->index == browser->top_idx + browser->rows) { in ui_browser__run()
433 if (browser->index == 0) in ui_browser__run()
435 --browser->index; in ui_browser__run()
436 if (browser->index < browser->top_idx) { in ui_browser__run()
[all …]
/tools/lib/traceevent/
Dkbuffer-parse.c49 unsigned int index; member
310 kbuf->index = kbuf->size; in old_update_pointers()
324 kbuf->index = calc_index(kbuf, ptr); in old_update_pointers()
325 kbuf->next = kbuf->index + length; in old_update_pointers()
402 kbuf->index = calc_index(kbuf, ptr); in update_pointers()
403 kbuf->next = kbuf->index + length; in update_pointers()
496 return kbuf->data + kbuf->index; in kbuffer_next_event()
544 kbuf->index = 0; in kbuffer_load_subbuffer()
598 return kbuf->data + kbuf->index; in kbuffer_read_event()
702 return kbuf->next - kbuf->index; in kbuffer_event_size()
/tools/perf/arch/x86/tests/
Dgen-insn-x86-dat.awk29 colon_pos = index($0, ":")
55 expecting_pos = index($0, expecting_str)

12345