Merge tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt: - Remove code I accidentally applied when doing a minor fix up to a patch, and then using "git commit -a --amend", which pulled in some other changes I was playing with. - Remove an used variable in trace_events_inject code - Fix function graph tracer when it traces a ftrace direct function. It will now ignore tracing a function that has a ftrace direct tramploine attached. This is needed for eBPF to use the ftrace direct code. * tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix function_graph tracer interaction with BPF trampoline tracing: remove set but not used variable 'buffer' module: Remove accidental change of module_enable_x()
This commit is contained in:
@@ -2364,7 +2364,7 @@ int ftrace_direct_func_count;
|
||||
* Search the direct_functions hash to see if the given instruction pointer
|
||||
* has a direct caller attached to it.
|
||||
*/
|
||||
static unsigned long find_rec_direct(unsigned long ip)
|
||||
unsigned long ftrace_find_rec_direct(unsigned long ip)
|
||||
{
|
||||
struct ftrace_func_entry *entry;
|
||||
|
||||
@@ -2380,7 +2380,7 @@ static void call_direct_funcs(unsigned long ip, unsigned long pip,
|
||||
{
|
||||
unsigned long addr;
|
||||
|
||||
addr = find_rec_direct(ip);
|
||||
addr = ftrace_find_rec_direct(ip);
|
||||
if (!addr)
|
||||
return;
|
||||
|
||||
@@ -2393,11 +2393,6 @@ struct ftrace_ops direct_ops = {
|
||||
| FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS
|
||||
| FTRACE_OPS_FL_PERMANENT,
|
||||
};
|
||||
#else
|
||||
static inline unsigned long find_rec_direct(unsigned long ip)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */
|
||||
|
||||
/**
|
||||
@@ -2417,7 +2412,7 @@ unsigned long ftrace_get_addr_new(struct dyn_ftrace *rec)
|
||||
|
||||
if ((rec->flags & FTRACE_FL_DIRECT) &&
|
||||
(ftrace_rec_count(rec) == 1)) {
|
||||
addr = find_rec_direct(rec->ip);
|
||||
addr = ftrace_find_rec_direct(rec->ip);
|
||||
if (addr)
|
||||
return addr;
|
||||
WARN_ON_ONCE(1);
|
||||
@@ -2458,7 +2453,7 @@ unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec)
|
||||
|
||||
/* Direct calls take precedence over trampolines */
|
||||
if (rec->flags & FTRACE_FL_DIRECT_EN) {
|
||||
addr = find_rec_direct(rec->ip);
|
||||
addr = ftrace_find_rec_direct(rec->ip);
|
||||
if (addr)
|
||||
return addr;
|
||||
WARN_ON_ONCE(1);
|
||||
@@ -3604,7 +3599,7 @@ static int t_show(struct seq_file *m, void *v)
|
||||
if (rec->flags & FTRACE_FL_DIRECT) {
|
||||
unsigned long direct;
|
||||
|
||||
direct = find_rec_direct(rec->ip);
|
||||
direct = ftrace_find_rec_direct(rec->ip);
|
||||
if (direct)
|
||||
seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
|
||||
}
|
||||
@@ -5008,7 +5003,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
|
||||
mutex_lock(&direct_mutex);
|
||||
|
||||
/* See if there's a direct function at @ip already */
|
||||
if (find_rec_direct(ip))
|
||||
if (ftrace_find_rec_direct(ip))
|
||||
goto out_unlock;
|
||||
|
||||
ret = -ENODEV;
|
||||
@@ -5027,7 +5022,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
|
||||
if (ip != rec->ip) {
|
||||
ip = rec->ip;
|
||||
/* Need to check this ip for a direct. */
|
||||
if (find_rec_direct(ip))
|
||||
if (ftrace_find_rec_direct(ip))
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user