diff options
author | Namhyung Kim <namhyung@kernel.org> | 2017-01-20 03:44:46 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-01-20 20:50:21 +0100 |
commit | 4046bf023b0647d09704a32d9fe8aecbcee3e4c3 (patch) | |
tree | 9c3ef245b59ed01b9374f70a76390bf719abf25e /kernel/trace/trace.h | |
parent | ftrace: Factor out __ftrace_hash_move() (diff) | |
download | linux-4046bf023b0647d09704a32d9fe8aecbcee3e4c3.tar.xz linux-4046bf023b0647d09704a32d9fe8aecbcee3e4c3.zip |
ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip
It will be used when checking graph filter hashes later.
Link: http://lkml.kernel.org/r/20170120024447.26097-2-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
[ Moved ftrace_hash dec and functions outside of FUNCTION_GRAPH define ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 1ea51ab53edf..9001460291bb 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -753,6 +753,21 @@ enum print_line_t print_trace_line(struct trace_iterator *iter); extern char trace_find_mark(unsigned long long duration); +struct ftrace_hash { + unsigned long size_bits; + struct hlist_head *buckets; + unsigned long count; + struct rcu_head rcu; +}; + +struct ftrace_func_entry * +ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip); + +static bool __always_inline ftrace_hash_empty(struct ftrace_hash *hash) +{ + return !hash || !hash->count; +} + /* Standard output formatting function used for function return traces */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER @@ -787,7 +802,6 @@ extern void __trace_graph_return(struct trace_array *tr, struct ftrace_graph_ret *trace, unsigned long flags, int pc); - #ifdef CONFIG_DYNAMIC_FTRACE /* TODO: make this variable */ #define FTRACE_GRAPH_MAX_FUNCS 32 |