lkml.org 
[lkml]   [2019]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ftrace: simplify ftrace hash lookup code
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

\
 
 \ /
  Last update: 2019-09-09 02:05    [W:0.046 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site