mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
ftrace: Add add_ftrace_hash_entry function
Renaming __add_hash_entry to add_ftrace_hash_entry and making it global, it will be used in following changes outside ftrace.c object. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20260606123955.345967-4-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
af7c323650
commit
2cd298c106
@@ -415,6 +415,7 @@ struct ftrace_hash *alloc_ftrace_hash(int size_bits);
|
||||
void free_ftrace_hash(struct ftrace_hash *hash);
|
||||
struct ftrace_func_entry *add_ftrace_hash_entry_direct(struct ftrace_hash *hash,
|
||||
unsigned long ip, unsigned long direct);
|
||||
void add_ftrace_hash_entry(struct ftrace_hash *hash, struct ftrace_func_entry *entry);
|
||||
void ftrace_hash_remove(struct ftrace_hash *hash);
|
||||
|
||||
/* The hash used to know what functions callbacks trace */
|
||||
|
||||
@@ -1198,8 +1198,7 @@ ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip)
|
||||
return __ftrace_lookup_ip(hash, ip);
|
||||
}
|
||||
|
||||
static void __add_hash_entry(struct ftrace_hash *hash,
|
||||
struct ftrace_func_entry *entry)
|
||||
void add_ftrace_hash_entry(struct ftrace_hash *hash, struct ftrace_func_entry *entry)
|
||||
{
|
||||
struct hlist_head *hhd;
|
||||
unsigned long key;
|
||||
@@ -1221,7 +1220,7 @@ add_ftrace_hash_entry_direct(struct ftrace_hash *hash, unsigned long ip, unsigne
|
||||
|
||||
entry->ip = ip;
|
||||
entry->direct = direct;
|
||||
__add_hash_entry(hash, entry);
|
||||
add_ftrace_hash_entry(hash, entry);
|
||||
|
||||
return entry;
|
||||
}
|
||||
@@ -1477,7 +1476,7 @@ static struct ftrace_hash *__move_hash(struct ftrace_hash *src, int size)
|
||||
hhd = &src->buckets[i];
|
||||
hlist_for_each_entry_safe(entry, tn, hhd, hlist) {
|
||||
remove_hash_entry(src, entry);
|
||||
__add_hash_entry(new_hash, entry);
|
||||
add_ftrace_hash_entry(new_hash, entry);
|
||||
}
|
||||
}
|
||||
return new_hash;
|
||||
@@ -5360,7 +5359,7 @@ int ftrace_func_mapper_add_ip(struct ftrace_func_mapper *mapper,
|
||||
map->entry.ip = ip;
|
||||
map->data = data;
|
||||
|
||||
__add_hash_entry(&mapper->hash, &map->entry);
|
||||
add_ftrace_hash_entry(&mapper->hash, &map->entry);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user