Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a3083c authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

ftrace: Decouple hash items from showing filtered functions



The set_ftrace_filter shows "hashed" functions, which are functions
that are added with operations to them (like traceon and traceoff).

As other subsystems may be able to show what functions they are
using for function tracing, the hash items should no longer
be shown just because the FILTER flag is set. As they have nothing
to do with other subsystems filters.

Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent fc13cb0c
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -206,8 +206,9 @@ enum {
	FTRACE_ITER_FILTER	= (1 << 0),
	FTRACE_ITER_FILTER	= (1 << 0),
	FTRACE_ITER_NOTRACE	= (1 << 1),
	FTRACE_ITER_NOTRACE	= (1 << 1),
	FTRACE_ITER_PRINTALL	= (1 << 2),
	FTRACE_ITER_PRINTALL	= (1 << 2),
	FTRACE_ITER_HASH	= (1 << 3),
	FTRACE_ITER_DO_HASH	= (1 << 3),
	FTRACE_ITER_ENABLED	= (1 << 4),
	FTRACE_ITER_HASH	= (1 << 4),
	FTRACE_ITER_ENABLED	= (1 << 5),
};
};


void arch_ftrace_update_code(int command);
void arch_ftrace_update_code(int command);
+8 −8
Original line number Original line Diff line number Diff line
@@ -2198,6 +2198,9 @@ static void *t_hash_start(struct seq_file *m, loff_t *pos)
	void *p = NULL;
	void *p = NULL;
	loff_t l;
	loff_t l;


	if (!(iter->flags & FTRACE_ITER_DO_HASH))
		return NULL;

	if (iter->func_pos > *pos)
	if (iter->func_pos > *pos)
		return NULL;
		return NULL;


@@ -2343,13 +2346,9 @@ static void *t_start(struct seq_file *m, loff_t *pos)
			break;
			break;
	}
	}


	if (!p) {
	if (!p)
		if (iter->flags & FTRACE_ITER_FILTER)
		return t_hash_start(m, pos);
		return t_hash_start(m, pos);


		return NULL;
	}

	return iter;
	return iter;
}
}


@@ -2541,7 +2540,8 @@ ftrace_regex_open(struct ftrace_ops *ops, int flag,
static int
static int
ftrace_filter_open(struct inode *inode, struct file *file)
ftrace_filter_open(struct inode *inode, struct file *file)
{
{
	return ftrace_regex_open(&global_ops, FTRACE_ITER_FILTER,
	return ftrace_regex_open(&global_ops,
			FTRACE_ITER_FILTER | FTRACE_ITER_DO_HASH,
			inode, file);
			inode, file);
}
}