From 20f2be1d48ec293b5a935595bd0c2e2915ffa77c Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 6 Aug 2019 15:25:25 +0200 Subject: libperf: Move 'page_size' global variable to libperf We need the 'page_size' variable in libperf, so move it there. Add a libperf_init() as a global libperf init function to obtain this value via sysconf() at tool start. Committer notes: Add internal/lib.h to tools/perf/ files using 'page_size', sometimes replacing util.h with it if that was the only reason for having util.h included. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20190913132355.21634-33-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/mmap-thread-lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/tests/mmap-thread-lookup.c') diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c index 33b496d194f4..8d9d4cbff76d 100644 --- a/tools/perf/tests/mmap-thread-lookup.c +++ b/tools/perf/tests/mmap-thread-lookup.c @@ -16,7 +16,7 @@ #include "symbol.h" #include "util/synthetic-events.h" #include "thread.h" -#include "util.h" // page_size +#include // page_size #define THREADS 4 -- cgit v1.2.3