/kernel/bpf/ |
D | trampoline.c | 34 static int bpf_trampoline_update(struct bpf_trampoline *tr, bool lock_direct_mutex); 38 struct bpf_trampoline *tr = ops->private; in bpf_tramp_ftrace_ops_func() local 45 lockdep_assert_held_once(&tr->mutex); in bpf_tramp_ftrace_ops_func() 52 if ((tr->flags & BPF_TRAMP_F_CALL_ORIG) && in bpf_tramp_ftrace_ops_func() 53 !(tr->flags & BPF_TRAMP_F_ORIG_STACK)) { in bpf_tramp_ftrace_ops_func() 54 if (WARN_ON_ONCE(tr->flags & BPF_TRAMP_F_SHARE_IPMODIFY)) in bpf_tramp_ftrace_ops_func() 57 tr->flags |= BPF_TRAMP_F_SHARE_IPMODIFY; in bpf_tramp_ftrace_ops_func() 76 if (!mutex_trylock(&tr->mutex)) { in bpf_tramp_ftrace_ops_func() 86 tr->flags |= BPF_TRAMP_F_SHARE_IPMODIFY; in bpf_tramp_ftrace_ops_func() 88 if ((tr->flags & BPF_TRAMP_F_CALL_ORIG) && in bpf_tramp_ftrace_ops_func() [all …]
|
/kernel/trace/ |
D | trace_irqsoff.c | 40 static void stop_irqsoff_tracer(struct trace_array *tr, int graph); 41 static int start_irqsoff_tracer(struct trace_array *tr, int graph); 65 static int irqsoff_display_graph(struct trace_array *tr, int set); 66 # define is_graph(tr) ((tr)->trace_flags & TRACE_ITER_DISPLAY_GRAPH) argument 68 static inline int irqsoff_display_graph(struct trace_array *tr, int set) in irqsoff_display_graph() argument 72 # define is_graph(tr) false argument 99 static int func_prolog_dec(struct trace_array *tr, in func_prolog_dec() argument 125 *data = per_cpu_ptr(tr->array_buffer.data, cpu); in func_prolog_dec() 143 struct trace_array *tr = irqsoff_trace; in irqsoff_tracer_call() local 148 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_tracer_call() [all …]
|
D | trace_functions.c | 22 static void tracing_start_function_trace(struct trace_array *tr); 23 static void tracing_stop_function_trace(struct trace_array *tr); 52 int ftrace_allocate_ftrace_ops(struct trace_array *tr) in ftrace_allocate_ftrace_ops() argument 57 if (tr->flags & TRACE_ARRAY_FL_GLOBAL) in ftrace_allocate_ftrace_ops() 68 tr->ops = ops; in ftrace_allocate_ftrace_ops() 69 ops->private = tr; in ftrace_allocate_ftrace_ops() 74 void ftrace_free_ftrace_ops(struct trace_array *tr) in ftrace_free_ftrace_ops() argument 76 kfree(tr->ops); in ftrace_free_ftrace_ops() 77 tr->ops = NULL; in ftrace_free_ftrace_ops() 80 int ftrace_create_function_files(struct trace_array *tr, in ftrace_create_function_files() argument [all …]
|
D | trace_sched_wakeup.c | 36 static void wakeup_reset(struct trace_array *tr); 37 static void __wakeup_reset(struct trace_array *tr); 38 static int start_func_tracer(struct trace_array *tr, int graph); 39 static void stop_func_tracer(struct trace_array *tr, int graph); 44 # define is_graph(tr) ((tr)->trace_flags & TRACE_ITER_DISPLAY_GRAPH) argument 46 # define is_graph(tr) false argument 68 func_prolog_preempt_disable(struct trace_array *tr, in func_prolog_preempt_disable() argument 85 *data = per_cpu_ptr(tr->array_buffer.data, cpu); in func_prolog_preempt_disable() 102 static int wakeup_display_graph(struct trace_array *tr, int set) in wakeup_display_graph() argument 104 if (!(is_graph(tr) ^ set)) in wakeup_display_graph() [all …]
|
D | trace.c | 101 dummy_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set) in dummy_set_flag() argument 180 int tracing_set_tracer(struct trace_array *tr, const char *buf); 181 static void ftrace_trace_userstack(struct trace_array *tr, 459 struct trace_array *tr; in trace_array_get() local 463 list_for_each_entry(tr, &ftrace_trace_arrays, list) { in trace_array_get() 464 if (tr == this_tr) { in trace_array_get() 465 tr->ref++; in trace_array_get() 501 int tracing_check_open_get_tr(struct trace_array *tr) in tracing_check_open_get_tr() argument 512 if (tr && trace_array_get(tr) < 0) in tracing_check_open_get_tr() 916 static inline void ftrace_trace_stack(struct trace_array *tr, [all …]
|
D | trace_selftest.c | 70 arch_spin_lock(&buf->tr->max_lock); in trace_test_buffer() 88 arch_spin_unlock(&buf->tr->max_lock); in trace_test_buffer() 182 static int trace_selftest_ops(struct trace_array *tr, int cnt) in trace_selftest_ops() argument 219 ftrace_init_array_ops(tr, trace_selftest_test_global_func); in trace_selftest_ops() 220 register_ftrace_function(tr->ops); in trace_selftest_ops() 335 unregister_ftrace_function(tr->ops); in trace_selftest_ops() 336 ftrace_reset_array_ops(tr); in trace_selftest_ops() 357 struct trace_array *tr, in trace_selftest_startup_dynamic_tracing() argument 386 ret = tracer_init(trace, tr); in trace_selftest_startup_dynamic_tracing() 396 ret = trace_test_buffer(&tr->array_buffer, &count); in trace_selftest_startup_dynamic_tracing() [all …]
|
D | trace_events.c | 72 #define do_for_each_event_file(tr, file) \ argument 73 list_for_each_entry(tr, &ftrace_trace_arrays, list) { \ 74 list_for_each_entry(file, &tr->events, list) 76 #define do_for_each_event_file_safe(tr, file) \ argument 77 list_for_each_entry(tr, &ftrace_trace_arrays, list) { \ 79 list_for_each_entry_safe(file, ___n, &tr->events, list) 476 struct trace_array *tr = trace_file->tr; in trace_event_ignore_this_pid() local 481 pid_list = rcu_dereference_raw(tr->filtered_pids); in trace_event_ignore_this_pid() 482 no_pid_list = rcu_dereference_raw(tr->filtered_no_pids); in trace_event_ignore_this_pid() 487 data = this_cpu_ptr(tr->array_buffer.data); in trace_event_ignore_this_pid() [all …]
|
D | trace.h | 190 struct trace_array *tr; member 237 typedef bool (*cond_update_fn_t)(struct trace_array *tr, void *cond_data); 400 extern int trace_array_get(struct trace_array *tr); 401 extern int tracing_check_open_get_tr(struct trace_array *tr); 406 extern int tracing_set_filter_buffering(struct trace_array *tr, bool set); 407 extern int tracing_set_clock(struct trace_array *tr, const char *clockstr); 409 extern bool trace_clock_in_ns(struct trace_array *tr); 417 struct trace_array *tr; in top_trace_array() local 422 tr = list_entry(ftrace_trace_arrays.prev, in top_trace_array() 423 typeof(*tr), list); in top_trace_array() [all …]
|
D | trace_boot.c | 25 trace_boot_set_instance_options(struct trace_array *tr, struct xbc_node *node) in trace_boot_set_instance_options() argument 39 if (trace_set_options(tr, buf) < 0) in trace_boot_set_instance_options() 48 tracer_tracing_on(tr); in trace_boot_set_instance_options() 50 tracer_tracing_off(tr); in trace_boot_set_instance_options() 55 if (tracing_set_clock(tr, p) < 0) in trace_boot_set_instance_options() 64 if (tracing_resize_ring_buffer(tr, v, RING_BUFFER_ALL_CPUS) < 0) in trace_boot_set_instance_options() 74 tracing_set_cpumask(tr, new_mask) < 0) in trace_boot_set_instance_options() 83 trace_boot_enable_events(struct trace_array *tr, struct xbc_node *node) in trace_boot_enable_events() argument 95 if (ftrace_set_clr_event(tr, buf, 1) < 0) in trace_boot_enable_events() 462 trace_boot_init_one_event(struct trace_array *tr, struct xbc_node *gnode, in trace_boot_init_one_event() argument [all …]
|
D | trace_functions_graph.c | 94 print_graph_duration(struct trace_array *tr, unsigned long long duration, 97 int __trace_graph_entry(struct trace_array *tr, in __trace_graph_entry() argument 103 struct trace_buffer *buffer = tr->array_buffer.buffer; in __trace_graph_entry() 128 struct trace_array *tr = graph_array; in trace_graph_entry() local 155 if (!ftrace_trace_task(tr)) in trace_graph_entry() 173 data = per_cpu_ptr(tr->array_buffer.data, cpu); in trace_graph_entry() 177 ret = __trace_graph_entry(tr, trace, trace_ctx); in trace_graph_entry() 189 __trace_graph_function(struct trace_array *tr, in __trace_graph_function() argument 204 __trace_graph_entry(tr, &ent, trace_ctx); in __trace_graph_function() 205 __trace_graph_return(tr, &ret, trace_ctx); in __trace_graph_function() [all …]
|
D | trace_hwlat.c | 132 struct trace_array *tr = hwlat_trace; in trace_hwlat_sample() local 134 struct trace_buffer *buffer = tr->array_buffer.buffer; in trace_hwlat_sample() 189 struct trace_array *tr = hwlat_trace; \ 191 trace_array_printk_buf(tr->array_buffer.buffer, _THIS_IP_, msg); \ 204 struct trace_array *tr = hwlat_trace; in get_sample() local 302 if (latency > tr->max_latency) { in get_sample() 303 tr->max_latency = latency; in get_sample() 304 latency_fsnotify(tr); in get_sample() 317 struct trace_array *tr = hwlat_trace; in move_to_next_cpu() local 329 cpumask_and(current_mask, cpu_online_mask, tr->tracing_cpumask); in move_to_next_cpu() [all …]
|
D | trace_mmiotrace.c | 28 static void mmio_reset_data(struct trace_array *tr) in mmio_reset_data() argument 33 tracing_reset_online_cpus(&tr->array_buffer); in mmio_reset_data() 36 static int mmio_trace_init(struct trace_array *tr) in mmio_trace_init() argument 39 mmio_trace_array = tr; in mmio_trace_init() 41 mmio_reset_data(tr); in mmio_trace_init() 46 static void mmio_trace_reset(struct trace_array *tr) in mmio_trace_reset() argument 51 mmio_reset_data(tr); in mmio_trace_reset() 55 static void mmio_trace_start(struct trace_array *tr) in mmio_trace_start() argument 58 mmio_reset_data(tr); in mmio_trace_start() 293 static void __trace_mmiotrace_rw(struct trace_array *tr, in __trace_mmiotrace_rw() argument [all …]
|
D | trace_syscalls.c | 130 struct trace_array *tr = iter->tr; in print_syscall_enter() local 157 if (tr && tr->trace_flags & TRACE_ITER_VERBOSE) in print_syscall_enter() 293 struct trace_array *tr = data; in ftrace_syscall_enter() local 307 trace_file = rcu_dereference_sched(tr->enter_syscall_files[syscall_nr]); in ftrace_syscall_enter() 334 struct trace_array *tr = data; in ftrace_syscall_exit() local 346 trace_file = rcu_dereference_sched(tr->exit_syscall_files[syscall_nr]); in ftrace_syscall_exit() 371 struct trace_array *tr = file->tr; in reg_event_syscall_enter() local 379 if (!tr->sys_refcount_enter) in reg_event_syscall_enter() 380 ret = register_trace_sys_enter(ftrace_syscall_enter, tr); in reg_event_syscall_enter() 382 rcu_assign_pointer(tr->enter_syscall_files[num], file); in reg_event_syscall_enter() [all …]
|
D | trace_nop.c | 37 static void start_nop_trace(struct trace_array *tr) in start_nop_trace() argument 42 static void stop_nop_trace(struct trace_array *tr) in stop_nop_trace() argument 47 static int nop_trace_init(struct trace_array *tr) in nop_trace_init() argument 49 ctx_trace = tr; in nop_trace_init() 50 start_nop_trace(tr); in nop_trace_init() 54 static void nop_trace_reset(struct trace_array *tr) in nop_trace_reset() argument 56 stop_nop_trace(tr); in nop_trace_reset() 64 static int nop_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set) in nop_set_flag() argument
|
D | trace_osnoise.c | 56 struct trace_array *tr; member 71 static int osnoise_instance_registered(struct trace_array *tr) in osnoise_instance_registered() argument 78 if (inst->tr == tr) in osnoise_instance_registered() 92 static int osnoise_register_instance(struct trace_array *tr) in osnoise_register_instance() argument 107 inst->tr = tr; in osnoise_register_instance() 119 static void osnoise_unregister_instance(struct trace_array *tr) in osnoise_unregister_instance() argument 130 if (inst->tr == tr) { in osnoise_unregister_instance() 459 buffer = inst->tr->array_buffer.buffer; \ 504 buffer = inst->tr->array_buffer.buffer; in trace_osnoise_sample() 578 buffer = inst->tr->array_buffer.buffer; in trace_timerlat_sample() [all …]
|
D | ftrace.c | 100 struct trace_array *tr; in ftrace_pids_enabled() local 105 tr = ops->private; in ftrace_pids_enabled() 107 return tr->function_pids != NULL || tr->function_no_pids != NULL; in ftrace_pids_enabled() 142 struct trace_array *tr = op->private; in ftrace_pid_func() local 145 if (tr) { in ftrace_pid_func() 146 pid = this_cpu_read(tr->array_buffer.data->ftrace_ignore_pid); in ftrace_pid_func() 1015 struct trace_array *tr; member 1286 static int ftrace_add_mod(struct trace_array *tr, in ftrace_add_mod() argument 1291 struct list_head *mod_head = enable ? &tr->mod_trace : &tr->mod_notrace; in ftrace_add_mod() 3288 struct trace_array *tr; member [all …]
|
D | synth_event_gen_test.c | 104 ret = trace_array_set_clr_event(gen_synth_test->tr, in test_gen_synth_cmd() 209 ret = trace_array_set_clr_event(empty_synth_test->tr, in test_empty_synth_event() 281 ret = trace_array_set_clr_event(create_synth_test->tr, in test_create_synth_event() 448 WARN_ON(trace_array_set_clr_event(gen_synth_test->tr, in synth_event_gen_test_init() 458 WARN_ON(trace_array_set_clr_event(gen_synth_test->tr, in synth_event_gen_test_init() 464 WARN_ON(trace_array_set_clr_event(empty_synth_test->tr, in synth_event_gen_test_init() 482 trace_array_set_clr_event(gen_synth_test->tr, in synth_event_gen_test_init() 485 trace_array_set_clr_event(empty_synth_test->tr, in synth_event_gen_test_init() 488 trace_array_set_clr_event(create_synth_test->tr, in synth_event_gen_test_init() 498 WARN_ON(trace_array_set_clr_event(gen_synth_test->tr, in synth_event_gen_test_exit() [all …]
|
D | trace_events_hist.c | 805 static void hist_err(struct trace_array *tr, u8 err_type, u16 err_pos) in hist_err() argument 810 tracing_log_err(tr, last_cmd_loc, last_cmd, err_text, in hist_err() 871 struct trace_array *tr = hist_data->event_file->tr; in hist_field_timestamp() local 875 if (hist_data->attrs->ts_in_usecs && trace_clock_in_ns(tr)) in hist_field_timestamp() 962 struct trace_array *tr = hist_data->event_file->tr; in find_any_var_ref() local 966 list_for_each_entry(var_data, &tr->hist_vars, list) { in find_any_var_ref() 1011 struct trace_array *tr = hist_data->event_file->tr; in find_hist_vars() local 1014 list_for_each_entry(var_data, &tr->hist_vars, list) { in find_hist_vars() 1066 struct trace_array *tr = hist_data->event_file->tr; in save_hist_vars() local 1073 if (tracing_check_open_get_tr(tr)) in save_hist_vars() [all …]
|
D | trace_kdb.c | 25 struct trace_array *tr; in ftrace_dump_buf() local 29 tr = iter.tr; in ftrace_dump_buf() 31 old_userobj = tr->trace_flags; in ftrace_dump_buf() 34 tr->trace_flags &= ~TRACE_ITER_SYM_USEROBJ; in ftrace_dump_buf() 82 tr->trace_flags = old_userobj; in ftrace_dump_buf()
|
D | trace_branch.c | 34 struct trace_array *tr = branch_tracer; in probe_likely_condition() local 53 if (unlikely(!tr)) in probe_likely_condition() 58 data = this_cpu_ptr(tr->array_buffer.data); in probe_likely_condition() 63 buffer = tr->array_buffer.buffer; in probe_likely_condition() 102 int enable_branch_tracing(struct trace_array *tr) in enable_branch_tracing() argument 105 branch_tracer = tr; in enable_branch_tracing() 130 static int branch_trace_init(struct trace_array *tr) in branch_trace_init() argument 132 return enable_branch_tracing(tr); in branch_trace_init() 135 static void branch_trace_reset(struct trace_array *tr) in branch_trace_reset() argument
|
D | kprobe_event_gen_test.c | 136 ret = trace_array_set_clr_event(gen_kprobe_test->tr, in test_gen_kprobe_cmd() 201 ret = trace_array_set_clr_event(gen_kretprobe_test->tr, in test_gen_kretprobe_cmd() 229 WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr, in kprobe_event_gen_test_init() 244 WARN_ON(trace_array_set_clr_event(gen_kprobe_test->tr, in kprobe_event_gen_test_exit() 258 WARN_ON(trace_array_set_clr_event(gen_kretprobe_test->tr, in kprobe_event_gen_test_exit()
|
D | trace_events_trigger.c | 505 clear_event_triggers(struct trace_array *tr) in clear_event_triggers() argument 509 list_for_each_entry(file, &tr->events, list) { in clear_event_triggers() 1069 ret = create_event_filter(file->tr, file->event_call, in set_trigger_filter() 1258 if (tracer_tracing_is_on(file->tr)) in traceon_trigger() 1261 tracer_tracing_on(file->tr); in traceon_trigger() 1279 if (tracer_tracing_is_on(file->tr)) in traceon_count_trigger() 1293 tracer_tracing_on(file->tr); in traceon_count_trigger() 1306 if (!tracer_tracing_is_on(file->tr)) in traceoff_trigger() 1309 tracer_tracing_off(file->tr); in traceoff_trigger() 1327 if (!tracer_tracing_is_on(file->tr)) in traceoff_count_trigger() [all …]
|
D | trace_events_filter.c | 1071 static void append_filter_err(struct trace_array *tr, in append_filter_err() argument 1100 tracing_log_err(tr, "event filter parse error", in append_filter_err() 1105 tracing_log_err(tr, "event filter parse error", in append_filter_err() 1194 struct trace_array *tr) in filter_free_subsystem_preds() argument 1198 list_for_each_entry(file, &tr->events, list) { in filter_free_subsystem_preds() 1212 struct trace_array *tr) in filter_free_subsystem_filters() argument 1216 list_for_each_entry(file, &tr->events, list) { in filter_free_subsystem_filters() 1788 struct trace_array *tr, in process_system_preds() argument 1800 list_for_each_entry(file, &tr->events, list) { in process_system_preds() 1817 append_filter_err(tr, pe, filter); in process_system_preds() [all …]
|
D | trace_output.c | 548 struct trace_array *tr = iter->tr; in lat_print_timestamp() local 549 unsigned long verbose = tr->trace_flags & TRACE_ITER_VERBOSE; in lat_print_timestamp() 607 struct trace_array *tr = iter->tr; in trace_print_context() local 616 if (tr->trace_flags & TRACE_ITER_RECORD_TGID) { in trace_print_context() 627 if (tr->trace_flags & TRACE_ITER_IRQ_INFO) in trace_print_context() 639 struct trace_array *tr = iter->tr; in trace_print_lat_context() local 641 unsigned long verbose = (tr->trace_flags & TRACE_ITER_VERBOSE); in trace_print_lat_context() 1125 struct trace_array *tr = iter->tr; in trace_user_stack_print() local 1135 if (tr->trace_flags & TRACE_ITER_SYM_USEROBJ) { in trace_user_stack_print()
|
D | trace_eprobe.c | 652 ret = create_event_filter(file->tr, ep->event, in new_eprobe_trigger() 676 struct trace_array *tr = eprobe_file->tr; in enable_eprobe() local 678 file = find_event_file(tr, ep->event_system, ep->event_name); in enable_eprobe() 698 struct trace_array *tr) in disable_eprobe() argument 705 file = find_event_file(tr, ep->event_system, ep->event_name); in disable_eprobe() 784 disable_eprobe(ep, file->tr); in enable_trace_eprobe() 820 disable_eprobe(ep, file->tr); in disable_trace_eprobe()
|