Home
last modified time | relevance | path

Searched refs:iter (Results 1 – 25 of 50) sorted by relevance

12

/kernel/
Dkallsyms.c665 static int get_ksymbol_arch(struct kallsym_iter *iter) in get_ksymbol_arch() argument
667 int ret = arch_get_kallsym(iter->pos - kallsyms_num_syms, in get_ksymbol_arch()
668 &iter->value, &iter->type, in get_ksymbol_arch()
669 iter->name); in get_ksymbol_arch()
672 iter->pos_arch_end = iter->pos; in get_ksymbol_arch()
679 static int get_ksymbol_mod(struct kallsym_iter *iter) in get_ksymbol_mod() argument
681 int ret = module_get_kallsym(iter->pos - iter->pos_arch_end, in get_ksymbol_mod()
682 &iter->value, &iter->type, in get_ksymbol_mod()
683 iter->name, iter->module_name, in get_ksymbol_mod()
684 &iter->exported); in get_ksymbol_mod()
[all …]
Ducount.c232 struct ucounts *ucounts, *iter, *bad; in inc_ucount() local
235 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
237 tns = iter->ns; in inc_ucount()
239 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount()
244 bad = iter; in inc_ucount()
245 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
246 atomic_long_dec(&iter->ucount[type]); in inc_ucount()
254 struct ucounts *iter; in dec_ucount() local
255 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
256 long dec = atomic_long_dec_if_positive(&iter->ucount[type]); in dec_ucount()
[all …]
Djump_label.c321 struct jump_entry *iter; in __jump_label_text_reserved() local
323 iter = iter_start; in __jump_label_text_reserved()
324 while (iter < iter_stop) { in __jump_label_text_reserved()
325 if (init || !jump_entry_is_init(iter)) { in __jump_label_text_reserved()
326 if (addr_conflict(iter, start, end)) in __jump_label_text_reserved()
329 iter++; in __jump_label_text_reserved()
464 struct jump_entry *iter; in jump_label_init() local
482 for (iter = iter_start; iter < iter_stop; iter++) { in jump_label_init()
487 if (jump_label_type(iter) == JUMP_LABEL_NOP) in jump_label_init()
488 arch_jump_label_transform_static(iter, JUMP_LABEL_NOP); in jump_label_init()
[all …]
Dstatic_call_inline.c297 struct static_call_site *iter = iter_start; in __static_call_text_reserved() local
299 while (iter < iter_stop) { in __static_call_text_reserved()
300 if (init || !static_call_is_init(iter)) { in __static_call_text_reserved()
301 if (addr_conflict(iter, start, end)) in __static_call_text_reserved()
304 iter++; in __static_call_text_reserved()
/kernel/trace/
Dtrace_output.c26 enum print_line_t trace_print_bputs_msg_only(struct trace_iterator *iter) in trace_print_bputs_msg_only() argument
28 struct trace_seq *s = &iter->seq; in trace_print_bputs_msg_only()
29 struct trace_entry *entry = iter->ent; in trace_print_bputs_msg_only()
39 enum print_line_t trace_print_bprintk_msg_only(struct trace_iterator *iter) in trace_print_bprintk_msg_only() argument
41 struct trace_seq *s = &iter->seq; in trace_print_bprintk_msg_only()
42 struct trace_entry *entry = iter->ent; in trace_print_bprintk_msg_only()
52 enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter) in trace_print_printk_msg_only() argument
54 struct trace_seq *s = &iter->seq; in trace_print_printk_msg_only()
55 struct trace_entry *entry = iter->ent; in trace_print_printk_msg_only()
293 int trace_raw_output_prep(struct trace_iterator *iter, in trace_raw_output_prep() argument
[all …]
Dtrace_kdb.c20 static struct trace_iterator iter; variable
29 tr = iter.tr; in ftrace_dump_buf()
40 trace_iterator_reset(&iter); in ftrace_dump_buf()
41 iter.iter_flags |= TRACE_FILE_LAT_FMT; in ftrace_dump_buf()
45 iter.buffer_iter[cpu] = in ftrace_dump_buf()
46 ring_buffer_read_prepare(iter.array_buffer->buffer, in ftrace_dump_buf()
48 ring_buffer_read_start(iter.buffer_iter[cpu]); in ftrace_dump_buf()
49 tracing_iter_reset(&iter, cpu); in ftrace_dump_buf()
52 iter.cpu_file = cpu_file; in ftrace_dump_buf()
53 iter.buffer_iter[cpu_file] = in ftrace_dump_buf()
[all …]
Dtrace.c1907 static int wait_on_pipe(struct trace_iterator *iter, int full) in wait_on_pipe() argument
1912 if (trace_buffer_iter(iter, iter->cpu_file)) in wait_on_pipe()
1915 ret = ring_buffer_wait(iter->array_buffer->buffer, iter->cpu_file, full); in wait_on_pipe()
1922 if (iter->snapshot) in wait_on_pipe()
1923 iter->array_buffer = &iter->tr->max_buffer; in wait_on_pipe()
2869 struct trace_iterator *iter = tracepoint_print_iter; in output_printk() local
2872 if (WARN_ON_ONCE(!iter)) in output_printk()
2889 trace_seq_init(&iter->seq); in output_printk()
2890 iter->ent = fbuffer->entry; in output_printk()
2891 event_call->event.funcs->trace(iter, 0, event); in output_printk()
[all …]
Dtrace_functions_graph.c418 get_return_for_leaf(struct trace_iterator *iter, in get_return_for_leaf() argument
421 struct fgraph_data *data = iter->private; in get_return_for_leaf()
435 ring_iter = trace_buffer_iter(iter, iter->cpu); in get_return_for_leaf()
445 ring_buffer_consume(iter->array_buffer->buffer, iter->cpu, in get_return_for_leaf()
447 event = ring_buffer_peek(iter->array_buffer->buffer, iter->cpu, in get_return_for_leaf()
500 print_graph_rel_time(struct trace_iterator *iter, struct trace_seq *s) in print_graph_rel_time() argument
504 usecs = iter->ts - iter->array_buffer->time_start; in print_graph_rel_time()
511 print_graph_irq(struct trace_iterator *iter, unsigned long addr, in print_graph_irq() argument
514 struct trace_array *tr = iter->tr; in print_graph_irq()
515 struct trace_seq *s = &iter->seq; in print_graph_irq()
[all …]
Dtrace_mmiotrace.c97 static void mmio_pipe_open(struct trace_iterator *iter) in mmio_pipe_open() argument
100 struct trace_seq *s = &iter->seq; in mmio_pipe_open()
109 iter->private = hiter; in mmio_pipe_open()
113 static void mmio_close(struct trace_iterator *iter) in mmio_close() argument
115 struct header_iter *hiter = iter->private; in mmio_close()
117 iter->private = NULL; in mmio_close()
120 static unsigned long count_overruns(struct trace_iterator *iter) in count_overruns() argument
123 unsigned long over = ring_buffer_overruns(iter->array_buffer->buffer); in count_overruns()
131 static ssize_t mmio_read(struct trace_iterator *iter, struct file *filp, in mmio_read() argument
135 struct header_iter *hiter = iter->private; in mmio_read()
[all …]
Dftrace.c2688 struct ftrace_rec_iter *iter = &ftrace_rec_iter; in ftrace_rec_iter_start() local
2690 iter->pg = ftrace_pages_start; in ftrace_rec_iter_start()
2691 iter->index = 0; in ftrace_rec_iter_start()
2694 while (iter->pg && !iter->pg->index) in ftrace_rec_iter_start()
2695 iter->pg = iter->pg->next; in ftrace_rec_iter_start()
2697 if (!iter->pg) in ftrace_rec_iter_start()
2700 return iter; in ftrace_rec_iter_start()
2709 struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter) in ftrace_rec_iter_next() argument
2711 iter->index++; in ftrace_rec_iter_next()
2713 if (iter->index >= iter->pg->index) { in ftrace_rec_iter_next()
[all …]
Dring_buffer.c2335 rb_iter_head_event(struct ring_buffer_iter *iter) in rb_iter_head_event() argument
2338 struct buffer_page *iter_head_page = iter->head_page; in rb_iter_head_event()
2342 if (iter->head != iter->next_event) in rb_iter_head_event()
2343 return iter->event; in rb_iter_head_event()
2354 if (iter->head > commit - 8) in rb_iter_head_event()
2357 event = __rb_page_index(iter_head_page, iter->head); in rb_iter_head_event()
2366 if ((iter->head + length) > commit || length > BUF_PAGE_SIZE) in rb_iter_head_event()
2370 memcpy(iter->event, event, length); in rb_iter_head_event()
2378 if (iter->page_stamp != iter_head_page->page->time_stamp || in rb_iter_head_event()
2382 iter->next_event = iter->head + length; in rb_iter_head_event()
[all …]
Dtrace_output.h9 trace_print_bputs_msg_only(struct trace_iterator *iter);
11 trace_print_bprintk_msg_only(struct trace_iterator *iter);
13 trace_print_printk_msg_only(struct trace_iterator *iter);
20 extern int trace_print_context(struct trace_iterator *iter);
21 extern int trace_print_lat_context(struct trace_iterator *iter);
27 extern enum print_line_t trace_nop_print(struct trace_iterator *iter,
Dtrace_printk.c55 const char **iter; in hold_module_trace_bprintk_format() local
63 for (iter = start; iter < end; iter++) { in hold_module_trace_bprintk_format()
64 struct trace_bprintk_fmt *tb_fmt = lookup_format(*iter); in hold_module_trace_bprintk_format()
67 *iter = tb_fmt->fmt; in hold_module_trace_bprintk_format()
74 fmt = kmalloc(strlen(*iter) + 1, GFP_KERNEL); in hold_module_trace_bprintk_format()
77 strcpy(fmt, *iter); in hold_module_trace_bprintk_format()
82 *iter = fmt; in hold_module_trace_bprintk_format()
Dtrace_irqsoff.c230 static void irqsoff_trace_open(struct trace_iterator *iter) in irqsoff_trace_open() argument
232 if (is_graph(iter->tr)) in irqsoff_trace_open()
233 graph_trace_open(iter); in irqsoff_trace_open()
235 iter->private = NULL; in irqsoff_trace_open()
238 static void irqsoff_trace_close(struct trace_iterator *iter) in irqsoff_trace_close() argument
240 if (iter->private) in irqsoff_trace_close()
241 graph_trace_close(iter); in irqsoff_trace_close()
249 static enum print_line_t irqsoff_print_line(struct trace_iterator *iter) in irqsoff_print_line() argument
255 if (is_graph(iter->tr)) in irqsoff_print_line()
256 return print_graph_function_flags(iter, GRAPH_TRACER_FLAGS); in irqsoff_print_line()
[all …]
Dblktrace.c1245 typedef void (blk_log_action_t) (struct trace_iterator *iter, const char *act,
1248 static void blk_log_action_classic(struct trace_iterator *iter, const char *act, in blk_log_action_classic() argument
1252 unsigned long long ts = iter->ts; in blk_log_action_classic()
1255 const struct blk_io_trace *t = te_blk_io_trace(iter->ent); in blk_log_action_classic()
1259 trace_seq_printf(&iter->seq, in blk_log_action_classic()
1261 MAJOR(t->device), MINOR(t->device), iter->cpu, in blk_log_action_classic()
1262 secs, nsec_rem, iter->ent->pid, act, rwbs); in blk_log_action_classic()
1265 static void blk_log_action(struct trace_iterator *iter, const char *act, in blk_log_action() argument
1269 const struct blk_io_trace *t = te_blk_io_trace(iter->ent); in blk_log_action()
1273 u64 id = t_cgid(iter->ent); in blk_log_action()
[all …]
Dtrace_sched_wakeup.c167 static void wakeup_trace_open(struct trace_iterator *iter) in wakeup_trace_open() argument
169 if (is_graph(iter->tr)) in wakeup_trace_open()
170 graph_trace_open(iter); in wakeup_trace_open()
172 iter->private = NULL; in wakeup_trace_open()
175 static void wakeup_trace_close(struct trace_iterator *iter) in wakeup_trace_close() argument
177 if (iter->private) in wakeup_trace_close()
178 graph_trace_close(iter); in wakeup_trace_close()
188 static enum print_line_t wakeup_print_line(struct trace_iterator *iter) in wakeup_print_line() argument
194 if (is_graph(iter->tr)) in wakeup_print_line()
195 return print_graph_function_flags(iter, GRAPH_TRACER_FLAGS); in wakeup_print_line()
[all …]
Dtrace.h540 void (*open)(struct trace_iterator *iter);
541 void (*pipe_open)(struct trace_iterator *iter);
542 void (*close)(struct trace_iterator *iter);
543 void (*pipe_close)(struct trace_iterator *iter);
544 ssize_t (*read)(struct trace_iterator *iter,
547 ssize_t (*splice_read)(struct trace_iterator *iter,
558 enum print_line_t (*print_line)(struct trace_iterator *iter);
578 trace_buffer_iter(struct trace_iterator *iter, int cpu) in trace_buffer_iter() argument
580 return iter->buffer_iter ? iter->buffer_iter[cpu] : NULL; in trace_buffer_iter()
617 struct trace_entry *trace_find_next_entry(struct trace_iterator *iter,
[all …]
Dtrace_branch.c140 static enum print_line_t trace_branch_print(struct trace_iterator *iter, in trace_branch_print() argument
145 trace_assign_type(field, iter->ent); in trace_branch_print()
147 trace_seq_printf(&iter->seq, "[%s] %s:%s:%d\n", in trace_branch_print()
153 return trace_handle_return(&iter->seq); in trace_branch_print()
/kernel/gcov/
Dfs.c113 struct gcov_iterator *iter; in gcov_iter_new() local
119 iter = kvmalloc(struct_size(iter, buffer, size), GFP_KERNEL); in gcov_iter_new()
120 if (!iter) in gcov_iter_new()
123 iter->info = info; in gcov_iter_new()
124 iter->size = size; in gcov_iter_new()
125 convert_to_gcda(iter->buffer, info); in gcov_iter_new()
127 return iter; in gcov_iter_new()
135 static void gcov_iter_free(struct gcov_iterator *iter) in gcov_iter_free() argument
137 kvfree(iter); in gcov_iter_free()
144 static struct gcov_info *gcov_iter_get_info(struct gcov_iterator *iter) in gcov_iter_get_info() argument
[all …]
/kernel/time/
Dtimer_list.c286 struct timer_list_iter *iter = v; in timer_list_show() local
288 if (iter->cpu == -1 && !iter->second_pass) in timer_list_show()
289 timer_list_header(m, iter->now); in timer_list_show()
290 else if (!iter->second_pass) in timer_list_show()
291 print_cpu(m, iter->cpu, iter->now); in timer_list_show()
293 else if (iter->cpu == -1 && iter->second_pass) in timer_list_show()
296 print_tickdevice(m, tick_get_device(iter->cpu), iter->cpu); in timer_list_show()
301 static void *move_iter(struct timer_list_iter *iter, loff_t offset) in move_iter() argument
304 iter->cpu = cpumask_next(iter->cpu, cpu_online_mask); in move_iter()
305 if (iter->cpu >= nr_cpu_ids) { in move_iter()
[all …]
/kernel/bpf/
Dinode.c189 static void map_iter_free(struct map_iter *iter) in map_iter_free() argument
191 if (iter) { in map_iter_free()
192 kfree(iter->key); in map_iter_free()
193 kfree(iter); in map_iter_free()
199 struct map_iter *iter; in map_iter_alloc() local
201 iter = kzalloc(sizeof(*iter), GFP_KERNEL | __GFP_NOWARN); in map_iter_alloc()
202 if (!iter) in map_iter_alloc()
205 iter->key = kzalloc(map->key_size, GFP_KERNEL | __GFP_NOWARN); in map_iter_alloc()
206 if (!iter->key) in map_iter_alloc()
209 return iter; in map_iter_alloc()
[all …]
Dbpf_iter.c342 struct bpf_iter_target_info *tinfo = NULL, *iter; in bpf_iter_prog_supported() local
351 list_for_each_entry(iter, &targets, list) { in bpf_iter_prog_supported()
352 if (iter->btf_id && iter->btf_id == prog_btf_id) { in bpf_iter_prog_supported()
353 tinfo = iter; in bpf_iter_prog_supported()
356 if (!strcmp(attach_fname + prefix_len, iter->reg_info->target)) { in bpf_iter_prog_supported()
357 cache_btf_id(iter, prog); in bpf_iter_prog_supported()
358 tinfo = iter; in bpf_iter_prog_supported()
459 char __user *ubuf = u64_to_user_ptr(info->iter.target_name); in bpf_iter_link_fill_link_info()
461 u32 ulen = info->iter.target_name_len; in bpf_iter_link_fill_link_info()
470 info->iter.target_name_len = target_len + 1; in bpf_iter_link_fill_link_info()
[all …]
/kernel/sched/
Drt.c565 #define for_each_rt_rq(rt_rq, iter, rq) \ argument
566 for (iter = container_of(&task_groups, typeof(*iter), list); \
567 (iter = next_task_group(iter)) && \
568 (rt_rq = iter->rt_rq[cpu_of(rq)]);)
672 #define for_each_rt_rq(rt_rq, iter, rq) \ argument
673 for ((void) iter, rt_rq = &rq->rt; rt_rq; rt_rq = NULL)
746 struct rt_rq *iter = sched_rt_period_rt_rq(rt_b, i); in do_balance_runtime() local
749 if (iter == rt_rq) in do_balance_runtime()
752 raw_spin_lock(&iter->rt_runtime_lock); in do_balance_runtime()
758 if (iter->rt_runtime == RUNTIME_INF) in do_balance_runtime()
[all …]
/kernel/locking/
Dlockdep_proc.c600 struct lock_stat_data *iter; in ls_start() local
605 iter = data->stats + (*pos - 1); in ls_start()
606 if (iter >= data->iter_end) in ls_start()
607 iter = NULL; in ls_start()
609 return iter; in ls_start()
650 struct lock_stat_data *iter = data->stats; in lock_stat_open() local
657 iter->class = class; in lock_stat_open()
658 iter->stats = lock_stats(class); in lock_stat_open()
659 iter++; in lock_stat_open()
662 data->iter_end = iter; in lock_stat_open()
/kernel/printk/
Dprintk.c3730 bool kmsg_dump_get_line(struct kmsg_dump_iter *iter, bool syslog, in kmsg_dump_get_line() argument
3740 if (iter->cur_seq < min_seq) in kmsg_dump_get_line()
3741 iter->cur_seq = min_seq; in kmsg_dump_get_line()
3747 if (!prb_read_valid(prb, iter->cur_seq, &r)) in kmsg_dump_get_line()
3751 if (!prb_read_valid_info(prb, iter->cur_seq, in kmsg_dump_get_line()
3760 iter->cur_seq = r.info->seq + 1; in kmsg_dump_get_line()
3788 bool kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog, in kmsg_dump_get_buffer() argument
3803 if (iter->cur_seq < min_seq) in kmsg_dump_get_buffer()
3804 iter->cur_seq = min_seq; in kmsg_dump_get_buffer()
3806 if (prb_read_valid_info(prb, iter->cur_seq, &info, NULL)) { in kmsg_dump_get_buffer()
[all …]

12