From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbdAUA2k (ORCPT ); Fri, 20 Jan 2017 19:28:40 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36837 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266AbdAUA2j (ORCPT ); Fri, 20 Jan 2017 19:28:39 -0500 Date: Sat, 21 Jan 2017 09:27:06 +0900 From: Namhyung Kim To: Steven Rostedt Cc: LKML , Ingo Molnar Subject: Re: [PATCH 2/3] ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip Message-ID: <20170121002706.GB23554@danjae.aot.lge.com> References: <20170120024447.26097-1-namhyung@kernel.org> <20170120024447.26097-2-namhyung@kernel.org> <20170120145420.5fc3018a@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170120145420.5fc3018a@gandalf.local.home> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 20, 2017 at 02:54:20PM -0500, Steven Rostedt wrote: > On Fri, 20 Jan 2017 11:44:46 +0900 > Namhyung Kim wrote: > > > > --- a/kernel/trace/trace.h > > +++ b/kernel/trace/trace.h > > @@ -787,6 +787,20 @@ extern void __trace_graph_return(struct trace_array *tr, > > struct ftrace_graph_ret *trace, > > unsigned long flags, int pc); > > > > +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; > > +} > > Note, I had to modify this patch and move this declaration outside of > the #ifdef CONFIG_FUNCTION_GRAPH_TRACER, as it failed to build when > function graph wasn't enabled. Function tracer uses this too. Oops, my bad. Did you modify it in your tree? Or do you want me to resend v2? Thanks, Namhyung > > > > #ifdef CONFIG_DYNAMIC_FTRACE > > /* TODO: make this variable */ >