From 029c75e5cf166f9c04744d81c798f54a44a8417c Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 17 May 2018 16:31:32 -0300 Subject: perf tools: No need to unconditionally read the max_stack sysctls Let tools that need to have those variables with the sysctl current values use a function that will read them. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1ljj3oeo5kpt2n1icfd9vowe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/builtin-top.c') diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 3c061c57afb6..7a349fcd3864 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1264,7 +1264,7 @@ int cmd_top(int argc, const char **argv) .proc_map_timeout = 500, .overwrite = 1, }, - .max_stack = sysctl_perf_event_max_stack, + .max_stack = sysctl__max_stack(), .sym_pcnt_filter = 5, .nr_threads_synthesize = UINT_MAX, }; -- cgit v1.2.3