Re: [PATCH] ftrace: simplify ftrace hash lookup code

From: Changbin Du
Date: Sun Sep 08 2019 - 20:05:19 EST


On Sun, Sep 08, 2019 at 08:05:45PM +0800, Changbin Du wrote:
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index 005f08629b8b..74162bc4024d 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -941,11 +941,6 @@ static inline int ftrace_graph_addr(struct ftrace_graph_ent *trace)
>
> preempt_disable_notrace();
>
> - if (ftrace_hash_empty(ftrace_graph_hash)) {
> - ret = 1;
> - goto out;
> - }
> -
Sorry, This remove is wrong. Will update change.

> if (ftrace_lookup_ip(ftrace_graph_hash, addr)) {
>
> /*
> @@ -967,7 +962,6 @@ static inline int ftrace_graph_addr(struct ftrace_graph_ent *trace)
> ret = 1;
> }
>
> -out:
> preempt_enable_notrace();
> return ret;
> }
> --
> 2.20.1
>

--
Cheers,
Changbin Du