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()
251 static ftrace_func_t ftrace_ops_get_list_func(struct ftrace_ops *ops) in ftrace_ops_get_list_func() argument
257 if (ops->flags & FTRACE_OPS_FL_DYNAMIC || FTRACE_FORCE_LIST_FUNC) in ftrace_ops_get_list_func()
260 return ftrace_ops_get_func(ops); in ftrace_ops_get_list_func()
345 static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) in add_ftrace_ops() argument
347 ops->next = *list; in add_ftrace_ops()
354 rcu_assign_pointer(*list, ops); in add_ftrace_ops()
357 static int remove_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) in remove_ftrace_ops() argument
365 if (*list == ops && ops->next == &ftrace_list_end) { in remove_ftrace_ops()
371 if (*p == ops) in remove_ftrace_ops()
374 if (*p != ops) in remove_ftrace_ops()
383 struct ftrace_ops *ops) in add_ftrace_list_ops() argument
386 add_ftrace_ops(list, ops); in add_ftrace_list_ops()
393 struct ftrace_ops *ops) in remove_ftrace_list_ops() argument
395 int ret = remove_ftrace_ops(list, ops); in remove_ftrace_list_ops()
401 static void ftrace_update_trampoline(struct ftrace_ops *ops);
403 static int __register_ftrace_function(struct ftrace_ops *ops) in __register_ftrace_function() argument
405 if (ops->flags & FTRACE_OPS_FL_DELETED) in __register_ftrace_function()
408 if (WARN_ON(ops->flags & FTRACE_OPS_FL_ENABLED)) in __register_ftrace_function()
417 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS && in __register_ftrace_function()
418 !(ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED)) in __register_ftrace_function()
421 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED) in __register_ftrace_function()
422 ops->flags |= FTRACE_OPS_FL_SAVE_REGS; in __register_ftrace_function()
425 if (!core_kernel_data((unsigned long)ops)) in __register_ftrace_function()
426 ops->flags |= FTRACE_OPS_FL_DYNAMIC; in __register_ftrace_function()
428 if (ops->flags & FTRACE_OPS_FL_CONTROL) { in __register_ftrace_function()
429 if (control_ops_alloc(ops)) in __register_ftrace_function()
431 add_ftrace_list_ops(&ftrace_control_list, &control_ops, ops); in __register_ftrace_function()
433 ops = &control_ops; in __register_ftrace_function()
435 add_ftrace_ops(&ftrace_ops_list, ops); in __register_ftrace_function()
438 ops->saved_func = ops->func; in __register_ftrace_function()
440 if (ops->flags & FTRACE_OPS_FL_PID && ftrace_pids_enabled()) in __register_ftrace_function()
441 ops->func = ftrace_pid_func; in __register_ftrace_function()
443 ftrace_update_trampoline(ops); in __register_ftrace_function()
451 static int __unregister_ftrace_function(struct ftrace_ops *ops) in __unregister_ftrace_function() argument
455 if (WARN_ON(!(ops->flags & FTRACE_OPS_FL_ENABLED))) in __unregister_ftrace_function()
458 if (ops->flags & FTRACE_OPS_FL_CONTROL) { in __unregister_ftrace_function()
460 &control_ops, ops); in __unregister_ftrace_function()
462 ret = remove_ftrace_ops(&ftrace_ops_list, ops); in __unregister_ftrace_function()
470 ops->func = ops->saved_func; in __unregister_ftrace_function()
863 struct ftrace_ops *ops, struct pt_regs *regs) in function_profile_call() argument
1116 struct ftrace_probe_ops *ops; member
1329 void ftrace_free_filter(struct ftrace_ops *ops) in ftrace_free_filter() argument
1331 ftrace_ops_init(ops); in ftrace_free_filter()
1332 free_ftrace_hash(ops->func_hash->filter_hash); in ftrace_free_filter()
1333 free_ftrace_hash(ops->func_hash->notrace_hash); in ftrace_free_filter()
1394 ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, int filter_hash);
1396 ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, int filter_hash);
1398 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,
1402 ftrace_hash_move(struct ftrace_ops *ops, int enable, in ftrace_hash_move() argument
1415 if (ops->flags & FTRACE_OPS_FL_IPMODIFY && !enable) in ftrace_hash_move()
1454 ret = ftrace_hash_ipmodify_update(ops, new_hash); in ftrace_hash_move()
1465 ftrace_hash_rec_disable_modify(ops, enable); in ftrace_hash_move()
1469 ftrace_hash_rec_enable_modify(ops, enable); in ftrace_hash_move()
1502 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
1513 if (regs == NULL && (ops->flags & FTRACE_OPS_FL_SAVE_REGS)) in ftrace_ops_test()
1517 hash.filter_hash = rcu_dereference_raw_notrace(ops->func_hash->filter_hash); in ftrace_ops_test()
1518 hash.notrace_hash = rcu_dereference_raw_notrace(ops->func_hash->notrace_hash); in ftrace_ops_test()
1615 struct ftrace_ops *ops; in test_rec_ops_needs_regs() local
1618 for (ops = ftrace_ops_list; in test_rec_ops_needs_regs()
1619 ops != &ftrace_list_end; ops = ops->next) { in test_rec_ops_needs_regs()
1621 if (ftrace_ops_test(ops, rec->ip, rec)) { in test_rec_ops_needs_regs()
1622 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in test_rec_ops_needs_regs()
1632 static void __ftrace_hash_rec_update(struct ftrace_ops *ops, in __ftrace_hash_rec_update() argument
1644 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in __ftrace_hash_rec_update()
1659 hash = ops->func_hash->filter_hash; in __ftrace_hash_rec_update()
1660 other_hash = ops->func_hash->notrace_hash; in __ftrace_hash_rec_update()
1665 hash = ops->func_hash->notrace_hash; in __ftrace_hash_rec_update()
1666 other_hash = ops->func_hash->filter_hash; in __ftrace_hash_rec_update()
1720 if (ftrace_rec_count(rec) == 1 && ops->trampoline) in __ftrace_hash_rec_update()
1735 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) in __ftrace_hash_rec_update()
1750 ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in __ftrace_hash_rec_update()
1778 static void ftrace_hash_rec_disable(struct ftrace_ops *ops, in ftrace_hash_rec_disable() argument
1781 __ftrace_hash_rec_update(ops, filter_hash, 0); in ftrace_hash_rec_disable()
1784 static void ftrace_hash_rec_enable(struct ftrace_ops *ops, in ftrace_hash_rec_enable() argument
1787 __ftrace_hash_rec_update(ops, filter_hash, 1); in ftrace_hash_rec_enable()
1790 static void ftrace_hash_rec_update_modify(struct ftrace_ops *ops, in ftrace_hash_rec_update_modify() argument
1795 __ftrace_hash_rec_update(ops, filter_hash, inc); in ftrace_hash_rec_update_modify()
1797 if (ops->func_hash != &global_ops.local_hash) in ftrace_hash_rec_update_modify()
1806 if (op == ops) in ftrace_hash_rec_update_modify()
1813 static void ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_disable_modify() argument
1816 ftrace_hash_rec_update_modify(ops, filter_hash, 0); in ftrace_hash_rec_disable_modify()
1819 static void ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_enable_modify() argument
1822 ftrace_hash_rec_update_modify(ops, filter_hash, 1); in ftrace_hash_rec_enable_modify()
1834 static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops, in __ftrace_hash_update_ipmodify() argument
1843 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in __ftrace_hash_update_ipmodify()
1846 if (!(ops->flags & FTRACE_OPS_FL_IPMODIFY)) in __ftrace_hash_update_ipmodify()
1898 static int ftrace_hash_ipmodify_enable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_enable() argument
1900 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_enable()
1905 return __ftrace_hash_update_ipmodify(ops, EMPTY_HASH, hash); in ftrace_hash_ipmodify_enable()
1909 static void ftrace_hash_ipmodify_disable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_disable() argument
1911 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_disable()
1916 __ftrace_hash_update_ipmodify(ops, hash, EMPTY_HASH); in ftrace_hash_ipmodify_disable()
1919 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops, in ftrace_hash_ipmodify_update() argument
1922 struct ftrace_hash *old_hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_update()
1930 return __ftrace_hash_update_ipmodify(ops, old_hash, new_hash); in ftrace_hash_ipmodify_update()
1986 struct ftrace_ops *ops = NULL; in ftrace_bug() local
1992 ops = ftrace_find_tramp_ops_any(rec); in ftrace_bug()
1993 if (ops) in ftrace_bug()
1995 (void *)ops->trampoline); in ftrace_bug()
2234 struct ftrace_ops *ops; in ftrace_get_addr_new() local
2238 ops = ftrace_find_tramp_ops_new(rec); in ftrace_get_addr_new()
2239 if (FTRACE_WARN_ON(!ops || !ops->trampoline)) { in ftrace_get_addr_new()
2245 return ops->trampoline; in ftrace_get_addr_new()
2266 struct ftrace_ops *ops; in ftrace_get_addr_curr() local
2270 ops = ftrace_find_tramp_ops_curr(rec); in ftrace_get_addr_curr()
2271 if (FTRACE_WARN_ON(!ops)) { in ftrace_get_addr_curr()
2277 return ops->trampoline; in ftrace_get_addr_curr()
2540 static void ftrace_run_modify_code(struct ftrace_ops *ops, int command, in ftrace_run_modify_code() argument
2543 ops->flags |= FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2544 ops->old_hash.filter_hash = old_hash->filter_hash; in ftrace_run_modify_code()
2545 ops->old_hash.notrace_hash = old_hash->notrace_hash; in ftrace_run_modify_code()
2547 ops->old_hash.filter_hash = NULL; in ftrace_run_modify_code()
2548 ops->old_hash.notrace_hash = NULL; in ftrace_run_modify_code()
2549 ops->flags &= ~FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2555 void __weak arch_ftrace_trampoline_free(struct ftrace_ops *ops) in arch_ftrace_trampoline_free() argument
2559 static void control_ops_free(struct ftrace_ops *ops) in control_ops_free() argument
2561 free_percpu(ops->disabled); in control_ops_free()
2584 static int ftrace_startup(struct ftrace_ops *ops, int command) in ftrace_startup() argument
2591 ret = __register_ftrace_function(ops); in ftrace_startup()
2606 ops->flags |= FTRACE_OPS_FL_ENABLED | FTRACE_OPS_FL_ADDING; in ftrace_startup()
2608 ret = ftrace_hash_ipmodify_enable(ops); in ftrace_startup()
2611 __unregister_ftrace_function(ops); in ftrace_startup()
2613 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_startup()
2617 ftrace_hash_rec_enable(ops, 1); in ftrace_startup()
2621 ops->flags &= ~FTRACE_OPS_FL_ADDING; in ftrace_startup()
2626 static int ftrace_shutdown(struct ftrace_ops *ops, int command) in ftrace_shutdown() argument
2633 ret = __unregister_ftrace_function(ops); in ftrace_shutdown()
2646 ftrace_hash_ipmodify_disable(ops); in ftrace_shutdown()
2647 ftrace_hash_rec_disable(ops, 1); in ftrace_shutdown()
2649 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_shutdown()
2665 if (ops->flags & FTRACE_OPS_FL_CONTROL) in ftrace_shutdown()
2666 control_ops_free(ops); in ftrace_shutdown()
2674 ops->flags |= FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2675 removed_ops = ops; in ftrace_shutdown()
2678 ops->old_hash.filter_hash = ops->func_hash->filter_hash; in ftrace_shutdown()
2679 ops->old_hash.notrace_hash = ops->func_hash->notrace_hash; in ftrace_shutdown()
2698 ops->old_hash.filter_hash = NULL; in ftrace_shutdown()
2699 ops->old_hash.notrace_hash = NULL; in ftrace_shutdown()
2702 ops->flags &= ~FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2718 if (ops->flags & (FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_CONTROL)) { in ftrace_shutdown()
2721 arch_ftrace_trampoline_free(ops); in ftrace_shutdown()
2723 if (ops->flags & FTRACE_OPS_FL_CONTROL) in ftrace_shutdown()
2724 control_ops_free(ops); in ftrace_shutdown()
2767 static inline int ops_traces_mod(struct ftrace_ops *ops) in ops_traces_mod() argument
2773 return ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_traces_mod()
2774 ftrace_hash_empty(ops->func_hash->notrace_hash); in ops_traces_mod()
2785 ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec) in ops_references_rec() argument
2788 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in ops_references_rec()
2792 if (ops_traces_mod(ops)) in ops_references_rec()
2796 if (!ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_references_rec()
2797 !ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip)) in ops_references_rec()
2801 if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) in ops_references_rec()
2809 struct ftrace_ops *ops; in referenced_filters() local
2812 for (ops = ftrace_ops_list; ops != &ftrace_list_end; ops = ops->next) { in referenced_filters()
2813 if (ops_references_rec(ops, rec)) in referenced_filters()
2837 struct ftrace_ops *ops; in ftrace_update_code() local
2839 for (ops = ftrace_ops_list; in ftrace_update_code()
2840 ops != &ftrace_list_end; ops = ops->next) { in ftrace_update_code()
2841 if (ops->flags & FTRACE_OPS_FL_ENABLED) { in ftrace_update_code()
2842 if (ops_traces_mod(ops)) in ftrace_update_code()
2997 struct ftrace_ops *ops; member
3081 if (rec->ops->print) in t_hash_show()
3082 return rec->ops->print(m, rec->ip, rec->ops, rec->data); in t_hash_show()
3084 seq_printf(m, "%ps:%ps", (void *)rec->ip, (void *)rec->ops->func); in t_hash_show()
3097 struct ftrace_ops *ops = iter->ops; in t_next() local
3122 !(ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip))) || in t_next()
3125 !ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) || in t_next()
3153 struct ftrace_ops *ops = iter->ops; in t_start() local
3174 ftrace_hash_empty(ops->func_hash->filter_hash)) || in t_start()
3176 ftrace_hash_empty(ops->func_hash->notrace_hash))) { in t_start()
3213 arch_ftrace_trampoline_func(struct ftrace_ops *ops, struct dyn_ftrace *rec) in arch_ftrace_trampoline_func() argument
3218 static void add_trampoline_func(struct seq_file *m, struct ftrace_ops *ops, in add_trampoline_func() argument
3223 ptr = arch_ftrace_trampoline_func(ops, rec); in add_trampoline_func()
3251 struct ftrace_ops *ops = NULL; in t_show() local
3258 ops = ftrace_find_tramp_ops_any(rec); in t_show()
3259 if (ops) in t_show()
3261 (void *)ops->trampoline); in t_show()
3266 add_trampoline_func(m, ops, rec); in t_show()
3292 iter->ops = &global_ops; in ftrace_avail_open()
3307 iter->ops = &global_ops; in ftrace_enabled_open()
3330 ftrace_regex_open(struct ftrace_ops *ops, int flag, in ftrace_regex_open() argument
3337 ftrace_ops_init(ops); in ftrace_regex_open()
3351 iter->ops = ops; in ftrace_regex_open()
3354 mutex_lock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3357 hash = ops->func_hash->notrace_hash; in ftrace_regex_open()
3359 hash = ops->func_hash->filter_hash; in ftrace_regex_open()
3394 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3402 struct ftrace_ops *ops = inode->i_private; in ftrace_filter_open() local
3404 return ftrace_regex_open(ops, in ftrace_filter_open()
3412 struct ftrace_ops *ops = inode->i_private; in ftrace_notrace_open() local
3414 return ftrace_regex_open(ops, FTRACE_ITER_NOTRACE, in ftrace_notrace_open()
3623 entry->ops->func(ip, parent_ip, &entry->data); in function_trace_probe_call()
3686 if (entry->ops->free) in ftrace_free_entry()
3687 entry->ops->free(entry->ops, entry->ip, &entry->data); in ftrace_free_entry()
3692 register_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in register_ftrace_function_probe() argument
3756 if (ops->init) { in register_ftrace_function_probe()
3757 if (ops->init(ops, rec->ip, &entry->data) < 0) { in register_ftrace_function_probe()
3771 entry->ops = ops; in register_ftrace_function_probe()
3803 __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in __unregister_ftrace_function_probe() argument
3848 if ((flags & PROBE_TEST_FUNC) && entry->ops != ops) in __unregister_ftrace_function_probe()
3894 unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, in unregister_ftrace_function_probe() argument
3897 __unregister_ftrace_function_probe(glob, ops, data, in unregister_ftrace_function_probe()
3902 unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops) in unregister_ftrace_function_probe_func() argument
3904 __unregister_ftrace_function_probe(glob, ops, NULL, PROBE_TEST_FUNC); in unregister_ftrace_function_probe_func()
4068 static void ftrace_ops_update_code(struct ftrace_ops *ops, in ftrace_ops_update_code() argument
4076 if (ops->flags & FTRACE_OPS_FL_ENABLED) { in ftrace_ops_update_code()
4077 ftrace_run_modify_code(ops, FTRACE_UPDATE_CALLS, old_hash); in ftrace_ops_update_code()
4086 if (ops->func_hash != &global_ops.local_hash) in ftrace_ops_update_code()
4100 ftrace_set_hash(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_hash() argument
4112 mutex_lock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4115 orig_hash = &ops->func_hash->filter_hash; in ftrace_set_hash()
4117 orig_hash = &ops->func_hash->notrace_hash; in ftrace_set_hash()
4141 old_hash_ops.filter_hash = ops->func_hash->filter_hash; in ftrace_set_hash()
4142 old_hash_ops.notrace_hash = ops->func_hash->notrace_hash; in ftrace_set_hash()
4143 ret = ftrace_hash_move(ops, enable, orig_hash, hash); in ftrace_set_hash()
4145 ftrace_ops_update_code(ops, &old_hash_ops); in ftrace_set_hash()
4151 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4158 ftrace_set_addr(struct ftrace_ops *ops, unsigned long ip, int remove, in ftrace_set_addr() argument
4161 return ftrace_set_hash(ops, 0, 0, ip, remove, reset, enable); in ftrace_set_addr()
4174 int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, in ftrace_set_filter_ip() argument
4177 ftrace_ops_init(ops); in ftrace_set_filter_ip()
4178 return ftrace_set_addr(ops, ip, remove, reset, 1); in ftrace_set_filter_ip()
4183 ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_regex() argument
4186 return ftrace_set_hash(ops, buf, len, 0, 0, reset, enable); in ftrace_set_regex()
4199 int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_filter() argument
4202 ftrace_ops_init(ops); in ftrace_set_filter()
4203 return ftrace_set_regex(ops, buf, len, reset, 1); in ftrace_set_filter()
4218 int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_notrace() argument
4221 ftrace_ops_init(ops); in ftrace_set_notrace()
4222 return ftrace_set_regex(ops, buf, len, reset, 0); in ftrace_set_notrace()
4328 ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable) in ftrace_set_early_filter() argument
4332 ftrace_ops_init(ops); in ftrace_set_early_filter()
4336 ftrace_set_regex(ops, func, strlen(func), 0, enable); in ftrace_set_early_filter()
4379 mutex_lock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
4385 orig_hash = &iter->ops->func_hash->filter_hash; in ftrace_regex_release()
4387 orig_hash = &iter->ops->func_hash->notrace_hash; in ftrace_regex_release()
4391 old_hash_ops.filter_hash = iter->ops->func_hash->filter_hash; in ftrace_regex_release()
4392 old_hash_ops.notrace_hash = iter->ops->func_hash->notrace_hash; in ftrace_regex_release()
4393 ret = ftrace_hash_move(iter->ops, filter_hash, in ftrace_regex_release()
4396 ftrace_ops_update_code(iter->ops, &old_hash_ops); in ftrace_regex_release()
4402 mutex_unlock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
4716 void ftrace_create_filter_files(struct ftrace_ops *ops, in ftrace_create_filter_files() argument
4721 ops, &ftrace_filter_fops); in ftrace_create_filter_files()
4724 ops, &ftrace_notrace_fops); in ftrace_create_filter_files()
4737 void ftrace_destroy_filter_files(struct ftrace_ops *ops) in ftrace_destroy_filter_files() argument
4740 if (ops->flags & FTRACE_OPS_FL_ENABLED) in ftrace_destroy_filter_files()
4741 ftrace_shutdown(ops, 0); in ftrace_destroy_filter_files()
4742 ops->flags |= FTRACE_OPS_FL_DELETED; in ftrace_destroy_filter_files()
5015 void __weak arch_ftrace_update_trampoline(struct ftrace_ops *ops) in arch_ftrace_update_trampoline() argument
5019 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
5033 if (ops->flags & FTRACE_OPS_FL_DYNAMIC) in ftrace_update_trampoline()
5037 arch_ftrace_update_trampoline(ops); in ftrace_update_trampoline()
5060 # define ftrace_startup(ops, command) \ argument
5062 int ___ret = __register_ftrace_function(ops); \
5064 (ops)->flags |= FTRACE_OPS_FL_ENABLED; \
5067 # define ftrace_shutdown(ops, command) \ argument
5069 int ___ret = __unregister_ftrace_function(ops); \
5071 (ops)->flags &= ~FTRACE_OPS_FL_ENABLED; \
5079 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
5084 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
5092 tr->ops = &global_ops; in ftrace_init_global_array_ops()
5093 tr->ops->private = tr; in ftrace_init_global_array_ops()
5100 if (WARN_ON(tr->ops->func != ftrace_stub)) in ftrace_init_array_ops()
5102 tr->ops->func); in ftrace_init_array_ops()
5104 tr->ops->func = func; in ftrace_init_array_ops()
5105 tr->ops->private = tr; in ftrace_init_array_ops()
5110 tr->ops->func = ftrace_stub; in ftrace_reset_array_ops()
5237 ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops) in ftrace_ops_get_func() argument
5244 if (!(ops->flags & FTRACE_OPS_FL_RECURSION_SAFE)) in ftrace_ops_get_func()
5247 return ops->func; in ftrace_ops_get_func()
5549 int register_ftrace_function(struct ftrace_ops *ops) in register_ftrace_function() argument
5553 ftrace_ops_init(ops); in register_ftrace_function()
5557 ret = ftrace_startup(ops, 0); in register_ftrace_function()
5571 int unregister_ftrace_function(struct ftrace_ops *ops) in unregister_ftrace_function() argument
5576 ret = ftrace_shutdown(ops, 0); in unregister_ftrace_function()