Lines Matching refs:tr

100 	struct trace_array *tr;  in ftrace_pids_enabled()  local
105 tr = ops->private; in ftrace_pids_enabled()
107 return tr->function_pids != NULL; in ftrace_pids_enabled()
147 struct trace_array *tr = op->private; in ftrace_pid_func() local
149 if (tr && this_cpu_read(tr->trace_buffer.data->ftrace_ignore_pid)) in ftrace_pid_func()
1029 struct trace_array *tr; member
1299 static int ftrace_add_mod(struct trace_array *tr, in ftrace_add_mod() argument
1304 struct list_head *mod_head = enable ? &tr->mod_trace : &tr->mod_notrace; in ftrace_add_mod()
3061 struct trace_array *tr; member
3072 struct trace_array *tr = iter->ops->private; in t_probe_next() local
3083 if (!tr) in t_probe_next()
3086 func_probes = &tr->func_probes; in t_probe_next()
3203 struct trace_array *tr = iter->tr; in t_mod_next() local
3210 if (iter->mod_list == &tr->mod_trace || in t_mod_next()
3211 iter->mod_list == &tr->mod_notrace) { in t_mod_next()
3233 if (!iter->tr) in t_mod_start()
3256 struct trace_array *tr = iter->tr; in t_mod_show() local
3259 iter->mod_list == &tr->mod_trace || in t_mod_show()
3260 iter->mod_list == &tr->mod_notrace) in t_mod_show()
3557 struct trace_array *tr = ops->private; in ftrace_regex_open() local
3565 if (tracing_check_open_get_tr(tr)) in ftrace_regex_open()
3577 iter->tr = tr; in ftrace_regex_open()
3583 mod_head = tr ? &tr->mod_notrace : NULL; in ftrace_regex_open()
3586 mod_head = tr ? &tr->mod_trace : NULL; in ftrace_regex_open()
3631 if (tr) in ftrace_regex_open()
3632 trace_array_put(tr); in ftrace_regex_open()
3926 static int cache_mod(struct trace_array *tr, in cache_mod() argument
3930 struct list_head *head = enable ? &tr->mod_trace : &tr->mod_notrace; in cache_mod()
3963 ret = ftrace_add_mod(tr, func, module, enable); in cache_mod()
4047 struct trace_array *tr; in process_cached_mods() local
4055 list_for_each_entry(tr, &ftrace_trace_arrays, list) { in process_cached_mods()
4056 if (!list_empty(&tr->mod_trace)) in process_cached_mods()
4057 process_mod_list(&tr->mod_trace, tr->ops, mod, true); in process_cached_mods()
4058 if (!list_empty(&tr->mod_notrace)) in process_cached_mods()
4059 process_mod_list(&tr->mod_notrace, tr->ops, mod, false); in process_cached_mods()
4073 ftrace_mod_callback(struct trace_array *tr, struct ftrace_hash *hash, in ftrace_mod_callback() argument
4095 return cache_mod(tr, func_orig, module, enable); in ftrace_mod_callback()
4127 probe_ops->func(ip, parent_ip, probe->tr, probe_ops, probe->data); in function_trace_probe_call()
4293 probe_ops->free(probe_ops, probe->tr, 0, probe->data); in release_probe()
4310 register_ftrace_function_probe(char *glob, struct trace_array *tr, in register_ftrace_function_probe() argument
4324 if (WARN_ON(!tr)) in register_ftrace_function_probe()
4334 list_for_each_entry(probe, &tr->func_probes, list) { in register_ftrace_function_probe()
4338 if (&probe->list == &tr->func_probes) { in register_ftrace_function_probe()
4346 probe->tr = tr; in register_ftrace_function_probe()
4348 list_add(&probe->list, &tr->func_probes); in register_ftrace_function_probe()
4390 ret = probe_ops->init(probe_ops, tr, in register_ftrace_function_probe()
4395 probe_ops->free(probe_ops, tr, in register_ftrace_function_probe()
4446 probe_ops->free(probe_ops, tr, entry->ip, probe->data); in register_ftrace_function_probe()
4453 unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr, in unregister_ftrace_function_probe_func() argument
4486 list_for_each_entry(probe, &tr->func_probes, list) { in unregister_ftrace_function_probe_func()
4490 if (&probe->list == &tr->func_probes) in unregister_ftrace_function_probe_func()
4563 probe_ops->free(probe_ops, tr, entry->ip, probe->data); in unregister_ftrace_function_probe_func()
4581 void clear_ftrace_function_probes(struct trace_array *tr) in clear_ftrace_function_probes() argument
4585 list_for_each_entry_safe(probe, n, &tr->func_probes, list) in clear_ftrace_function_probes()
4586 unregister_ftrace_function_probe_func(NULL, tr, probe->probe_ops); in clear_ftrace_function_probes()
4642 struct trace_array *tr = iter->ops->private; in ftrace_process_regex() local
4665 ret = p->func(tr, hash, func, command, next, enable); in ftrace_process_regex()
5048 if (iter->tr && !list_empty(&iter->tr->mod_trace)) in ftrace_regex_release()
5064 if (iter->tr) in ftrace_regex_release()
5065 trace_array_put(iter->tr); in ftrace_regex_release()
5728 struct trace_array *tr; in clear_mod_from_hashes() local
5731 list_for_each_entry(tr, &ftrace_trace_arrays, list) { in clear_mod_from_hashes()
5732 if (!tr->ops || !tr->ops->func_hash) in clear_mod_from_hashes()
5734 mutex_lock(&tr->ops->func_hash->regex_lock); in clear_mod_from_hashes()
5735 clear_mod_from_hash(pg, tr->ops->func_hash->filter_hash); in clear_mod_from_hashes()
5736 clear_mod_from_hash(pg, tr->ops->func_hash->notrace_hash); in clear_mod_from_hashes()
5737 mutex_unlock(&tr->ops->func_hash->regex_lock); in clear_mod_from_hashes()
6082 struct trace_array *tr; in clear_func_from_hashes() local
6085 list_for_each_entry(tr, &ftrace_trace_arrays, list) { in clear_func_from_hashes()
6086 if (!tr->ops || !tr->ops->func_hash) in clear_func_from_hashes()
6088 mutex_lock(&tr->ops->func_hash->regex_lock); in clear_func_from_hashes()
6089 clear_func_from_hash(func, tr->ops->func_hash->filter_hash); in clear_func_from_hashes()
6090 clear_func_from_hash(func, tr->ops->func_hash->notrace_hash); in clear_func_from_hashes()
6091 mutex_unlock(&tr->ops->func_hash->regex_lock); in clear_func_from_hashes()
6234 void ftrace_init_trace_array(struct trace_array *tr) in ftrace_init_trace_array() argument
6236 INIT_LIST_HEAD(&tr->func_probes); in ftrace_init_trace_array()
6237 INIT_LIST_HEAD(&tr->mod_trace); in ftrace_init_trace_array()
6238 INIT_LIST_HEAD(&tr->mod_notrace); in ftrace_init_trace_array()
6269 __init void ftrace_init_global_array_ops(struct trace_array *tr) in ftrace_init_global_array_ops() argument
6271 tr->ops = &global_ops; in ftrace_init_global_array_ops()
6272 tr->ops->private = tr; in ftrace_init_global_array_ops()
6273 ftrace_init_trace_array(tr); in ftrace_init_global_array_ops()
6276 void ftrace_init_array_ops(struct trace_array *tr, ftrace_func_t func) in ftrace_init_array_ops() argument
6279 if (tr->flags & TRACE_ARRAY_FL_GLOBAL) { in ftrace_init_array_ops()
6280 if (WARN_ON(tr->ops->func != ftrace_stub)) in ftrace_init_array_ops()
6282 tr->ops->func); in ftrace_init_array_ops()
6284 tr->ops->func = func; in ftrace_init_array_ops()
6285 tr->ops->private = tr; in ftrace_init_array_ops()
6288 void ftrace_reset_array_ops(struct trace_array *tr) in ftrace_reset_array_ops() argument
6290 tr->ops->func = ftrace_stub; in ftrace_reset_array_ops()
6419 struct trace_array *tr = data; in ftrace_filter_pid_sched_switch_probe() local
6422 pid_list = rcu_dereference_sched(tr->function_pids); in ftrace_filter_pid_sched_switch_probe()
6424 this_cpu_write(tr->trace_buffer.data->ftrace_ignore_pid, in ftrace_filter_pid_sched_switch_probe()
6434 struct trace_array *tr = data; in ftrace_pid_follow_sched_process_fork() local
6436 pid_list = rcu_dereference_sched(tr->function_pids); in ftrace_pid_follow_sched_process_fork()
6444 struct trace_array *tr = data; in ftrace_pid_follow_sched_process_exit() local
6446 pid_list = rcu_dereference_sched(tr->function_pids); in ftrace_pid_follow_sched_process_exit()
6450 void ftrace_pid_follow_fork(struct trace_array *tr, bool enable) in ftrace_pid_follow_fork() argument
6454 tr); in ftrace_pid_follow_fork()
6456 tr); in ftrace_pid_follow_fork()
6459 tr); in ftrace_pid_follow_fork()
6461 tr); in ftrace_pid_follow_fork()
6465 static void clear_ftrace_pids(struct trace_array *tr) in clear_ftrace_pids() argument
6470 pid_list = rcu_dereference_protected(tr->function_pids, in clear_ftrace_pids()
6475 unregister_trace_sched_switch(ftrace_filter_pid_sched_switch_probe, tr); in clear_ftrace_pids()
6478 per_cpu_ptr(tr->trace_buffer.data, cpu)->ftrace_ignore_pid = false; in clear_ftrace_pids()
6480 rcu_assign_pointer(tr->function_pids, NULL); in clear_ftrace_pids()
6488 void ftrace_clear_pids(struct trace_array *tr) in ftrace_clear_pids() argument
6492 clear_ftrace_pids(tr); in ftrace_clear_pids()
6497 static void ftrace_pid_reset(struct trace_array *tr) in ftrace_pid_reset() argument
6500 clear_ftrace_pids(tr); in ftrace_pid_reset()
6515 struct trace_array *tr = m->private; in fpid_start() local
6520 pid_list = rcu_dereference_sched(tr->function_pids); in fpid_start()
6530 struct trace_array *tr = m->private; in fpid_next() local
6531 struct trace_pid_list *pid_list = rcu_dereference_sched(tr->function_pids); in fpid_next()
6566 struct trace_array *tr = inode->i_private; in ftrace_pid_open() local
6570 ret = tracing_check_open_get_tr(tr); in ftrace_pid_open()
6576 ftrace_pid_reset(tr); in ftrace_pid_open()
6580 trace_array_put(tr); in ftrace_pid_open()
6584 m->private = tr; in ftrace_pid_open()
6592 struct trace_array *tr = data; in ignore_task_cpu() local
6599 pid_list = rcu_dereference_protected(tr->function_pids, in ignore_task_cpu()
6602 this_cpu_write(tr->trace_buffer.data->ftrace_ignore_pid, in ignore_task_cpu()
6611 struct trace_array *tr = m->private; in ftrace_pid_write() local
6621 filtered_pids = rcu_dereference_protected(tr->function_pids, in ftrace_pid_write()
6628 rcu_assign_pointer(tr->function_pids, pid_list); in ftrace_pid_write()
6635 register_trace_sched_switch(ftrace_filter_pid_sched_switch_probe, tr); in ftrace_pid_write()
6643 on_each_cpu(ignore_task_cpu, tr, 1); in ftrace_pid_write()
6659 struct trace_array *tr = inode->i_private; in ftrace_pid_release() local
6661 trace_array_put(tr); in ftrace_pid_release()
6674 void ftrace_init_tracefs(struct trace_array *tr, struct dentry *d_tracer) in ftrace_init_tracefs() argument
6677 tr, &ftrace_pid_fops); in ftrace_init_tracefs()
6680 void __init ftrace_init_tracefs_toplevel(struct trace_array *tr, in ftrace_init_tracefs_toplevel() argument
6684 WARN_ON(!(tr->flags & TRACE_ARRAY_FL_GLOBAL)); in ftrace_init_tracefs_toplevel()