aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 0d1597c9ee30..b9691ee8f6c1 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4416,16 +4416,24 @@ static int __init set_graph_notrace_function(char *str)
4416} 4416}
4417__setup("ftrace_graph_notrace=", set_graph_notrace_function); 4417__setup("ftrace_graph_notrace=", set_graph_notrace_function);
4418 4418
4419static int __init set_graph_max_depth_function(char *str)
4420{
4421 if (!str)
4422 return 0;
4423 fgraph_max_depth = simple_strtoul(str, NULL, 0);
4424 return 1;
4425}
4426__setup("ftrace_graph_max_depth=", set_graph_max_depth_function);
4427
4419static void __init set_ftrace_early_graph(char *buf, int enable) 4428static void __init set_ftrace_early_graph(char *buf, int enable)
4420{ 4429{
4421 int ret; 4430 int ret;
4422 char *func; 4431 char *func;
4423 struct ftrace_hash *hash; 4432 struct ftrace_hash *hash;
4424 4433
4425 if (enable) 4434 hash = alloc_ftrace_hash(FTRACE_HASH_DEFAULT_BITS);
4426 hash = ftrace_graph_hash; 4435 if (WARN_ON(!hash))
4427 else 4436 return;
4428 hash = ftrace_graph_notrace_hash;
4429 4437
4430 while (buf) { 4438 while (buf) {
4431 func = strsep(&buf, ","); 4439 func = strsep(&buf, ",");
@@ -4435,6 +4443,11 @@ static void __init set_ftrace_early_graph(char *buf, int enable)
4435 printk(KERN_DEBUG "ftrace: function %s not " 4443 printk(KERN_DEBUG "ftrace: function %s not "
4436 "traceable\n", func); 4444 "traceable\n", func);
4437 } 4445 }
4446
4447 if (enable)
4448 ftrace_graph_hash = hash;
4449 else
4450 ftrace_graph_notrace_hash = hash;
4438} 4451}
4439#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 4452#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
4440 4453
@@ -5488,7 +5501,7 @@ static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip,
5488 * Normally the mcount trampoline will call the ops->func, but there 5501 * Normally the mcount trampoline will call the ops->func, but there
5489 * are times that it should not. For example, if the ops does not 5502 * are times that it should not. For example, if the ops does not
5490 * have its own recursion protection, then it should call the 5503 * have its own recursion protection, then it should call the
5491 * ftrace_ops_recurs_func() instead. 5504 * ftrace_ops_assist_func() instead.
5492 * 5505 *
5493 * Returns the function that the trampoline should call for @ops. 5506 * Returns the function that the trampoline should call for @ops.
5494 */ 5507 */