Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3236277imu; Sat, 24 Nov 2018 00:46:13 -0800 (PST) X-Google-Smtp-Source: AJdET5ejQ5ldP4ekuIhkz2e4i7C+6O2nMGoUJfeyNuA8E0EEXDmwHdOtSqDXY1P6vSrobkNu9z85 X-Received: by 2002:a65:6542:: with SMTP id a2mr17020002pgw.389.1543049173435; Sat, 24 Nov 2018 00:46:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543049173; cv=none; d=google.com; s=arc-20160816; b=muXKJNrOsd93rFxQufyGY6XFfk0q7ixBTPggqS0E3SzpU9uTHRY2ZPy7N8PMAzOwh1 srm+5a0FwATP6s/BpjHCIQ8P2POg/jWJEpvJg9xcuvi2VoKZ0yfkmjN4zsqIq12lGet7 76rU1kI9esbUXogsjOvwQtIlfM6Zq4wG0rqtX70jrFzhvQbjQtgi+J5oqq3aAoZVgSzR dTGucOQV90uvrVcXuzmplr0LVFz82eTT5pPJ2mZ1Sh3XRrUw4zD+/OCQxNw88oiepvJe bKM4YdglPyaknZxnB9lG15X8z/gKAWMeHd3VaXskSM/0SRqU/u0KGazaVRRoezzt79V6 6B5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6xppOI+NrUj8UySVUGK/fxJ+JSgvdIGsCNKt1BbUPt4=; b=F/s/FRxIJRyFlDjcpEDZvOVCTrUbxh2HwQ+mzh488r/6ZbnK/tHluI/sbSq0TbKcyO fgjJoE0Buz6HJyh62p0fc3+EIJj2oFW32tlpod0D/XzqmnGRJ3ZZ3Cx7iLqeSXpWHkHA iAWLIURbkGwYy94IcwfUL7VBTvlkSsDcCeax1znDmnT8obP2tWhBToAZiLJBG8uXodML eIptrwx2qpmOFhd0bboobBowVPsxemVc7Q4UPEBpKj/sUtSe5ie3B3CVPqlkQJT+gAhd BRo3ekVh24E+4LxOhOtqVMod5QaTgrnqEgL3b3WanGWgyn56c31mQHlEMLsCrUP11ICL 3NhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si29974656plk.260.2018.11.24.00.45.59; Sat, 24 Nov 2018 00:46:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441040AbeKXEny (ORCPT + 99 others); Fri, 23 Nov 2018 23:43:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:35698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730951AbeKXEny (ORCPT ); Fri, 23 Nov 2018 23:43:54 -0500 Received: from vmware.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 52C7120863; Fri, 23 Nov 2018 17:58:36 +0000 (UTC) Date: Fri, 23 Nov 2018 12:58:34 -0500 From: Steven Rostedt To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Masami Hiramatsu , Josh Poimboeuf , Frederic Weisbecker , Andy Lutomirski , Mark Rutland Subject: Re: [RFC][PATCH 06/14] fgraph: Move function graph specific code into fgraph.c Message-ID: <20181123125834.1ddc367e@vmware.local.home> In-Reply-To: <20181123061133.GA195223@google.com> References: <20181122012708.491151844@goodmis.org> <20181122012803.442190047@goodmis.org> <20181123061133.GA195223@google.com> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Nov 2018 22:11:33 -0800 Joel Fernandes wrote: > On Wed, Nov 21, 2018 at 08:27:14PM -0500, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > > > To make the function graph infrastructure more managable, the code needs to > > be in its own file (fgraph.c). Move the code that is specific for managing > > the function graph infrastructure out of ftrace.c and into fgraph.c > > > > Signed-off-by: Steven Rostedt (VMware) > > I think this patch causes a build error if CONFIG_FUNCTION_PROFILER is > disabled but function graph is enabled. The following diff fixes it for me. Thanks for reporting this. > > thanks, > > - Joel > > ----8<------ > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 3b8c307c7ff0..ce38bb962f91 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -382,6 +382,15 @@ static void ftrace_update_pid_func(void) > update_ftrace_function(); > } > > +#ifdef CONFIG_FUNCTION_GRAPH_TRACER > +static bool fgraph_graph_time = true; > + > +void ftrace_graph_graph_time_control(bool enable) > +{ > + fgraph_graph_time = enable; > +} > +#endif > + I think the better answer is to move it into trace_functions_graph.c. I'll do that and give you the "reported-by". -- Steve > #ifdef CONFIG_FUNCTION_PROFILER > struct ftrace_profile { > struct hlist_node node; > @@ -783,12 +792,6 @@ function_profile_call(unsigned long ip, unsigned long parent_ip, > } > > #ifdef CONFIG_FUNCTION_GRAPH_TRACER > -static bool fgraph_graph_time = true; > - > -void ftrace_graph_graph_time_control(bool enable) > -{ > - fgraph_graph_time = enable; > -} > > static int profile_graph_entry(struct ftrace_graph_ent *trace) > {