aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
authorStanislav Fomichev <stfomichev@yandex-team.ru>2014-07-18 07:17:27 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-07-18 15:48:52 -0400
commit6508fa761c330a1d2b4ae36199d08dbcb70e3ddb (patch)
treec5c76da37fddea1160d8a18ace06d89da3e20ec9 /kernel/trace/trace_functions_graph.c
parent021c5b34452d52e51664f09b98cd50c5495e74b6 (diff)
tracing: let user specify tracing_thresh after selecting function_graph
Currently, tracing_thresh works only if we specify it before selecting function_graph tracer. If we do the opposite, tracing_thresh will change it's value, but it will not be applied. To fix it, we add update_thresh callback which is called whenever tracing_thresh is updated and for function_graph tracer we register handler which reinitializes tracer depending on tracing_thresh. Link: http://lkml.kernel.org/p/20140718111727.GA3206@stfomichev-desktop.yandex.net Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r--kernel/trace/trace_functions_graph.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 2c944e6c4a9d..74d98820497c 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -475,6 +475,12 @@ static void graph_trace_reset(struct trace_array *tr)
475 unregister_ftrace_graph(); 475 unregister_ftrace_graph();
476} 476}
477 477
478int graph_trace_update_thresh(struct trace_array *tr)
479{
480 graph_trace_reset(tr);
481 return graph_trace_init(tr);
482}
483
478static int max_bytes_for_cpu; 484static int max_bytes_for_cpu;
479 485
480static enum print_line_t 486static enum print_line_t
@@ -1525,6 +1531,7 @@ static struct trace_event graph_trace_ret_event = {
1525 1531
1526static struct tracer graph_trace __tracer_data = { 1532static struct tracer graph_trace __tracer_data = {
1527 .name = "function_graph", 1533 .name = "function_graph",
1534 .update_thresh = graph_trace_update_thresh,
1528 .open = graph_trace_open, 1535 .open = graph_trace_open,
1529 .pipe_open = graph_trace_open, 1536 .pipe_open = graph_trace_open,
1530 .close = graph_trace_close, 1537 .close = graph_trace_close,