Arnaldo Carvalho de Melo
9f3156903d
tools: Sync kvm related header files for arm64 and s390
...
From a quick look nothing stands out as requiring changes to kvm tools
such as tools/perf/arch/s390/util/kvm-stat.c.
Silences these header checking warnings:
$ make -C tools/perf
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Warning: tools/arch/s390/include/uapi/asm/kvm.h differs from kernel
Warning: tools/arch/s390/include/uapi/asm/sie.h differs from kernel
Warning: tools/arch/arm64/include/uapi/asm/kvm.h differs from kernel
<SNIP>
Cc: Adrian Hunter <[email protected] >
Cc: Alexander Yarygin <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Hemant Kumar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Michael Ellerman <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Naveen N. Rao <[email protected] >
Cc: Scott Wood <[email protected] >
Cc: Srikar Dronamraju <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-08-15 18:11:17 -03:00
Arnaldo Carvalho de Melo
840b49ba55
tools: Sync cpufeatures headers with the kernel
...
Due to:
1e61f78baf ("x86/cpufeature: Make sure DISABLED/REQUIRED macros are updated")
No changes to tools using those headers (tools/arch/x86/lib/mem{set,cpu}_64.S)
seems necessary.
Detected by the tools build header drift checker:
$ make -C tools/perf O=/tmp/build/perf
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
GEN /tmp/build/perf/common-cmds.h
Warning: tools/arch/x86/include/asm/disabled-features.h differs from kernel
Warning: tools/arch/x86/include/asm/required-features.h differs from kernel
Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel
CC /tmp/build/perf/util/probe-finder.o
CC /tmp/build/perf/builtin-help.o
<SNIP>
^C$
Cc: Adrian Hunter <[email protected] >
Cc: Dave Hansen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-08-09 11:56:33 -03:00
Arnaldo Carvalho de Melo
bebfb73012
tools: Sync cpufeatures.h and vmx.h with the kernel
...
There were changes related to the deprecation of the "pcommit"
instruction:
fd1d961dd6 ("x86/insn: remove pcommit")
dfa169bbee ("Revert "KVM: x86: add pcommit support"")
No need to update anything in the tools, as "pcommit" wasn't being
listed on the VMX_EXIT_REASONS in the tools/perf/arch/x86/util/kvm-stat.c
file.
Just grab fresh copies of these files to silence the file cache
coherency detector:
$ make -C tools/perf O=/tmp/build/perf install-bin
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel
Warning: tools/arch/x86/include/uapi/asm/vmx.h differs from kernel
INSTALL GTK UI
<SNIP>
#
Cc: Adrian Hunter <[email protected] >
Cc: Dan Williams <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paolo Bonzini <[email protected] >
Cc: Ross Zwisler <[email protected] >
Cc: Wang Nan <[email protected] >
Cc: Xiao Guangrong <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-08-09 11:21:57 -03:00
Arnaldo Carvalho de Melo
bb9707077b
tools: Copy the bitsperlong.h files from the kernel
...
We use it in bitops/__ffs.h and bitops/atomic.h, that we also got from
the kernel, but were getting it from either newer systems that carry it
in /usr/include, or from the kernel sources, that we decided not to
touch from tools/ code. Fix it.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:39 -03:00
Arnaldo Carvalho de Melo
dd7bd10936
tools: Copy the header files needed by perf tools
...
Those kernel files were being directly accessed, which we're not
allowing anymore to avoid that changes in the kernel side break tooling.
Warn if these copies drift from the original files.
Cc: Adrian Hunter <[email protected] >
Cc: Alexander Yarygin <[email protected] >
Cc: Christoffer Dall <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Eric Auger <[email protected] >
Cc: Hemant Kumar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Marc Zyngier <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Naveen N. Rao <[email protected] >
Cc: Srikar Dronamraju <[email protected] >
Cc: Wang Nan <[email protected] >
Cc: Yunlong Song <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:36 -03:00
Arnaldo Carvalho de Melo
c7007e9836
perf tools: Introduce weak alternative to sched_getcpu()
...
Which is just a wrapper for sys_getcpu and is not present in at least
musl libc.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:34 -03:00
Arnaldo Carvalho de Melo
12f020338a
tools: Copy uapi/asm/perf_regs.h from the kernel
...
To allow the build to complete on older systems, where those files are
either not uptodate, lacking some recent additions or not present at
all.
And check if the copy drifts from the kernel.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:33 -03:00
Arnaldo Carvalho de Melo
7d7d1bf1d1
perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks
...
We can't access kernel files directly from tools/, so copy the required
bits, and make sure that we detect when the original files, in the
kernel, gets modified.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:32 -03:00
Arnaldo Carvalho de Melo
cec07f53c3
perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/
...
And remove the empty tools/arch/x86/include/asm/unistd_{32,64}.h files
introduced by eae7a755ee ("perf tools, x86: Build perf on older
user-space as well").
This way we get closer to mirroring the kernel for cases where __NR_
can't be found for some include path/_GNU_SOURCE/whatever scenario.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:19:54 -03:00
Arnaldo Carvalho de Melo
da6d856751
tools include: Add basic atomic.h implementation from the kernel sources
...
Uses the arch/x86/ kernel code for x86_64/i386, fallbacking to a gcc
intrinsics implementation that has been tested in at least sparc64.
Will be used for reference counting in tools/perf.
Acked-by: David Ahern <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:11:05 -03:00
Arnaldo Carvalho de Melo
d3bd708114
perf tools: Move tile barrier.h stuff to tools/arch/tile/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:08 -03:00
Arnaldo Carvalho de Melo
e2164f0406
perf tools: Move mips barrier.h stuff to tools/arch/mips/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Deng-Cheng Zhu <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:07 -03:00
Arnaldo Carvalho de Melo
3d3337de89
perf tools: Move xtensa barrier.h stuff to tools/arch/xtensa/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:07 -03:00
Arnaldo Carvalho de Melo
4f3db0746c
perf tools: Move arm(64) barrier.h stuff to tools/arch/arm*/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:06 -03:00
Arnaldo Carvalho de Melo
163e589d05
perf tools: Move ia64 barrier.h stuff to tools/arch/ia64/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:06 -03:00
Arnaldo Carvalho de Melo
0da85d1e38
perf tools: Move alpha barrier.h stuff to tools/arch/alpha/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:06 -03:00
Arnaldo Carvalho de Melo
94cdda6b98
perf tools: Move sparc barrier.h stuff to tools/arch/sparc/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:05 -03:00
Arnaldo Carvalho de Melo
827634adde
perf tools: Move sh barrier.h stuff to tools/arch/sh/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:05 -03:00
Arnaldo Carvalho de Melo
07d207ac0c
perf tools: Move s390 barrier.h stuff to tools/arch/s390/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:04 -03:00
Arnaldo Carvalho de Melo
e43a19c9c2
perf tools: Move powerpc barrier.h stuff to tools/arch/powerpc/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:03 -03:00
Arnaldo Carvalho de Melo
361c564eef
perf tools: Move x86 barrier.h stuff to tools/arch/x86/include/asm/barrier.h
...
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.
Other aches will follow, each in a cset.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-08 16:05:03 -03:00