lkml.org 
[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC][PATCH 06/14] fgraph: Move function graph specific code into fgraph.c
On Wed, Nov 21, 2018 at 08:27:14PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> 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) <rostedt@goodmis.org>

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,

- 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
+
#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)
{
\
 
 \ /
  Last update: 2018-11-23 07:12    [W:0.403 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site