aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-06 15:25:25 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-25 09:51:48 -0300
commit20f2be1d48ec293b5a935595bd0c2e2915ffa77c (patch)
treef949d8ac25875acc7639ba10f5cc026c94103760 /tools/perf/tests
parentlibperf: Add perf_evlist__id_add_fd() function (diff)
downloadlinux-dev-20f2be1d48ec293b5a935595bd0c2e2915ffa77c.tar.xz
linux-dev-20f2be1d48ec293b5a935595bd0c2e2915ffa77c.zip
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 <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-33-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/mmap-thread-lookup.c2
-rw-r--r--tools/perf/tests/vmlinux-kallsyms.c2
2 files changed, 2 insertions, 2 deletions
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 <internal/lib.h> // page_size
#define THREADS 4
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 7f28775875c2..aa296ffea6d1 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -7,7 +7,7 @@
#include "dso.h"
#include "map.h"
#include "symbol.h"
-#include "util.h" // page_size
+#include <internal/lib.h> // page_size
#include "tests.h"
#include "debug.h"
#include "machine.h"