/kernel/bpf/ |
D | arraymap.c | 21 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument 25 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu() 26 free_percpu(array->pptrs[i]); in bpf_array_free_percpu() 31 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument 36 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu() 37 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu() 40 bpf_array_free_percpu(array); in bpf_array_alloc_percpu() 43 array->pptrs[i] = ptr; in bpf_array_alloc_percpu() 88 struct bpf_array *array; in array_map_alloc() local 113 array_size = sizeof(*array); in array_map_alloc() [all …]
|
D | reuseport_array.c | 54 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local 57 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem() 60 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem() 66 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local 74 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem() 79 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem() 84 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem() 98 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local 129 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free() 139 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free() [all …]
|
D | core.c | 1577 struct bpf_array *array = container_of(map, struct bpf_array, map); in ___bpf_prog_run() local 1581 if (unlikely(index >= array->map.max_entries)) in ___bpf_prog_run() 1588 prog = READ_ONCE(array->ptrs[index]); in ___bpf_prog_run() 1831 bool bpf_prog_array_compatible(struct bpf_array *array, in bpf_prog_array_compatible() argument 1839 spin_lock(&array->aux->owner.lock); in bpf_prog_array_compatible() 1841 if (!array->aux->owner.type) { in bpf_prog_array_compatible() 1845 array->aux->owner.type = fp->type; in bpf_prog_array_compatible() 1846 array->aux->owner.jited = fp->jited; in bpf_prog_array_compatible() 1849 ret = array->aux->owner.type == fp->type && in bpf_prog_array_compatible() 1850 array->aux->owner.jited == fp->jited; in bpf_prog_array_compatible() [all …]
|
D | btf.c | 816 const struct btf_array *array; in btf_show_name() local 888 array = btf_type_array(t); in btf_show_name() 891 id = array->type; in btf_show_name() 1708 const struct btf_array *array = NULL; in __btf_resolve_size() local 1738 array = btf_type_array(type); in __btf_resolve_size() 1739 if (nelems && array->nelems > U32_MAX / nelems) in __btf_resolve_size() 1741 nelems *= array->nelems; in __btf_resolve_size() 1742 type = btf_type_by_id(btf, array->type); in __btf_resolve_size() 1763 *elem_id = array ? array->type : 0; in __btf_resolve_size() 2658 const struct btf_array *array = btf_type_array(t); in btf_array_check_meta() local [all …]
|
D | helpers.c | 1087 struct bpf_array *array = container_of(map, struct bpf_array, map); in bpf_timer_cb() local 1090 idx = ((char *)value - array->value) / array->elem_size; in bpf_timer_cb()
|
D | syscall.c | 558 const struct bpf_array *array; in bpf_map_show_fdinfo() local 562 array = container_of(map, struct bpf_array, map); in bpf_map_show_fdinfo() 563 spin_lock(&array->aux->owner.lock); in bpf_map_show_fdinfo() 564 type = array->aux->owner.type; in bpf_map_show_fdinfo() 565 jited = array->aux->owner.jited; in bpf_map_show_fdinfo() 566 spin_unlock(&array->aux->owner.lock); in bpf_map_show_fdinfo()
|
D | cgroup.c | 229 struct bpf_prog_array **array) in compute_effective_progs() argument 267 *array = progs; in compute_effective_progs()
|
/kernel/trace/ |
D | tracing_map.h | 173 #define TRACING_MAP_ARRAY_ELT(array, idx) \ argument 174 (array->pages[idx >> array->entry_shift] + \ 175 ((idx & array->entry_mask) << array->entry_size_shift)) 177 #define TRACING_MAP_ENTRY(array, idx) \ argument 178 ((struct tracing_map_entry *)TRACING_MAP_ARRAY_ELT(array, idx)) 180 #define TRACING_MAP_ELT(array, idx) \ argument 181 ((struct tracing_map_elt **)TRACING_MAP_ARRAY_ELT(array, idx))
|
D | trace_probe_tmpl.h | 137 goto array; in process_fetch_insn_bottom() 141 goto array; in process_fetch_insn_bottom() 145 goto array; in process_fetch_insn_bottom() 184 array: in process_fetch_insn_bottom()
|
D | ring_buffer_benchmark.c | 139 inc = event->array[0] + 4; in read_page() 151 if (!event->array[0]) { in read_page() 155 inc = event->array[0] + 4; in read_page()
|
D | bpf_trace.c | 496 struct bpf_array *array = container_of(map, struct bpf_array, map); in get_map_perf_counter() local 505 if (unlikely(index >= array->map.max_entries)) in get_map_perf_counter() 508 ee = READ_ONCE(array->ptrs[index]); in get_map_perf_counter() 569 struct bpf_array *array = container_of(map, struct bpf_array, map); in __bpf_perf_event_output() local 577 if (unlikely(index >= array->map.max_entries)) in __bpf_perf_event_output() 580 ee = READ_ONCE(array->ptrs[index]); in __bpf_perf_event_output() 744 struct bpf_array *array = container_of(map, struct bpf_array, map); in BPF_CALL_2() local 747 if (unlikely(idx >= array->map.max_entries)) in BPF_CALL_2() 750 cgrp = READ_ONCE(array->ptrs[idx]); in BPF_CALL_2()
|
D | trace_events_synth.c | 689 const char *prefix = NULL, *field_type = argv[0], *field_name, *array; in parse_synth_field() local 721 array = strchr(field_name, '['); in parse_synth_field() 722 if (array) in parse_synth_field() 723 len -= strlen(array); in parse_synth_field() 737 if (array) in parse_synth_field() 738 len += strlen(array); in parse_synth_field() 751 if (array) in parse_synth_field() 752 seq_buf_puts(&s, array); in parse_synth_field() 760 if (array) in parse_synth_field()
|
D | ring_buffer.c | 162 length = event->array[0]; in rb_event_data_length() 179 return event->array[0] + RB_EVNT_HDR_SIZE; in rb_event_length() 234 if (length > RB_MAX_SMALL_DATA + sizeof(event->array[0])) in ring_buffer_event_length() 235 length -= sizeof(event->array[0]); in ring_buffer_event_length() 249 return (void *)&event->array[0]; in rb_event_data() 251 return (void *)&event->array[1]; in rb_event_data() 274 ts = event->array[0]; in rb_event_time_stamp() 2622 event->array[0] = (BUF_PAGE_SIZE - tail) - RB_EVNT_HDR_SIZE; in rb_reset_tail() 2758 event->array[0] = delta >> TS_SHIFT; in rb_add_time_stamp() 2762 event->array[0] = 0; in rb_add_time_stamp() [all …]
|
D | trace.c | 988 ring_buffer_write(buffer, event->array[0], &event->array[1]); in __buffer_unlock_commit() 2794 int max_len = PAGE_SIZE - struct_size(entry, array, 1); in trace_event_buffer_lock_reserve() 2817 entry->array[0] = len; in trace_event_buffer_lock_reserve()
|
/kernel/sched/ |
D | rt.c | 87 struct rt_prio_array *array; in init_rt_rq() local 90 array = &rt_rq->active; in init_rt_rq() 92 INIT_LIST_HEAD(array->queue + i); in init_rt_rq() 93 __clear_bit(i, array->bitmap); in init_rt_rq() 96 __set_bit(MAX_RT_PRIO, array->bitmap); in init_rt_rq() 1172 struct rt_prio_array *array = &rt_rq->active; in dec_rt_prio() local 1175 sched_find_first_bit(array->bitmap); in dec_rt_prio() 1291 static void __delist_rt_entity(struct sched_rt_entity *rt_se, struct rt_prio_array *array) in __delist_rt_entity() argument 1295 if (list_empty(array->queue + rt_se_prio(rt_se))) in __delist_rt_entity() 1296 __clear_bit(rt_se_prio(rt_se), array->bitmap); in __delist_rt_entity() [all …]
|
/kernel/cgroup/ |
D | cgroup-v1.c | 335 pid_t *array; in pidlist_array_load() local 351 array = kvmalloc_array(length, sizeof(pid_t), GFP_KERNEL); in pidlist_array_load() 352 if (!array) in pidlist_array_load() 365 array[n++] = pid; in pidlist_array_load() 370 sort(array, length, sizeof(pid_t), cmppid, NULL); in pidlist_array_load() 371 length = pidlist_uniq(array, length); in pidlist_array_load() 375 kvfree(array); in pidlist_array_load() 381 l->list = array; in pidlist_array_load()
|
/kernel/ |
D | relay.c | 72 static void relay_free_page_array(struct page **array) in relay_free_page_array() argument 74 kvfree(array); in relay_free_page_array()
|