Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513AbdCBU1S (ORCPT ); Thu, 2 Mar 2017 15:27:18 -0500 Received: from mga04.intel.com ([192.55.52.120]:61881 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbdCBU0o (ORCPT ); Thu, 2 Mar 2017 15:26:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,233,1484035200"; d="scan'208";a="830268840" Message-ID: <1488486402.7212.20.camel@linux.intel.com> Subject: Re: ftrace_graph_filter not working correctly since v4.10 From: Todd Brandt Reply-To: todd.e.brandt@linux.intel.com To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Namhyung Kim Date: Thu, 02 Mar 2017 12:26:42 -0800 In-Reply-To: <20170302130551.4ed29006@gandalf.local.home> References: <1488420091.7212.17.camel@linux.intel.com> <20170301222843.6ea73495@grimm.local.home> <20170301224730.2af14888@grimm.local.home> <20170302124940.19088e85@gandalf.local.home> <20170302130551.4ed29006@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1879 Lines: 71 On Thu, 2017-03-02 at 13:05 -0500, Steven Rostedt wrote: > Namhyung, > > Just an FYI... > > -- Steve > > > On Thu, 2 Mar 2017 12:49:40 -0500 > Steven Rostedt wrote: > > > On Wed, 1 Mar 2017 22:47:30 -0500 > > Steven Rostedt wrote: > > > > > On Wed, 1 Mar 2017 22:28:43 -0500 > > > Steven Rostedt wrote: > > > > > > > > 4.10 is fine. It's what has been merged for 4.11 that's broken. I'm > > > > doing a bisect now to see what broke it. Yes, lots of commits touched > > > > that code recently. > > > > > > I found the bad commit. I'll have a patch for you to test tomorrow. > > > > > > > Can you test this patch please. Awesome, seems to work fine now. I applied and tested it on bleeding edge: commit 4977ab6e92e267afe9d8f78438c3db330ca8434c Date: Wed Mar 1 17:04:50 2017 -0800 and it works on both msleep and do_one_initcall. Thanks! > > > > -- Steve > > > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > index 2d554a0..1b33a41 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -4403,10 +4403,9 @@ static void __init set_ftrace_early_graph(char *buf, int enable) > > char *func; > > struct ftrace_hash *hash; > > > > - if (enable) > > - hash = ftrace_graph_hash; > > - else > > - hash = ftrace_graph_notrace_hash; > > + hash = alloc_ftrace_hash(FTRACE_HASH_DEFAULT_BITS); > > + if (WARN_ON(!hash)) > > + return; > > > > while (buf) { > > func = strsep(&buf, ","); > > @@ -4416,6 +4415,11 @@ static void __init set_ftrace_early_graph(char *buf, int enable) > > printk(KERN_DEBUG "ftrace: function %s not " > > "traceable\n", func); > > } > > + > > + if (enable) > > + ftrace_graph_hash = hash; > > + else > > + ftrace_graph_notrace_hash = hash; > > } > > #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ > > >