• Home
  • Raw
  • Download

Lines Matching refs:ops

98 static bool ftrace_pids_enabled(struct ftrace_ops *ops)  in ftrace_pids_enabled()  argument
102 if (!(ops->flags & FTRACE_OPS_FL_PID) || !ops->private) in ftrace_pids_enabled()
105 tr = ops->private; in ftrace_pids_enabled()
110 static void ftrace_update_trampoline(struct ftrace_ops *ops);
133 static inline void ftrace_ops_init(struct ftrace_ops *ops) in ftrace_ops_init() argument
136 if (!(ops->flags & FTRACE_OPS_FL_INITIALIZED)) { in ftrace_ops_init()
137 mutex_init(&ops->local_hash.regex_lock); in ftrace_ops_init()
138 ops->func_hash = &ops->local_hash; in ftrace_ops_init()
139 ops->flags |= FTRACE_OPS_FL_INITIALIZED; in ftrace_ops_init()
172 static ftrace_func_t ftrace_ops_get_list_func(struct ftrace_ops *ops) in ftrace_ops_get_list_func() argument
178 if (ops->flags & (FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_RCU) || in ftrace_ops_get_list_func()
182 return ftrace_ops_get_func(ops); in ftrace_ops_get_list_func()
265 struct ftrace_ops *ops) in add_ftrace_ops() argument
267 rcu_assign_pointer(ops->next, *list); in add_ftrace_ops()
275 rcu_assign_pointer(*list, ops); in add_ftrace_ops()
279 struct ftrace_ops *ops) in remove_ftrace_ops() argument
288 lockdep_is_held(&ftrace_lock)) == ops && in remove_ftrace_ops()
289 rcu_dereference_protected(ops->next, in remove_ftrace_ops()
296 if (*p == ops) in remove_ftrace_ops()
299 if (*p != ops) in remove_ftrace_ops()
306 static void ftrace_update_trampoline(struct ftrace_ops *ops);
308 int __register_ftrace_function(struct ftrace_ops *ops) in __register_ftrace_function() argument
310 if (ops->flags & FTRACE_OPS_FL_DELETED) in __register_ftrace_function()
313 if (WARN_ON(ops->flags & FTRACE_OPS_FL_ENABLED)) in __register_ftrace_function()
322 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS && in __register_ftrace_function()
323 !(ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED)) in __register_ftrace_function()
326 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED) in __register_ftrace_function()
327 ops->flags |= FTRACE_OPS_FL_SAVE_REGS; in __register_ftrace_function()
330 if (!core_kernel_data((unsigned long)ops)) in __register_ftrace_function()
331 ops->flags |= FTRACE_OPS_FL_DYNAMIC; in __register_ftrace_function()
333 add_ftrace_ops(&ftrace_ops_list, ops); in __register_ftrace_function()
336 ops->saved_func = ops->func; in __register_ftrace_function()
338 if (ftrace_pids_enabled(ops)) in __register_ftrace_function()
339 ops->func = ftrace_pid_func; in __register_ftrace_function()
341 ftrace_update_trampoline(ops); in __register_ftrace_function()
349 int __unregister_ftrace_function(struct ftrace_ops *ops) in __unregister_ftrace_function() argument
353 if (WARN_ON(!(ops->flags & FTRACE_OPS_FL_ENABLED))) in __unregister_ftrace_function()
356 ret = remove_ftrace_ops(&ftrace_ops_list, ops); in __unregister_ftrace_function()
364 ops->func = ops->saved_func; in __unregister_ftrace_function()
761 struct ftrace_ops *ops, struct pt_regs *regs) in function_profile_call() argument
1028 struct ftrace_ops ops; member
1269 void ftrace_free_filter(struct ftrace_ops *ops) in ftrace_free_filter() argument
1271 ftrace_ops_init(ops); in ftrace_free_filter()
1272 free_ftrace_hash(ops->func_hash->filter_hash); in ftrace_free_filter()
1273 free_ftrace_hash(ops->func_hash->notrace_hash); in ftrace_free_filter()
1366 ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, int filter_hash);
1368 ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, int filter_hash);
1370 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,
1419 ftrace_hash_move(struct ftrace_ops *ops, int enable, in ftrace_hash_move() argument
1426 if (ops->flags & FTRACE_OPS_FL_IPMODIFY && !enable) in ftrace_hash_move()
1436 ret = ftrace_hash_ipmodify_update(ops, new_hash); in ftrace_hash_move()
1447 ftrace_hash_rec_disable_modify(ops, enable); in ftrace_hash_move()
1451 ftrace_hash_rec_enable_modify(ops, enable); in ftrace_hash_move()
1484 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
1495 if (regs == NULL && (ops->flags & FTRACE_OPS_FL_SAVE_REGS)) in ftrace_ops_test()
1499 rcu_assign_pointer(hash.filter_hash, ops->func_hash->filter_hash); in ftrace_ops_test()
1500 rcu_assign_pointer(hash.notrace_hash, ops->func_hash->notrace_hash); in ftrace_ops_test()
1609 struct ftrace_ops *ops; in test_rec_ops_needs_regs() local
1612 for (ops = ftrace_ops_list; in test_rec_ops_needs_regs()
1613 ops != &ftrace_list_end; ops = ops->next) { in test_rec_ops_needs_regs()
1615 if (ftrace_ops_test(ops, rec->ip, rec)) { in test_rec_ops_needs_regs()
1616 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in test_rec_ops_needs_regs()
1629 ftrace_find_tramp_ops_next(struct dyn_ftrace *rec, struct ftrace_ops *ops);
1631 static bool __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()
1723 if (ftrace_rec_count(rec) == 1 && ops->trampoline) in __ftrace_hash_rec_update()
1738 if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) in __ftrace_hash_rec_update()
1753 ops->flags & FTRACE_OPS_FL_SAVE_REGS) { in __ftrace_hash_rec_update()
1789 static bool ftrace_hash_rec_disable(struct ftrace_ops *ops, in ftrace_hash_rec_disable() argument
1792 return __ftrace_hash_rec_update(ops, filter_hash, 0); in ftrace_hash_rec_disable()
1795 static bool ftrace_hash_rec_enable(struct ftrace_ops *ops, in ftrace_hash_rec_enable() argument
1798 return __ftrace_hash_rec_update(ops, filter_hash, 1); in ftrace_hash_rec_enable()
1801 static void ftrace_hash_rec_update_modify(struct ftrace_ops *ops, in ftrace_hash_rec_update_modify() argument
1806 __ftrace_hash_rec_update(ops, filter_hash, inc); in ftrace_hash_rec_update_modify()
1808 if (ops->func_hash != &global_ops.local_hash) in ftrace_hash_rec_update_modify()
1817 if (op == ops) in ftrace_hash_rec_update_modify()
1824 static void ftrace_hash_rec_disable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_disable_modify() argument
1827 ftrace_hash_rec_update_modify(ops, filter_hash, 0); in ftrace_hash_rec_disable_modify()
1830 static void ftrace_hash_rec_enable_modify(struct ftrace_ops *ops, in ftrace_hash_rec_enable_modify() argument
1833 ftrace_hash_rec_update_modify(ops, filter_hash, 1); in ftrace_hash_rec_enable_modify()
1845 static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops, in __ftrace_hash_update_ipmodify() argument
1854 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in __ftrace_hash_update_ipmodify()
1857 if (!(ops->flags & FTRACE_OPS_FL_IPMODIFY)) in __ftrace_hash_update_ipmodify()
1917 static int ftrace_hash_ipmodify_enable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_enable() argument
1919 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_enable()
1924 return __ftrace_hash_update_ipmodify(ops, EMPTY_HASH, hash); in ftrace_hash_ipmodify_enable()
1928 static void ftrace_hash_ipmodify_disable(struct ftrace_ops *ops) in ftrace_hash_ipmodify_disable() argument
1930 struct ftrace_hash *hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_disable()
1935 __ftrace_hash_update_ipmodify(ops, hash, EMPTY_HASH); in ftrace_hash_ipmodify_disable()
1938 static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops, in ftrace_hash_ipmodify_update() argument
1941 struct ftrace_hash *old_hash = ops->func_hash->filter_hash; in ftrace_hash_ipmodify_update()
1949 return __ftrace_hash_update_ipmodify(ops, old_hash, new_hash); in ftrace_hash_ipmodify_update()
2030 struct ftrace_ops *ops = NULL; in ftrace_bug() local
2036 ops = ftrace_find_tramp_ops_any(rec); in ftrace_bug()
2037 if (ops) { in ftrace_bug()
2040 (void *)ops->trampoline, in ftrace_bug()
2041 (void *)ops->func); in ftrace_bug()
2042 ops = ftrace_find_tramp_ops_next(rec, ops); in ftrace_bug()
2043 } while (ops); in ftrace_bug()
2309 struct ftrace_ops *ops; in ftrace_get_addr_new() local
2313 ops = ftrace_find_tramp_ops_new(rec); in ftrace_get_addr_new()
2314 if (FTRACE_WARN_ON(!ops || !ops->trampoline)) { in ftrace_get_addr_new()
2320 return ops->trampoline; in ftrace_get_addr_new()
2341 struct ftrace_ops *ops; in ftrace_get_addr_curr() local
2345 ops = ftrace_find_tramp_ops_curr(rec); in ftrace_get_addr_curr()
2346 if (FTRACE_WARN_ON(!ops)) { in ftrace_get_addr_curr()
2352 return ops->trampoline; in ftrace_get_addr_curr()
2633 static void ftrace_run_modify_code(struct ftrace_ops *ops, int command, in ftrace_run_modify_code() argument
2636 ops->flags |= FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2637 ops->old_hash.filter_hash = old_hash->filter_hash; in ftrace_run_modify_code()
2638 ops->old_hash.notrace_hash = old_hash->notrace_hash; in ftrace_run_modify_code()
2640 ops->old_hash.filter_hash = NULL; in ftrace_run_modify_code()
2641 ops->old_hash.notrace_hash = NULL; in ftrace_run_modify_code()
2642 ops->flags &= ~FTRACE_OPS_FL_MODIFYING; in ftrace_run_modify_code()
2648 void __weak arch_ftrace_trampoline_free(struct ftrace_ops *ops) in arch_ftrace_trampoline_free() argument
2672 int ftrace_startup(struct ftrace_ops *ops, int command) in ftrace_startup() argument
2679 ret = __register_ftrace_function(ops); in ftrace_startup()
2693 ops->flags |= FTRACE_OPS_FL_ENABLED | FTRACE_OPS_FL_ADDING; in ftrace_startup()
2695 ret = ftrace_hash_ipmodify_enable(ops); in ftrace_startup()
2698 __unregister_ftrace_function(ops); in ftrace_startup()
2700 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_startup()
2704 if (ftrace_hash_rec_enable(ops, 1)) in ftrace_startup()
2709 ops->flags &= ~FTRACE_OPS_FL_ADDING; in ftrace_startup()
2714 int ftrace_shutdown(struct ftrace_ops *ops, int command) in ftrace_shutdown() argument
2721 ret = __unregister_ftrace_function(ops); in ftrace_shutdown()
2734 ftrace_hash_ipmodify_disable(ops); in ftrace_shutdown()
2736 if (ftrace_hash_rec_disable(ops, 1)) in ftrace_shutdown()
2739 ops->flags &= ~FTRACE_OPS_FL_ENABLED; in ftrace_shutdown()
2753 if (ops->flags & FTRACE_OPS_FL_DYNAMIC) in ftrace_shutdown()
2763 ops->flags |= FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2764 removed_ops = ops; in ftrace_shutdown()
2767 ops->old_hash.filter_hash = ops->func_hash->filter_hash; in ftrace_shutdown()
2768 ops->old_hash.notrace_hash = ops->func_hash->notrace_hash; in ftrace_shutdown()
2788 ops->old_hash.filter_hash = NULL; in ftrace_shutdown()
2789 ops->old_hash.notrace_hash = NULL; in ftrace_shutdown()
2792 ops->flags &= ~FTRACE_OPS_FL_REMOVING; in ftrace_shutdown()
2800 if (ops->flags & FTRACE_OPS_FL_DYNAMIC) { in ftrace_shutdown()
2822 arch_ftrace_trampoline_free(ops); in ftrace_shutdown()
2865 static inline int ops_traces_mod(struct ftrace_ops *ops) in ops_traces_mod() argument
2871 return ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_traces_mod()
2872 ftrace_hash_empty(ops->func_hash->notrace_hash); in ops_traces_mod()
2883 ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec) in ops_references_rec() argument
2886 if (!(ops->flags & FTRACE_OPS_FL_ENABLED)) in ops_references_rec()
2890 if (ops_traces_mod(ops)) in ops_references_rec()
2894 if (!ftrace_hash_empty(ops->func_hash->filter_hash) && in ops_references_rec()
2895 !__ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip)) in ops_references_rec()
2899 if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip)) in ops_references_rec()
3060 struct ftrace_ops *ops; member
3072 struct trace_array *tr = iter->ops->private; in t_probe_next()
3098 hash = iter->probe->ops.func_hash->filter_hash; in t_probe_next()
3115 hash = iter->probe->ops.func_hash->filter_hash; in t_probe_next()
3410 arch_ftrace_trampoline_func(struct ftrace_ops *ops, struct dyn_ftrace *rec) in arch_ftrace_trampoline_func() argument
3415 static void add_trampoline_func(struct seq_file *m, struct ftrace_ops *ops, in add_trampoline_func() argument
3420 ptr = arch_ftrace_trampoline_func(ops, rec); in add_trampoline_func()
3451 struct ftrace_ops *ops; in t_show() local
3458 ops = ftrace_find_tramp_ops_any(rec); in t_show()
3459 if (ops) { in t_show()
3462 (void *)ops->trampoline, in t_show()
3463 (void *)ops->func); in t_show()
3464 add_trampoline_func(m, ops, rec); in t_show()
3465 ops = ftrace_find_tramp_ops_next(rec, ops); in t_show()
3466 } while (ops); in t_show()
3504 iter->ops = &global_ops; in ftrace_avail_open()
3529 iter->ops = &global_ops; in ftrace_enabled_open()
3551 ftrace_regex_open(struct ftrace_ops *ops, int flag, in ftrace_regex_open() argument
3557 struct trace_array *tr = ops->private; in ftrace_regex_open()
3560 ftrace_ops_init(ops); in ftrace_regex_open()
3575 iter->ops = ops; in ftrace_regex_open()
3579 mutex_lock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3582 hash = ops->func_hash->notrace_hash; in ftrace_regex_open()
3585 hash = ops->func_hash->filter_hash; in ftrace_regex_open()
3626 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_regex_open()
3641 struct ftrace_ops *ops = inode->i_private; in ftrace_filter_open() local
3644 return ftrace_regex_open(ops, in ftrace_filter_open()
3652 struct ftrace_ops *ops = inode->i_private; in ftrace_notrace_open() local
3655 return ftrace_regex_open(ops, FTRACE_ITER_NOTRACE, in ftrace_notrace_open()
3858 static void ftrace_ops_update_code(struct ftrace_ops *ops, in ftrace_ops_update_code() argument
3866 if (ops->flags & FTRACE_OPS_FL_ENABLED) { in ftrace_ops_update_code()
3867 ftrace_run_modify_code(ops, FTRACE_UPDATE_CALLS, old_hash); in ftrace_ops_update_code()
3876 if (ops->func_hash != &global_ops.local_hash) in ftrace_ops_update_code()
3889 static int ftrace_hash_move_and_update_ops(struct ftrace_ops *ops, in ftrace_hash_move_and_update_ops() argument
3899 old_hash_ops.filter_hash = ops->func_hash->filter_hash; in ftrace_hash_move_and_update_ops()
3900 old_hash_ops.notrace_hash = ops->func_hash->notrace_hash; in ftrace_hash_move_and_update_ops()
3901 ret = ftrace_hash_move(ops, enable, orig_hash, hash); in ftrace_hash_move_and_update_ops()
3903 ftrace_ops_update_code(ops, &old_hash_ops); in ftrace_hash_move_and_update_ops()
3971 ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len,
3975 static void process_mod_list(struct list_head *head, struct ftrace_ops *ops, in process_mod_list() argument
3984 mutex_lock(&ops->func_hash->regex_lock); in process_mod_list()
3987 orig_hash = &ops->func_hash->filter_hash; in process_mod_list()
3989 orig_hash = &ops->func_hash->notrace_hash; in process_mod_list()
4035 ret = ftrace_hash_move_and_update_ops(ops, orig_hash, in process_mod_list()
4040 mutex_unlock(&ops->func_hash->regex_lock); in process_mod_list()
4057 process_mod_list(&tr->mod_trace, tr->ops, mod, true); in process_cached_mods()
4059 process_mod_list(&tr->mod_notrace, tr->ops, mod, false); in process_cached_mods()
4118 probe = container_of(op, struct ftrace_func_probe, ops); in function_trace_probe_call()
4345 probe->ops.func = function_trace_probe_call; in register_ftrace_function_probe()
4347 ftrace_ops_init(&probe->ops); in register_ftrace_function_probe()
4359 mutex_lock(&probe->ops.func_hash->regex_lock); in register_ftrace_function_probe()
4361 orig_hash = &probe->ops.func_hash->filter_hash; in register_ftrace_function_probe()
4413 ret = ftrace_hash_move_and_update_ops(&probe->ops, orig_hash, in register_ftrace_function_probe()
4421 if (!(probe->ops.flags & FTRACE_OPS_FL_ENABLED)) in register_ftrace_function_probe()
4422 ret = ftrace_startup(&probe->ops, 0); in register_ftrace_function_probe()
4430 mutex_unlock(&probe->ops.func_hash->regex_lock); in register_ftrace_function_probe()
4494 if (!(probe->ops.flags & FTRACE_OPS_FL_INITIALIZED)) in unregister_ftrace_function_probe_func()
4501 mutex_lock(&probe->ops.func_hash->regex_lock); in unregister_ftrace_function_probe_func()
4503 orig_hash = &probe->ops.func_hash->filter_hash; in unregister_ftrace_function_probe_func()
4549 ftrace_shutdown(&probe->ops, 0); in unregister_ftrace_function_probe_func()
4551 ret = ftrace_hash_move_and_update_ops(&probe->ops, orig_hash, in unregister_ftrace_function_probe_func()
4556 ftrace_run_modify_code(&probe->ops, FTRACE_UPDATE_CALLS, in unregister_ftrace_function_probe_func()
4569 mutex_unlock(&probe->ops.func_hash->regex_lock); in unregister_ftrace_function_probe_func()
4642 struct trace_array *tr = iter->ops->private; in ftrace_process_regex()
4748 ftrace_set_hash(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_hash() argument
4758 mutex_lock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4761 orig_hash = &ops->func_hash->filter_hash; in ftrace_set_hash()
4763 orig_hash = &ops->func_hash->notrace_hash; in ftrace_set_hash()
4786 ret = ftrace_hash_move_and_update_ops(ops, orig_hash, hash, enable); in ftrace_set_hash()
4790 mutex_unlock(&ops->func_hash->regex_lock); in ftrace_set_hash()
4797 ftrace_set_addr(struct ftrace_ops *ops, unsigned long ip, int remove, in ftrace_set_addr() argument
4800 return ftrace_set_hash(ops, NULL, 0, ip, remove, reset, enable); in ftrace_set_addr()
4813 int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, in ftrace_set_filter_ip() argument
4816 ftrace_ops_init(ops); in ftrace_set_filter_ip()
4817 return ftrace_set_addr(ops, ip, remove, reset, 1); in ftrace_set_filter_ip()
4828 void ftrace_ops_set_global_filter(struct ftrace_ops *ops) in ftrace_ops_set_global_filter() argument
4830 if (ops->flags & FTRACE_OPS_FL_INITIALIZED) in ftrace_ops_set_global_filter()
4833 ftrace_ops_init(ops); in ftrace_ops_set_global_filter()
4834 ops->func_hash = &global_ops.local_hash; in ftrace_ops_set_global_filter()
4839 ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, in ftrace_set_regex() argument
4842 return ftrace_set_hash(ops, buf, len, 0, 0, reset, enable); in ftrace_set_regex()
4855 int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_filter() argument
4858 ftrace_ops_init(ops); in ftrace_set_filter()
4859 return ftrace_set_regex(ops, buf, len, reset, 1); in ftrace_set_filter()
4874 int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, in ftrace_set_notrace() argument
4877 ftrace_ops_init(ops); in ftrace_set_notrace()
4878 return ftrace_set_regex(ops, buf, len, reset, 0); in ftrace_set_notrace()
4993 ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable) in ftrace_set_early_filter() argument
4997 ftrace_ops_init(ops); in ftrace_set_early_filter()
5001 ftrace_set_regex(ops, func, strlen(func), 0, enable); in ftrace_set_early_filter()
5041 mutex_lock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
5047 orig_hash = &iter->ops->func_hash->filter_hash; in ftrace_regex_release()
5051 orig_hash = &iter->ops->func_hash->notrace_hash; in ftrace_regex_release()
5054 ret = ftrace_hash_move_and_update_ops(iter->ops, orig_hash, in ftrace_regex_release()
5062 mutex_unlock(&iter->ops->func_hash->regex_lock); in ftrace_regex_release()
5501 void ftrace_create_filter_files(struct ftrace_ops *ops, in ftrace_create_filter_files() argument
5506 ops, &ftrace_filter_fops); in ftrace_create_filter_files()
5509 ops, &ftrace_notrace_fops); in ftrace_create_filter_files()
5522 void ftrace_destroy_filter_files(struct ftrace_ops *ops) in ftrace_destroy_filter_files() argument
5525 if (ops->flags & FTRACE_OPS_FL_ENABLED) in ftrace_destroy_filter_files()
5526 ftrace_shutdown(ops, 0); in ftrace_destroy_filter_files()
5527 ops->flags |= FTRACE_OPS_FL_DELETED; in ftrace_destroy_filter_files()
5528 ftrace_free_filter(ops); in ftrace_destroy_filter_files()
5691 struct ftrace_ops *ops; in referenced_filters() local
5694 for (ops = ftrace_ops_list; ops != &ftrace_list_end; ops = ops->next) { in referenced_filters()
5695 if (ops_references_rec(ops, rec)) in referenced_filters()
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()
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()
6225 void __weak arch_ftrace_update_trampoline(struct ftrace_ops *ops) in arch_ftrace_update_trampoline() argument
6229 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
6231 arch_ftrace_update_trampoline(ops); in ftrace_update_trampoline()
6263 static void ftrace_update_trampoline(struct ftrace_ops *ops) in ftrace_update_trampoline() argument
6271 tr->ops = &global_ops; in ftrace_init_global_array_ops()
6272 tr->ops->private = tr; in ftrace_init_global_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()
6290 tr->ops->func = ftrace_stub; in ftrace_reset_array_ops()
6402 ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops) in ftrace_ops_get_func() argument
6408 if (!(ops->flags & FTRACE_OPS_FL_RECURSION_SAFE) || in ftrace_ops_get_func()
6409 ops->flags & FTRACE_OPS_FL_RCU) in ftrace_ops_get_func()
6412 return ops->func; in ftrace_ops_get_func()
6723 int register_ftrace_function(struct ftrace_ops *ops) in register_ftrace_function() argument
6727 ftrace_ops_init(ops); in register_ftrace_function()
6731 ret = ftrace_startup(ops, 0); in register_ftrace_function()
6745 int unregister_ftrace_function(struct ftrace_ops *ops) in unregister_ftrace_function() argument
6750 ret = ftrace_shutdown(ops, 0); in unregister_ftrace_function()