aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-05-17 16:31:32 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-05-17 16:31:32 -0300
commit029c75e5cf166f9c04744d81c798f54a44a8417c (patch)
tree7274bd2df51402c0c310bd56146611cb9635bc4d /tools/perf/perf.c
parentperf tools: Read the cache line size lazily (diff)
downloadlinux-dev-029c75e5cf166f9c04744d81c798f54a44a8417c.tar.xz
linux-dev-029c75e5cf166f9c04744d81c798f54a44a8417c.zip
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 <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-1ljj3oeo5kpt2n1icfd9vowe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index cefd8f74630c..51c81509a315 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -426,7 +426,6 @@ int main(int argc, const char **argv)
int err;
const char *cmd;
char sbuf[STRERR_BUFSIZE];
- int value;
/* libsubcmd init */
exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT);
@@ -435,12 +434,6 @@ int main(int argc, const char **argv)
/* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
- if (sysctl__read_int("kernel/perf_event_max_stack", &value) == 0)
- sysctl_perf_event_max_stack = value;
-
- if (sysctl__read_int("kernel/perf_event_max_contexts_per_stack", &value) == 0)
- sysctl_perf_event_max_contexts_per_stack = value;
-
cmd = extract_argv0_path(argv[0]);
if (!cmd)
cmd = "perf-help";