]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ftrace/graph: Add ftrace_graph_max_depth kernel parameter
authorTodd Brandt <todd.e.brandt@linux.intel.com>
Fri, 3 Mar 2017 00:12:15 +0000 (16:12 -0800)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 3 Mar 2017 14:45:01 +0000 (09:45 -0500)
Early trace callgraphs can be extremely large on systems with
several seconds of boot time. The max_depth parameter limits how
deep the graph trace goes and reduces the output size. This
parameter is the same as the max_graph_depth file in tracefs.

Link: http://lkml.kernel.org/r/1488499935-23216-1-git-send-email-todd.e.brandt@linux.intel.com
Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
[ changed comments about debugfs to tracefs ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Documentation/admin-guide/kernel-parameters.txt
kernel/trace/ftrace.c

index 21e2d88637050b7a33f141e558fff43d3f23d0c9..1c9016b27ee90c594703e09dc7ca59145859b222 100644 (file)
                        functions that can be changed at run time by the
                        set_graph_notrace file in the debugfs tracing directory.
 
+       ftrace_graph_max_depth=<uint>
+                       [FTRACE] Used with the function graph tracer. This is
+                       the max depth it will trace into a function. This value
+                       can be changed at run time by the max_graph_depth file
+                       in the tracefs tracing directory. default: 0 (no limit)
+
        gamecon.map[2|3]=
                        [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
                        support via parallel port (up to 5 devices per port)
index 44122e7a6418bcaad4482fb032493a1ab1df57b1..d129ae51329a2de1e2fc569d693c5001b1ef9fe6 100644 (file)
@@ -4415,6 +4415,15 @@ static int __init set_graph_notrace_function(char *str)
 }
 __setup("ftrace_graph_notrace=", set_graph_notrace_function);
 
+static int __init set_graph_max_depth_function(char *str)
+{
+       if (!str)
+               return 0;
+       fgraph_max_depth = simple_strtoul(str, NULL, 0);
+       return 1;
+}
+__setup("ftrace_graph_max_depth=", set_graph_max_depth_function);
+
 static void __init set_ftrace_early_graph(char *buf, int enable)
 {
        int ret;