Lines Matching refs:ops

106 static void ftrace_update_trampoline(struct ftrace_ops *ops);
154 static inline void ftrace_ops_init(struct ftrace_ops *ops) in ftrace_ops_init() argument
157 if (!(ops->flags & FTRACE_OPS_FL_INITIALIZED)) { in ftrace_ops_init()
158 mutex_init(&ops->local_hash.regex_lock); in ftrace_ops_init()
159 ops->func_hash = &ops->local_hash; in ftrace_ops_init()
160 ops->flags |= FTRACE_OPS_FL_INITIALIZED; in ftrace_ops_init()
172 struct ftrace_ops *ops; in ftrace_nr_registered_ops() local
177 for (ops = ftrace_ops_list; in ftrace_nr_registered_ops()
178 ops != &ftrace_list_end; ops = ops->next) in ftrace_nr_registered_ops()
206 static void control_ops_disable_all(struct ftrace_ops *ops) in control_ops_disable_all() argument
211 *per_cpu_ptr(ops->disabled, cpu) = 1; in control_ops_disable_all()
214 static int control_ops_alloc(struct ftrace_ops *ops) in control_ops_alloc() argument
222 ops->disabled = disabled; in control_ops_alloc()
223 control_ops_disable_all(ops); in control_ops_alloc()
256 static ftrace_func_t ftrace_ops_get_list_func(struct ftrace_ops *ops) in ftrace_ops_get_list_func() argument
262 if (ops->flags & FTRACE_OPS_FL_DYNAMIC || FTRACE_FORCE_LIST_FUNC) in ftrace_ops_get_list_func()
265 return ftrace_ops_get_func(ops); in ftrace_ops_get_list_func()
350 static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) in add_ftrace_ops() argument
352 ops->next = *list; in add_ftrace_ops()
359 rcu_assign_pointer(*list, ops); in add_ftrace_ops()
362 static int remove_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) in remove_ftrace_ops() argument
370 if (*list == ops && ops->next == &ftrace_list_end) { in remove_ftrace_ops()
376 if (*p == ops) in remove_ftrace_ops()
379 if (*p != ops) in remove_ftrace_ops()
388 struct ftrace_ops *ops) in add_ftrace_list_ops() argument
391 add_ftrace_ops(list, ops); in add_ftrace_list_ops()
398 struct ftrace_ops *ops) in remove_ftrace_list_ops() argument
400 int ret = remove_ftrace_ops(list, ops); in remove_ftrace_list_ops()
406 static void ftrace_update_trampoline(struct ftrace_ops *ops);
408 static int __register_ftrace_function(struct ftrace_ops *ops) in __register_ftrace_function() argument
410 if (ops->flags & FTRACE_OPS_FL_DELETED) in __register_ftrace_function()
413 if (WARN_ON(ops->flags & FTRACE_OPS_FL_ENABLED)) in __register_ftrace_function()
422 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS && in __register_ftrace_function()
423 !(ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED)) in __register_ftrace_function()
426 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED) in __register_ftrace_function()
427 ops->flags |= FTRACE_OPS_FL_SAVE_REGS; in __register_ftrace_function()
430 if (!core_kernel_data((unsigned long)ops)) in __register_ftrace_function()
431 ops->flags |= FTRACE_OPS_FL_DYNAMIC; in __register_ftrace_function()
433 if (ops->flags & FTRACE_OPS_FL_CONTROL) { in __register_ftrace_function()
434 if (control_ops_alloc(ops)) in __register_ftrace_function()
436 add_ftrace_list_ops(&ftrace_control_list, &control_ops, ops); in __register_ftrace_function()
438 ops = &control_ops; in __register_ftrace_function()
440 add_ftrace_ops(&ftrace_ops_list, ops); in __register_ftrace_function()
443 ops->saved_func = ops->func; in __register_ftrace_function()
445 if (ops->flags & FTRACE_OPS_FL_PID && ftrace_pids_enabled()) in __register_ftrace_function()
446 ops->func = ftrace_pid_func; in __register_ftrace_function()
448 ftrace_update_trampoline(ops); in __register_ftrace_function()
456 static int __unregister_ftrace_function(struct ftrace_ops *ops) in __unregister_ftrace_function() argument
460 if (WARN_ON(!(ops->flags & FTRACE_OPS_FL_ENABLED))) in __unregister_ftrace_function()
463 if (ops->flags & FTRACE_OPS_FL_CONTROL) { in __unregister_ftrace_function()
465 &control_ops, ops); in __unregister_ftrace_function()
467 ret = remove_ftrace_ops(&ftrace_ops_list, ops); in __unregister_ftrace_function()
475 ops->func = ops->saved_func; in __unregister_ftrace_function()
873 struct ftrace_ops *ops, struct pt_regs *regs) in function_profile_call() argument
1126 struct ftrace_probe_ops *ops; member
1339 void ftrace_free_filter(struct ftrace_ops *ops) in ftrace_free_filter() argument
1341 ftrace_ops_init(ops); in ftrace_free_filter()
1342 free_ftrace_hash(ops->func_hash->filter_hash); in ftrace_free_filter()
1343 free_ftrace_hash(ops->func_hash->notrace_hash); in ftrace_free_filter()
1404 ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, int filter_hash);
1406 ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, int filter_hash);
1408 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,
1412 ftrace_hash_move(struct ftrace_ops *ops, int enable, in ftrace_hash_move() argument
1425 if (ops->flags & FTRACE_OPS_FL_IPMODIFY && !enable) in ftrace_hash_move()
1464 ret = ftrace_hash_ipmodify_update(ops, new_hash); in ftrace_hash_move()
1475 ftrace_hash_rec_disable_modify(ops, enable); in ftrace_hash_move()
1479 ftrace_hash_rec_enable_modify(ops, enable); in ftrace_hash_move()
1512 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
1523 if (regs == NULL && (ops->flags & FTRACE_OPS_FL_SAVE_REGS)) in ftrace_ops_test()
1527 hash.filter_hash = rcu_dereference_raw_notrace(ops->func_hash->filter_hash); in ftrace_ops_test()
1528 hash.notrace_hash = rcu_dereference_raw_notrace(ops->func_hash->notrace_hash); in ftrace_ops_test()
1625 struct ftrace_ops *ops; in test_rec_ops_needs_regs() local
1628 for (ops = ftrace_ops_list; in test_rec_ops_needs_regs()
1629 ops != &ftrace_list_end; ops = ops->next) { in test_rec_ops_needs_regs()
1631 if (ftrace_ops_test(ops, rec->ip, rec)) { in test_rec_ops_needs_regs()
1632 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in test_rec_ops_needs_regs()
1642 static void __ftrace_hash_rec_update(struct ftrace_ops *ops, in __ftrace_hash_rec_update() argument
1654 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in __ftrace_hash_rec_update()
1669 hash = ops->func_hash->filter_hash; in __ftrace_hash_rec_update()
1670 other_hash = ops->func_hash->notrace_hash; in __ftrace_hash_rec_update()
1675 hash = ops->func_hash->notrace_hash; in __ftrace_hash_rec_update()
1676 other_hash = ops->func_hash->filter_hash; in __ftrace_hash_rec_update()
1730 if (ftrace_rec_count(rec) == 1 && ops->trampoline) in __ftrace_hash_rec_update()
1745 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) in __ftrace_hash_rec_update()
1760 ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in __ftrace_hash_rec_update()
1788 static void ftrace_hash_rec_disable(struct ftrace_ops *ops, in ftrace_hash_rec_disable() argument
1791 __ftrace_hash_rec_update(ops, filter_hash, 0); in ftrace_hash_rec_disable()
1794 static void ftrace_hash_rec_enable(struct ftrace_ops *ops, in ftrace_hash_rec_enable() argument
1797 __ftrace_hash_rec_update(ops, filter_hash, 1); in ftrace_hash_rec_enable()
1800 static void ftrace_hash_rec_update_modify(struct ftrace_ops *ops, in ftrace_hash_rec_update_modify() argument
1805 __ftrace_hash_rec_update(ops, filter_hash, inc); in ftrace_hash_rec_update_modify()
1807 if (ops->func_hash != &global_ops.local_hash) in ftrace_hash_rec_update_modify()
1816 if (op == ops) in ftrace_hash_rec_update_modify()
1823 static void ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_disable_modify() argument
1826 ftrace_hash_rec_update_modify(ops, filter_hash, 0); in ftrace_hash_rec_disable_modify()
1829 static void ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_enable_modify() argument
1832 ftrace_hash_rec_update_modify(ops, filter_hash, 1); in ftrace_hash_rec_enable_modify()
1844 static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops, in __ftrace_hash_update_ipmodify() argument
1853 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in __ftrace_hash_update_ipmodify()
1856 if (!(ops->flags & FTRACE_OPS_FL_IPMODIFY)) in __ftrace_hash_update_ipmodify()
1908 static int ftrace_hash_ipmodify_enable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_enable() argument
1910 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_enable()
1915 return __ftrace_hash_update_ipmodify(ops, EMPTY_HASH, hash); in ftrace_hash_ipmodify_enable()
1919 static void ftrace_hash_ipmodify_disable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_disable() argument
1921 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_disable()
1926 __ftrace_hash_update_ipmodify(ops, hash, EMPTY_HASH); in ftrace_hash_ipmodify_disable()
1929 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops, in ftrace_hash_ipmodify_update() argument
1932 struct ftrace_hash *old_hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_update()
1940 return __ftrace_hash_update_ipmodify(ops, old_hash, new_hash); in ftrace_hash_ipmodify_update()
1996 struct ftrace_ops *ops = NULL; in ftrace_bug() local
2002 ops = ftrace_find_tramp_ops_any(rec); in ftrace_bug()
2003 if (ops) in ftrace_bug()
2005 (void *)ops->trampoline); in ftrace_bug()
2244 struct ftrace_ops *ops; in ftrace_get_addr_new() local
2248 ops = ftrace_find_tramp_ops_new(rec); in ftrace_get_addr_new()
2249 if (FTRACE_WARN_ON(!ops || !ops->trampoline)) { in ftrace_get_addr_new()
2255 return ops->trampoline; in ftrace_get_addr_new()
2276 struct ftrace_ops *ops; in ftrace_get_addr_curr() local
2280 ops = ftrace_find_tramp_ops_curr(rec); in ftrace_get_addr_curr()
2281 if (FTRACE_WARN_ON(!ops)) { in ftrace_get_addr_curr()
2287 return ops->trampoline; in ftrace_get_addr_curr()
2550 static void ftrace_run_modify_code(struct ftrace_ops *ops, int command, in ftrace_run_modify_code() argument
2553 ops->flags |= FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2554 ops->old_hash.filter_hash = old_hash->filter_hash; in ftrace_run_modify_code()
2555 ops->old_hash.notrace_hash = old_hash->notrace_hash; in ftrace_run_modify_code()
2557 ops->old_hash.filter_hash = NULL; in ftrace_run_modify_code()
2558 ops->old_hash.notrace_hash = NULL; in ftrace_run_modify_code()
2559 ops->flags &= ~FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2565 void __weak arch_ftrace_trampoline_free(struct ftrace_ops *ops) in arch_ftrace_trampoline_free() argument
2569 static void control_ops_free(struct ftrace_ops *ops) in control_ops_free() argument
2571 free_percpu(ops->disabled); in control_ops_free()
2594 static int ftrace_startup(struct ftrace_ops *ops, int command) in ftrace_startup() argument
2601 ret = __register_ftrace_function(ops); in ftrace_startup()
2616 ops->flags |= FTRACE_OPS_FL_ENABLED | FTRACE_OPS_FL_ADDING; in ftrace_startup()
2618 ret = ftrace_hash_ipmodify_enable(ops); in ftrace_startup()
2621 __unregister_ftrace_function(ops); in ftrace_startup()
2623 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_startup()
2627 ftrace_hash_rec_enable(ops, 1); in ftrace_startup()
2631 ops->flags &= ~FTRACE_OPS_FL_ADDING; in ftrace_startup()
2636 static int ftrace_shutdown(struct ftrace_ops *ops, int command) in ftrace_shutdown() argument
2643 ret = __unregister_ftrace_function(ops); in ftrace_shutdown()
2656 ftrace_hash_ipmodify_disable(ops); in ftrace_shutdown()
2657 ftrace_hash_rec_disable(ops, 1); in ftrace_shutdown()
2659 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_shutdown()
2675 if (ops->flags & FTRACE_OPS_FL_CONTROL) in ftrace_shutdown()
2676 control_ops_free(ops); in ftrace_shutdown()
2684 ops->flags |= FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2685 removed_ops = ops; in ftrace_shutdown()
2688 ops->old_hash.filter_hash = ops->func_hash->filter_hash; in ftrace_shutdown()
2689 ops->old_hash.notrace_hash = ops->func_hash->notrace_hash; in ftrace_shutdown()
2708 ops->old_hash.filter_hash = NULL; in ftrace_shutdown()
2709 ops->old_hash.notrace_hash = NULL; in ftrace_shutdown()
2712 ops->flags &= ~FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2728 if (ops->flags & (FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_CONTROL)) { in ftrace_shutdown()
2731 arch_ftrace_trampoline_free(ops); in ftrace_shutdown()
2733 if (ops->flags & FTRACE_OPS_FL_CONTROL) in ftrace_shutdown()
2734 control_ops_free(ops); in ftrace_shutdown()
2777 static inline int ops_traces_mod(struct ftrace_ops *ops) in ops_traces_mod() argument
2783 return ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_traces_mod()
2784 ftrace_hash_empty(ops->func_hash->notrace_hash); in ops_traces_mod()
2795 ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec) in ops_references_rec() argument
2798 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in ops_references_rec()
2802 if (ops_traces_mod(ops)) in ops_references_rec()
2806 if (!ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_references_rec()
2807 !ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip)) in ops_references_rec()
2811 if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) in ops_references_rec()
2819 struct ftrace_ops *ops; in referenced_filters() local
2822 for (ops = ftrace_ops_list; ops != &ftrace_list_end; ops = ops->next) { in referenced_filters()
2823 if (ops_references_rec(ops, rec)) in referenced_filters()
2847 struct ftrace_ops *ops; in ftrace_update_code() local
2849 for (ops = ftrace_ops_list; in ftrace_update_code()
2850 ops != &ftrace_list_end; ops = ops->next) { in ftrace_update_code()
2851 if (ops->flags & FTRACE_OPS_FL_ENABLED) { in ftrace_update_code()
2852 if (ops_traces_mod(ops)) in ftrace_update_code()
3007 struct ftrace_ops *ops; member
3091 if (rec->ops->print) in t_hash_show()
3092 return rec->ops->print(m, rec->ip, rec->ops, rec->data); in t_hash_show()
3094 seq_printf(m, "%ps:%ps", (void *)rec->ip, (void *)rec->ops->func); in t_hash_show()
3107 struct ftrace_ops *ops = iter->ops; in t_next() local
3132 !(ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip))) || in t_next()
3135 !ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) || in t_next()
3163 struct ftrace_ops *ops = iter->ops; in t_start() local
3184 ftrace_hash_empty(ops->func_hash->filter_hash)) || in t_start()
3186 ftrace_hash_empty(ops->func_hash->notrace_hash))) { in t_start()
3223 arch_ftrace_trampoline_func(struct ftrace_ops *ops, struct dyn_ftrace *rec) in arch_ftrace_trampoline_func() argument
3228 static void add_trampoline_func(struct seq_file *m, struct ftrace_ops *ops, in add_trampoline_func() argument
3233 ptr = arch_ftrace_trampoline_func(ops, rec); in add_trampoline_func()
3261 struct ftrace_ops *ops = NULL; in t_show() local
3268 ops = ftrace_find_tramp_ops_any(rec); in t_show()
3269 if (ops) in t_show()
3271 (void *)ops->trampoline); in t_show()
3276 add_trampoline_func(m, ops, rec); in t_show()
3302 iter->ops = &global_ops; in ftrace_avail_open()
3317 iter->ops = &global_ops; in ftrace_enabled_open()
3340 ftrace_regex_open(struct ftrace_ops *ops, int flag, in ftrace_regex_open() argument
3347 ftrace_ops_init(ops); in ftrace_regex_open()
3361 iter->ops = ops; in ftrace_regex_open()
3364 mutex_lock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3367 hash = ops->func_hash->notrace_hash; in ftrace_regex_open()
3369 hash = ops->func_hash->filter_hash; in ftrace_regex_open()
3404 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3412 struct ftrace_ops *ops = inode->i_private; in ftrace_filter_open() local
3414 return ftrace_regex_open(ops, in ftrace_filter_open()
3422 struct ftrace_ops *ops = inode->i_private; in ftrace_notrace_open() local
3424 return ftrace_regex_open(ops, FTRACE_ITER_NOTRACE, in ftrace_notrace_open()
3639 entry->ops->func(ip, parent_ip, &entry->data); in function_trace_probe_call()
3702 if (entry->ops->free) in ftrace_free_entry()
3703 entry->ops->free(entry->ops, entry->ip, &entry->data); in ftrace_free_entry()
3708 register_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in register_ftrace_function_probe() argument
3773 if (ops->init) { in register_ftrace_function_probe()
3774 if (ops->init(ops, rec->ip, &entry->data) < 0) { in register_ftrace_function_probe()
3788 entry->ops = ops; in register_ftrace_function_probe()
3820 __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in __unregister_ftrace_function_probe() argument
3865 if ((flags & PROBE_TEST_FUNC) && entry->ops != ops) in __unregister_ftrace_function_probe()
3911 unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in unregister_ftrace_function_probe() argument
3914 __unregister_ftrace_function_probe(glob, ops, data, in unregister_ftrace_function_probe()
3919 unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops) in unregister_ftrace_function_probe_func() argument
3921 __unregister_ftrace_function_probe(glob, ops, NULL, PROBE_TEST_FUNC); in unregister_ftrace_function_probe_func()
4085 static void ftrace_ops_update_code(struct ftrace_ops *ops, in ftrace_ops_update_code() argument
4093 if (ops->flags & FTRACE_OPS_FL_ENABLED) { in ftrace_ops_update_code()
4094 ftrace_run_modify_code(ops, FTRACE_UPDATE_CALLS, old_hash); in ftrace_ops_update_code()
4103 if (ops->func_hash != &global_ops.local_hash) in ftrace_ops_update_code()
4117 ftrace_set_hash(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_hash() argument
4129 mutex_lock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4132 orig_hash = &ops->func_hash->filter_hash; in ftrace_set_hash()
4134 orig_hash = &ops->func_hash->notrace_hash; in ftrace_set_hash()
4158 old_hash_ops.filter_hash = ops->func_hash->filter_hash; in ftrace_set_hash()
4159 old_hash_ops.notrace_hash = ops->func_hash->notrace_hash; in ftrace_set_hash()
4160 ret = ftrace_hash_move(ops, enable, orig_hash, hash); in ftrace_set_hash()
4162 ftrace_ops_update_code(ops, &old_hash_ops); in ftrace_set_hash()
4168 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4175 ftrace_set_addr(struct ftrace_ops *ops, unsigned long ip, int remove, in ftrace_set_addr() argument
4178 return ftrace_set_hash(ops, 0, 0, ip, remove, reset, enable); in ftrace_set_addr()
4191 int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, in ftrace_set_filter_ip() argument
4194 ftrace_ops_init(ops); in ftrace_set_filter_ip()
4195 return ftrace_set_addr(ops, ip, remove, reset, 1); in ftrace_set_filter_ip()
4200 ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_regex() argument
4203 return ftrace_set_hash(ops, buf, len, 0, 0, reset, enable); in ftrace_set_regex()
4216 int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_filter() argument
4219 ftrace_ops_init(ops); in ftrace_set_filter()
4220 return ftrace_set_regex(ops, buf, len, reset, 1); in ftrace_set_filter()
4235 int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_notrace() argument
4238 ftrace_ops_init(ops); in ftrace_set_notrace()
4239 return ftrace_set_regex(ops, buf, len, reset, 0); in ftrace_set_notrace()
4345 ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable) in ftrace_set_early_filter() argument
4349 ftrace_ops_init(ops); in ftrace_set_early_filter()
4353 ftrace_set_regex(ops, func, strlen(func), 0, enable); in ftrace_set_early_filter()
4396 mutex_lock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
4402 orig_hash = &iter->ops->func_hash->filter_hash; in ftrace_regex_release()
4404 orig_hash = &iter->ops->func_hash->notrace_hash; in ftrace_regex_release()
4408 old_hash_ops.filter_hash = iter->ops->func_hash->filter_hash; in ftrace_regex_release()
4409 old_hash_ops.notrace_hash = iter->ops->func_hash->notrace_hash; in ftrace_regex_release()
4410 ret = ftrace_hash_move(iter->ops, filter_hash, in ftrace_regex_release()
4413 ftrace_ops_update_code(iter->ops, &old_hash_ops); in ftrace_regex_release()
4419 mutex_unlock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
4733 void ftrace_create_filter_files(struct ftrace_ops *ops, in ftrace_create_filter_files() argument
4738 ops, &ftrace_filter_fops); in ftrace_create_filter_files()
4741 ops, &ftrace_notrace_fops); in ftrace_create_filter_files()
4754 void ftrace_destroy_filter_files(struct ftrace_ops *ops) in ftrace_destroy_filter_files() argument
4757 if (ops->flags & FTRACE_OPS_FL_ENABLED) in ftrace_destroy_filter_files()
4758 ftrace_shutdown(ops, 0); in ftrace_destroy_filter_files()
4759 ops->flags |= FTRACE_OPS_FL_DELETED; in ftrace_destroy_filter_files()
5021 void __weak arch_ftrace_update_trampoline(struct ftrace_ops *ops) in arch_ftrace_update_trampoline() argument
5025 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
5039 if (ops->flags & FTRACE_OPS_FL_DYNAMIC) in ftrace_update_trampoline()
5043 arch_ftrace_update_trampoline(ops); in ftrace_update_trampoline()
5066 # define ftrace_startup(ops, command) \ argument
5068 int ___ret = __register_ftrace_function(ops); \
5070 (ops)->flags |= FTRACE_OPS_FL_ENABLED; \
5073 # define ftrace_shutdown(ops, command) \ argument
5075 int ___ret = __unregister_ftrace_function(ops); \
5077 (ops)->flags &= ~FTRACE_OPS_FL_ENABLED; \
5085 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
5090 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
5098 tr->ops = &global_ops; in ftrace_init_global_array_ops()
5099 tr->ops->private = tr; in ftrace_init_global_array_ops()
5106 if (WARN_ON(tr->ops->func != ftrace_stub)) in ftrace_init_array_ops()
5108 tr->ops->func); in ftrace_init_array_ops()
5110 tr->ops->func = func; in ftrace_init_array_ops()
5111 tr->ops->private = tr; in ftrace_init_array_ops()
5116 tr->ops->func = ftrace_stub; in ftrace_reset_array_ops()
5243 ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops) in ftrace_ops_get_func() argument
5250 if (!(ops->flags & FTRACE_OPS_FL_RECURSION_SAFE)) in ftrace_ops_get_func()
5253 return ops->func; in ftrace_ops_get_func()
5555 int register_ftrace_function(struct ftrace_ops *ops) in register_ftrace_function() argument
5559 ftrace_ops_init(ops); in register_ftrace_function()
5563 ret = ftrace_startup(ops, 0); in register_ftrace_function()
5577 int unregister_ftrace_function(struct ftrace_ops *ops) in unregister_ftrace_function() argument
5582 ret = ftrace_shutdown(ops, 0); in unregister_ftrace_function()