• Home
  • Raw
  • Download

Lines Matching refs:ip

125 void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
139 static void ftrace_pid_func(unsigned long ip, unsigned long parent_ip, in ftrace_pid_func() argument
154 op->saved_func(ip, parent_ip, op, fregs); in ftrace_pid_func()
384 unsigned long ip; member
525 kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); in function_stat_show()
687 ftrace_find_profiled_func(struct ftrace_profile_stat *stat, unsigned long ip) in ftrace_find_profiled_func() argument
693 key = hash_long(ip, FTRACE_PROFILE_HASH_BITS); in ftrace_find_profiled_func()
700 if (rec->ip == ip) in ftrace_find_profiled_func()
712 key = hash_long(rec->ip, FTRACE_PROFILE_HASH_BITS); in ftrace_add_profile()
720 ftrace_profile_alloc(struct ftrace_profile_stat *stat, unsigned long ip) in ftrace_profile_alloc() argument
732 rec = ftrace_find_profiled_func(stat, ip); in ftrace_profile_alloc()
743 rec->ip = ip; in ftrace_profile_alloc()
753 function_profile_call(unsigned long ip, unsigned long parent_ip, in function_profile_call() argument
769 rec = ftrace_find_profiled_func(stat, ip); in function_profile_call()
771 rec = ftrace_profile_alloc(stat, ip); in function_profile_call()
1098 ftrace_hash_key(struct ftrace_hash *hash, unsigned long ip) in ftrace_hash_key() argument
1101 return hash_long(ip, hash->size_bits); in ftrace_hash_key()
1108 __ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip) in __ftrace_lookup_ip() argument
1114 key = ftrace_hash_key(hash, ip); in __ftrace_lookup_ip()
1118 if (entry->ip == ip) in __ftrace_lookup_ip()
1135 ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip) in ftrace_lookup_ip() argument
1140 return __ftrace_lookup_ip(hash, ip); in ftrace_lookup_ip()
1149 key = ftrace_hash_key(hash, entry->ip); in __add_hash_entry()
1155 static int add_hash_entry(struct ftrace_hash *hash, unsigned long ip) in add_hash_entry() argument
1163 entry->ip = ip; in add_hash_entry()
1338 ret = add_hash_entry(new_hash, entry->ip); in alloc_and_copy_ftrace_hash()
1449 static bool hash_contains_ip(unsigned long ip, in hash_contains_ip() argument
1459 __ftrace_lookup_ip(hash->filter_hash, ip)) && in hash_contains_ip()
1461 !__ftrace_lookup_ip(hash->notrace_hash, ip)); in hash_contains_ip()
1477 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
1495 if (hash_contains_ip(ip, &hash)) in ftrace_ops_test()
1523 if (key->flags < rec->ip) in ftrace_cmp_recs()
1525 if (key->ip >= rec->ip + MCOUNT_INSN_SIZE) in ftrace_cmp_recs()
1536 key.ip = start; in lookup_rec()
1541 end < pg->records[0].ip || in lookup_rec()
1542 start >= (pg->records[pg->index - 1].ip + MCOUNT_INSN_SIZE)) in lookup_rec()
1571 return rec->ip; in ftrace_location_range()
1584 unsigned long ftrace_location(unsigned long ip) in ftrace_location() argument
1590 rec = lookup_rec(ip, ip); in ftrace_location()
1592 if (!kallsyms_lookup_size_offset(ip, &size, &offset)) in ftrace_location()
1597 rec = lookup_rec(ip, ip + size - 1); in ftrace_location()
1601 return rec->ip; in ftrace_location()
1636 if (ftrace_ops_test(ops, rec->ip, rec)) { in test_rec_ops_needs_regs()
1723 if (!other_hash || !ftrace_lookup_ip(other_hash, rec->ip)) in __ftrace_hash_rec_update()
1726 in_hash = !!ftrace_lookup_ip(hash, rec->ip); in __ftrace_hash_rec_update()
1727 in_other_hash = !!ftrace_lookup_ip(other_hash, rec->ip); in __ftrace_hash_rec_update()
1937 in_old = !!ftrace_lookup_ip(old_hash, rec->ip); in __ftrace_hash_update_ipmodify()
1938 in_new = !!ftrace_lookup_ip(new_hash, rec->ip); in __ftrace_hash_update_ipmodify()
1985 in_old = !!ftrace_lookup_ip(old_hash, rec->ip); in __ftrace_hash_update_ipmodify()
1986 in_new = !!ftrace_lookup_ip(new_hash, rec->ip); in __ftrace_hash_update_ipmodify()
2085 unsigned long ip = rec ? rec->ip : 0; in ftrace_bug() local
2092 print_ip_sym(KERN_INFO, ip); in ftrace_bug()
2096 print_ip_sym(KERN_INFO, ip); in ftrace_bug()
2097 print_ip_ins(" actual: ", (unsigned char *)ip); in ftrace_bug()
2106 print_ip_sym(KERN_INFO, ip); in ftrace_bug()
2110 print_ip_sym(KERN_INFO, ip); in ftrace_bug()
2132 ip = ftrace_get_addr_curr(rec); in ftrace_bug()
2133 pr_cont("\n expected tramp: %lx\n", ip); in ftrace_bug()
2305 unsigned long ip = rec->ip; in ftrace_find_tramp_ops_any() local
2312 if (hash_contains_ip(ip, op->func_hash)) in ftrace_find_tramp_ops_any()
2323 unsigned long ip = rec->ip; in ftrace_find_tramp_ops_any_other() local
2330 if (hash_contains_ip(ip, op->func_hash)) in ftrace_find_tramp_ops_any_other()
2341 unsigned long ip = rec->ip; in ftrace_find_tramp_ops_next() local
2348 if (hash_contains_ip(ip, op->func_hash)) in ftrace_find_tramp_ops_next()
2359 unsigned long ip = rec->ip; in ftrace_find_tramp_ops_curr() local
2368 if (hash_contains_ip(ip, &removed_ops->old_hash)) in ftrace_find_tramp_ops_curr()
2409 hash_contains_ip(ip, &op->old_hash)) in ftrace_find_tramp_ops_curr()
2417 hash_contains_ip(ip, op->func_hash)) in ftrace_find_tramp_ops_curr()
2429 unsigned long ip = rec->ip; in ftrace_find_tramp_ops_new() local
2433 if (hash_contains_ip(ip, op->func_hash)) in ftrace_find_tramp_ops_new()
2450 unsigned long ftrace_find_rec_direct(unsigned long ip) in ftrace_find_rec_direct() argument
2454 entry = __ftrace_lookup_ip(direct_functions, ip); in ftrace_find_rec_direct()
2462 ftrace_add_rec_direct(unsigned long ip, unsigned long addr, in ftrace_add_rec_direct() argument
2488 entry->ip = ip; in ftrace_add_rec_direct()
2494 static void call_direct_funcs(unsigned long ip, unsigned long pip, in call_direct_funcs() argument
2500 addr = ftrace_find_rec_direct(ip); in call_direct_funcs()
2539 addr = ftrace_find_rec_direct(rec->ip); in ftrace_get_addr_new()
2550 (void *)rec->ip, (void *)rec->ip, rec->flags); in ftrace_get_addr_new()
2580 addr = ftrace_find_rec_direct(rec->ip); in ftrace_get_addr_curr()
2591 (void *)rec->ip, (void *)rec->ip); in ftrace_get_addr_curr()
3066 (void *)rec->ip, rec->flags); in ftrace_shutdown()
3418 return probe_ops->print(m, probe_entry->ip, probe_ops, probe->data); in t_probe_show()
3420 seq_printf(m, "%ps:%ps\n", (void *)probe_entry->ip, in t_probe_show()
3520 !ftrace_lookup_ip(iter->hash, rec->ip)) || in t_func_next()
3669 ret = kallsyms_lookup(rec->ip, NULL, &offset, NULL, str); in test_for_valid_rec()
3718 static int print_rec(struct seq_file *m, unsigned long ip) in print_rec() argument
3725 ret = kallsyms_lookup(ip, NULL, &offset, &modname, str); in print_rec()
3744 static inline int print_rec(struct seq_file *m, unsigned long ip) in print_rec() argument
3746 seq_printf(m, "%ps", (void *)ip); in print_rec()
3775 if (print_rec(m, rec->ip)) { in t_show()
3808 direct = ftrace_find_rec_direct(rec->ip); in t_show()
4057 entry = ftrace_lookup_ip(hash, rec->ip); in enter_record()
4069 ret = add_hash_entry(hash, rec->ip); in enter_record()
4100 static int lookup_ip(unsigned long ip, char **modname, char *str) in lookup_ip() argument
4104 kallsyms_lookup(ip, NULL, &offset, modname, str); in lookup_ip()
4110 static int lookup_ip(unsigned long ip, char **modname, char *str) in lookup_ip() argument
4112 kallsyms_lookup(ip, NULL, NULL, modname, str); in lookup_ip()
4124 if (lookup_ip(rec->ip, &modname, str)) { in ftrace_match_record()
4473 static void function_trace_probe_call(unsigned long ip, unsigned long parent_ip, in function_trace_probe_call() argument
4488 probe_ops->func(ip, parent_ip, probe->tr, probe_ops, probe->data); in function_trace_probe_call()
4531 unsigned long ip) in ftrace_func_mapper_find_ip() argument
4536 entry = ftrace_lookup_ip(&mapper->hash, ip); in ftrace_func_mapper_find_ip()
4553 unsigned long ip, void *data) in ftrace_func_mapper_add_ip() argument
4558 entry = ftrace_lookup_ip(&mapper->hash, ip); in ftrace_func_mapper_add_ip()
4566 map->entry.ip = ip; in ftrace_func_mapper_add_ip()
4585 unsigned long ip) in ftrace_func_mapper_remove_ip() argument
4591 entry = ftrace_lookup_ip(&mapper->hash, ip); in ftrace_func_mapper_remove_ip()
4745 if (ftrace_lookup_ip(old_hash, entry->ip)) in register_ftrace_function_probe()
4754 entry->ip, data, in register_ftrace_function_probe()
4807 if (ftrace_lookup_ip(old_hash, entry->ip)) in register_ftrace_function_probe()
4809 probe_ops->free(probe_ops, tr, entry->ip, probe->data); in register_ftrace_function_probe()
4890 kallsyms_lookup(entry->ip, NULL, NULL, in unregister_ftrace_function_probe_func()
4928 probe_ops->free(probe_ops, tr, entry->ip, probe->data); in unregister_ftrace_function_probe_func()
5094 __ftrace_match_addr(struct ftrace_hash *hash, unsigned long ip, int remove) in __ftrace_match_addr() argument
5098 ip = ftrace_location(ip); in __ftrace_match_addr()
5099 if (!ip) in __ftrace_match_addr()
5103 entry = ftrace_lookup_ip(hash, ip); in __ftrace_match_addr()
5110 return add_hash_entry(hash, ip); in __ftrace_match_addr()
5264 int register_ftrace_direct(unsigned long ip, unsigned long addr) in register_ftrace_direct() argument
5274 ip = ftrace_location(ip); in register_ftrace_direct()
5275 if (!ip) in register_ftrace_direct()
5280 if (ftrace_find_rec_direct(ip)) in register_ftrace_direct()
5284 rec = lookup_rec(ip, ip); in register_ftrace_direct()
5296 if (ip != rec->ip) { in register_ftrace_direct()
5297 ip = rec->ip; in register_ftrace_direct()
5299 if (ftrace_find_rec_direct(ip)) in register_ftrace_direct()
5311 entry = ftrace_add_rec_direct(ip, addr, &free_hash); in register_ftrace_direct()
5315 ret = ftrace_set_filter_ip(&direct_ops, ip, 0, 0); in register_ftrace_direct()
5320 ftrace_set_filter_ip(&direct_ops, ip, 1, 0); in register_ftrace_direct()
5350 static struct ftrace_func_entry *find_direct_entry(unsigned long *ip, in find_direct_entry() argument
5356 rec = lookup_rec(*ip, *ip); in find_direct_entry()
5360 entry = __ftrace_lookup_ip(direct_functions, rec->ip); in find_direct_entry()
5369 *ip = rec->ip; in find_direct_entry()
5377 int unregister_ftrace_direct(unsigned long ip, unsigned long addr) in unregister_ftrace_direct() argument
5386 ip = ftrace_location(ip); in unregister_ftrace_direct()
5387 if (!ip) in unregister_ftrace_direct()
5390 entry = find_direct_entry(&ip, NULL); in unregister_ftrace_direct()
5398 ret = ftrace_set_filter_ip(&direct_ops, ip, 1, 0); in unregister_ftrace_direct()
5453 unsigned long ip = rec->ip; in ftrace_modify_direct_caller() local
5476 ret = ftrace_set_filter_ip(&stub_ops, ip, 0, 0); in ftrace_modify_direct_caller()
5482 ftrace_set_filter_ip(&stub_ops, ip, 1, 0); in ftrace_modify_direct_caller()
5493 ftrace_set_filter_ip(&stub_ops, ip, 1, 0); in ftrace_modify_direct_caller()
5515 int modify_ftrace_direct(unsigned long ip, in modify_ftrace_direct() argument
5527 ip = ftrace_location(ip); in modify_ftrace_direct()
5528 if (!ip) in modify_ftrace_direct()
5531 entry = find_direct_entry(&ip, &rec); in modify_ftrace_direct()
5603 del = __ftrace_lookup_ip(direct_functions, entry->ip); in remove_direct_functions_hash()
5657 if (ftrace_find_rec_direct(entry->ip)) in register_ftrace_direct_multi()
5666 new = ftrace_add_rec_direct(entry->ip, addr, &free_hash); in register_ftrace_direct_multi()
5761 entry = __ftrace_lookup_ip(direct_functions, iter->ip); in __modify_ftrace_direct_multi()
5851 int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, in ftrace_set_filter_ip() argument
5855 return ftrace_set_addr(ops, &ip, 1, remove, reset, 1); in ftrace_set_filter_ip()
6282 seq_printf(m, "%ps\n", (void *)entry->ip); in g_show()
6506 entry = ftrace_lookup_ip(hash, rec->ip); in ftrace_graph_set_hash()
6513 if (add_hash_entry(hash, rec->ip) < 0) in ftrace_graph_set_hash()
6756 rec->ip = addr; in ftrace_process_locs()
6795 unsigned long ip; member
6839 ops_references_ip(struct ftrace_ops *ops, unsigned long ip) in ops_references_ip() argument
6851 !__ftrace_lookup_ip(ops->func_hash->filter_hash, ip)) in ops_references_ip()
6855 if (ftrace_lookup_ip(ops->func_hash->notrace_hash, ip)) in ops_references_ip()
6874 if (ops_references_ip(ops, rec->ip)) { in referenced_filters()
6904 entry = __ftrace_lookup_ip(hash, rec->ip); in clear_mod_from_hash()
6911 entry->ip = 0; in clear_mod_from_hash()
6977 if (within_module_core(rec->ip, mod) || in ftrace_release_mod()
6978 within_module_init(rec->ip, mod)) { in ftrace_release_mod()
7050 if (!within_module_core(rec->ip, mod) && in ftrace_module_enable()
7051 !within_module_init(rec->ip, mod)) in ftrace_module_enable()
7119 ret = kallsyms_lookup(rec->ip, &symsize, &offset, &modname, str); in save_ftrace_mod_rec()
7133 mod_func->ip = rec->ip - offset; in save_ftrace_mod_rec()
7172 if (addr >= mod_func->ip && in ftrace_func_address_lookup()
7173 addr < mod_func->ip + mod_func->size) { in ftrace_func_address_lookup()
7183 *off = addr - found_func->ip; in ftrace_func_address_lookup()
7237 *value = mod_func->ip; in ftrace_mod_get_kallsym()
7279 unsigned long ip; member
7288 entry = ftrace_lookup_ip(hash, func->ip); in clear_func_from_hash()
7295 entry->ip = 0; in clear_func_from_hash()
7326 func->ip = rec->ip; in add_to_clear_hash_list()
7344 key.ip = start; in ftrace_free_mem()
7358 if (end < pg->records[0].ip || in ftrace_free_mem()
7359 start >= (pg->records[pg->index - 1].ip + MCOUNT_INSN_SIZE)) in ftrace_free_mem()
7541 __ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, in __ftrace_ops_list_func() argument
7553 bit = trace_test_and_set_recursion(ip, parent_ip, TRACE_LIST_START); in __ftrace_ops_list_func()
7571 ftrace_ops_test(op, ip, regs)) { in __ftrace_ops_list_func()
7576 op->func(ip, parent_ip, op, fregs); in __ftrace_ops_list_func()
7600 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, in arch_ftrace_ops_list_func() argument
7603 __ftrace_ops_list_func(ip, parent_ip, NULL, fregs); in arch_ftrace_ops_list_func()
7606 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip) in arch_ftrace_ops_list_func() argument
7608 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL); in arch_ftrace_ops_list_func()
7618 static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip, in ftrace_ops_assist_func() argument
7623 bit = trace_test_and_set_recursion(ip, parent_ip, TRACE_LIST_START); in ftrace_ops_assist_func()
7628 op->func(ip, parent_ip, op, fregs); in ftrace_ops_assist_func()
8133 unsigned long ip = entry->ip; in prepare_direct_functions_for_ipmodify() local
8140 if (ops_references_ip(op, ip)) { in prepare_direct_functions_for_ipmodify()
8182 unsigned long ip = entry->ip; in cleanup_direct_functions_after_ipmodify() local
8189 if (ops_references_ip(op, ip)) { in cleanup_direct_functions_after_ipmodify()