perf bpf: Move perf_event_output() from stdio.h to bpf.h
[linux/fpc-iii.git] / tools / perf / check-headers.sh
blob9531f7bd7d9bd9e114fd57840e4f8fb87a642610
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
4 HEADERS='
5 include/uapi/drm/drm.h
6 include/uapi/drm/i915_drm.h
7 include/uapi/linux/fcntl.h
8 include/uapi/linux/fs.h
9 include/uapi/linux/kcmp.h
10 include/uapi/linux/kvm.h
11 include/uapi/linux/in.h
12 include/uapi/linux/perf_event.h
13 include/uapi/linux/prctl.h
14 include/uapi/linux/sched.h
15 include/uapi/linux/stat.h
16 include/uapi/linux/vhost.h
17 include/uapi/sound/asound.h
18 include/linux/bits.h
19 include/linux/hash.h
20 include/uapi/linux/hw_breakpoint.h
21 arch/x86/include/asm/disabled-features.h
22 arch/x86/include/asm/required-features.h
23 arch/x86/include/asm/cpufeatures.h
24 arch/arm/include/uapi/asm/perf_regs.h
25 arch/arm64/include/uapi/asm/perf_regs.h
26 arch/powerpc/include/uapi/asm/perf_regs.h
27 arch/s390/include/uapi/asm/perf_regs.h
28 arch/x86/include/uapi/asm/perf_regs.h
29 arch/x86/include/uapi/asm/kvm.h
30 arch/x86/include/uapi/asm/kvm_perf.h
31 arch/x86/include/uapi/asm/svm.h
32 arch/x86/include/uapi/asm/unistd.h
33 arch/x86/include/uapi/asm/vmx.h
34 arch/powerpc/include/uapi/asm/kvm.h
35 arch/s390/include/uapi/asm/kvm.h
36 arch/s390/include/uapi/asm/kvm_perf.h
37 arch/s390/include/uapi/asm/ptrace.h
38 arch/s390/include/uapi/asm/sie.h
39 arch/arm/include/uapi/asm/kvm.h
40 arch/arm64/include/uapi/asm/kvm.h
41 arch/arm64/include/uapi/asm/unistd.h
42 arch/alpha/include/uapi/asm/errno.h
43 arch/mips/include/asm/errno.h
44 arch/mips/include/uapi/asm/errno.h
45 arch/parisc/include/uapi/asm/errno.h
46 arch/powerpc/include/uapi/asm/errno.h
47 arch/sparc/include/uapi/asm/errno.h
48 arch/x86/include/uapi/asm/errno.h
49 arch/powerpc/include/uapi/asm/unistd.h
50 include/asm-generic/bitops/arch_hweight.h
51 include/asm-generic/bitops/const_hweight.h
52 include/asm-generic/bitops/__fls.h
53 include/asm-generic/bitops/fls.h
54 include/asm-generic/bitops/fls64.h
55 include/linux/coresight-pmu.h
56 include/uapi/asm-generic/errno.h
57 include/uapi/asm-generic/errno-base.h
58 include/uapi/asm-generic/ioctls.h
59 include/uapi/asm-generic/mman-common.h
60 include/uapi/asm-generic/unistd.h
63 check_2 () {
64 file1=$1
65 file2=$2
67 shift
68 shift
70 cmd="diff $* $file1 $file2 > /dev/null"
72 test -f $file2 && {
73 eval $cmd || {
74 echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2
75 echo diff -u $file1 $file2
80 check () {
81 file=$1
83 shift
85 check_2 tools/$file $file $*
88 # Check if we have the kernel headers (tools/perf/../../include), else
89 # we're probably on a detached tarball, so no point in trying to check
90 # differences.
91 test -d ../../include || exit 0
93 cd ../..
95 # simple diff check
96 for i in $HEADERS; do
97 check $i -B
98 done
100 # diff with extra ignore lines
101 check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
102 check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
103 check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common.h>"'
104 check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"'
106 # diff non-symmetric files
107 check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
109 cd tools/perf