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>
Showing
- tools/perf/arch/arm/util/cs-etm.c 1 addition, 1 deletiontools/perf/arch/arm/util/cs-etm.c
- tools/perf/arch/arm64/util/arm-spe.c 1 addition, 1 deletiontools/perf/arch/arm64/util/arm-spe.c
- tools/perf/arch/s390/util/machine.c 1 addition, 1 deletiontools/perf/arch/s390/util/machine.c
- tools/perf/arch/x86/tests/intel-cqm.c 1 addition, 0 deletionstools/perf/arch/x86/tests/intel-cqm.c
- tools/perf/arch/x86/tests/rdpmc.c 1 addition, 1 deletiontools/perf/arch/x86/tests/rdpmc.c
- tools/perf/arch/x86/util/intel-bts.c 1 addition, 1 deletiontools/perf/arch/x86/util/intel-bts.c
- tools/perf/arch/x86/util/intel-pt.c 1 addition, 1 deletiontools/perf/arch/x86/util/intel-pt.c
- tools/perf/arch/x86/util/machine.c 1 addition, 1 deletiontools/perf/arch/x86/util/machine.c
- tools/perf/lib/core.c 7 additions, 0 deletionstools/perf/lib/core.c
- tools/perf/lib/include/internal/lib.h 2 additions, 0 deletionstools/perf/lib/include/internal/lib.h
- tools/perf/lib/include/perf/core.h 1 addition, 0 deletionstools/perf/lib/include/perf/core.h
- tools/perf/lib/lib.c 2 additions, 0 deletionstools/perf/lib/lib.c
- tools/perf/lib/libperf.map 1 addition, 0 deletionstools/perf/lib/libperf.map
- tools/perf/perf.c 4 additions, 3 deletionstools/perf/perf.c
- tools/perf/tests/mmap-thread-lookup.c 1 addition, 1 deletiontools/perf/tests/mmap-thread-lookup.c
- tools/perf/tests/vmlinux-kallsyms.c 1 addition, 1 deletiontools/perf/tests/vmlinux-kallsyms.c
- tools/perf/util/auxtrace.c 0 additions, 1 deletiontools/perf/util/auxtrace.c
- tools/perf/util/evlist.c 1 addition, 1 deletiontools/perf/util/evlist.c
- tools/perf/util/header.c 1 addition, 1 deletiontools/perf/util/header.c
- tools/perf/util/machine.c 1 addition, 0 deletionstools/perf/util/machine.c
Please register or sign in to comment