Re: [PATCH 05/54] perf build: Use feature dump file for build-test

From: Arnaldo Carvalho de Melo
Date: Tue Jan 26 2016 - 11:59:56 EST


Em Mon, Jan 25, 2016 at 09:55:52AM +0000, Wang Nan escreveu:
> To prevent feature check run too many times, this patch utilizes
> previous introduced feature-dump make target and FEATURES_DUMP
> variable, makes sure the feature checkers run only once when doing
> build-test for normal test cases.
>
> Signed-off-by: Wang Nan <wangnan0@xxxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxxx>

So, I'm having this problem when this patch is applied.

[acme@jouet linux]$ make -C tools clean
make: Entering directory '/home/acme/git/linux/tools'
DESCEND power/acpi
make[1]: Entering directory '/home/acme/git/linux/tools/power/acpi'
DESCEND tools/acpidbg
make[2]: Entering directory '/home/acme/git/linux/tools/power/acpi/tools/acpidbg'
find ./ \( -not -type d \) \
-and \( -name '*~' -o -name '*.[oas]' \) \
-type f -print \
| xargs rm -f
rm -f ./acpidbg
make[2]: Leaving directory '/home/acme/git/linux/tools/power/acpi/tools/acpidbg'
DESCEND tools/acpidump
make[2]: Entering directory '/home/acme/git/linux/tools/power/acpi/tools/acpidump'
find ./ \( -not -type d \) \
-and \( -name '*~' -o -name '*.[oas]' \) \
-type f -print \
| xargs rm -f
rm -f ./acpidump
make[2]: Leaving directory '/home/acme/git/linux/tools/power/acpi/tools/acpidump'
DESCEND tools/ec
make[2]: Entering directory '/home/acme/git/linux/tools/power/acpi/tools/ec'
find ./ \( -not -type d \) \
-and \( -name '*~' -o -name '*.[oas]' \) \
-type f -print \
| xargs rm -f
rm -f ./ec
make[2]: Leaving directory '/home/acme/git/linux/tools/power/acpi/tools/ec'
make[1]: Leaving directory '/home/acme/git/linux/tools/power/acpi'
DESCEND cgroup
make[1]: Entering directory '/home/acme/git/linux/tools/cgroup'
rm -f cgroup_event_listener
make[1]: Leaving directory '/home/acme/git/linux/tools/cgroup'
DESCEND power/cpupower
make[1]: Entering directory '/home/acme/git/linux/tools/power/cpupower'
find ./ \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
| xargs rm -f
rm -f ./cpupower
rm -f ./libcpupower.so*
rm -rf ./po/*.gmo
rm -rf ./po/*.pot
make -C bench O=./ clean
make[2]: Entering directory '/home/acme/git/linux/tools/power/cpupower/bench'
rm -f .//*.o
rm -f .//cpufreq-bench
make[2]: Leaving directory '/home/acme/git/linux/tools/power/cpupower/bench'
make[1]: Leaving directory '/home/acme/git/linux/tools/power/cpupower'
DESCEND hv
make[1]: Entering directory '/home/acme/git/linux/tools/hv'
rm -f hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
make[1]: Leaving directory '/home/acme/git/linux/tools/hv'
DESCEND firewire
make[1]: Entering directory '/home/acme/git/linux/tools/firewire'
rm -rf *.o nosy-dump
make[1]: Leaving directory '/home/acme/git/linux/tools/firewire'
DESCEND lguest
make[1]: Entering directory '/home/acme/git/linux/tools/lguest'
rm -f lguest
rm -rf include
make[1]: Leaving directory '/home/acme/git/linux/tools/lguest'
DESCEND perf
make[1]: Entering directory '/home/acme/git/linux/tools/perf'
CLEAN libtraceevent
CLEAN libapi
CLEAN libsubcmd
CLEAN libbpf
CLEAN libsubcmd
CLEAN config
CLEAN core-objs
CLEAN core-progs
CLEAN core-gen
SUBDIR Documentation
CLEAN Documentation
CLEAN python
make[1]: Leaving directory '/home/acme/git/linux/tools/perf'
DESCEND testing/selftests
make[1]: Entering directory '/home/acme/git/linux/tools/testing/selftests'
for TARGET in breakpoints cpu-hotplug efivarfs exec firmware ftrace futex kcmp lib membarrier memfd memory-hotplug mount mqueue net powerpc pstore ptrace seccomp size static_keys sysctl timers user vm x86 zram; do \
make -C $TARGET clean; \
done;
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/breakpoints'
rm -fr breakpoint_test
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/breakpoints'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/cpu-hotplug'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/cpu-hotplug'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/efivarfs'
rm -f open-unlink create-read
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/efivarfs'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/exec'
rm -rf execveat execveat.symlink execveat.denatured script subdir subdir.moved execveat.moved xxxxx*
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/exec'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/firmware'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/firmware'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/ftrace'
rm -rf logs/*
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/ftrace'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/futex'
for DIR in functional; do make -C $DIR clean ; done
make[3]: Entering directory '/home/acme/git/linux/tools/testing/selftests/futex/functional'
rm -f futex_wait_timeout futex_wait_wouldblock futex_requeue_pi futex_requeue_pi_signal_restart futex_requeue_pi_mismatched_ops futex_wait_uninitialized_heap futex_wait_private_mapped_file
make[3]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/futex/functional'
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/futex'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/kcmp'
rm -f kcmp_test kcmp-test-file
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/kcmp'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/lib'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/lib'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/membarrier'
rm -f membarrier_test
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/membarrier'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/memfd'
rm -f memfd_test fuse_test
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/memfd'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/memory-hotplug'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/memory-hotplug'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/mount'
rm -f unprivileged-remount-test
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/mount'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/mqueue'
rm -f mq_open_tests mq_perf_tests
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/mqueue'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/net'
rm -f socket psock_fanout psock_tpacket reuseport_bpf
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/net'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/powerpc'
rm -f tags
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/powerpc'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/pstore'
rm -rf logs/* *uuid
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/pstore'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/ptrace'
rm -f peeksiginfo
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/ptrace'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/seccomp'
rm -f seccomp_bpf
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/seccomp'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/size'
rm -f get_size
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/size'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/static_keys'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/static_keys'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/sysctl'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/sysctl'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/timers'
rm -f posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat inconsistency-check raw_skew threadtest rtctest alarmtimer-suspend valid-adjtimex adjtick change_skew skew_consistency clocksource-switch leap-a-day leapcrash set-tai set-2038
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/timers'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/user'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/user'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/vm'
rm -f compaction_test hugepage-mmap hugepage-shm map_hugetlb mlock2-tests on-fault-limit thuge-gen transhuge-stress userfaultfd
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/vm'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/x86'
rm -f single_step_syscall_32 sysret_ss_attrs_32 syscall_nt_32 ptrace_syscall_32 entry_from_vm86_32 syscall_arg_fault_32 sigreturn_32 test_syscall_vdso_32 unwind_vdso_32 test_FCMOV_32 test_FCOMI_32 test_FISTTP_32 ldt_gdt_32 vdso_restorer_32 single_step_syscall_64 sysret_ss_attrs_64 syscall_nt_64 ptrace_syscall_64
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/x86'
make[2]: Entering directory '/home/acme/git/linux/tools/testing/selftests/zram'
rm -f err.log
make[2]: Leaving directory '/home/acme/git/linux/tools/testing/selftests/zram'
make[1]: Leaving directory '/home/acme/git/linux/tools/testing/selftests'
DESCEND power/x86/turbostat
make[1]: Entering directory '/home/acme/git/linux/tools/power/x86/turbostat'
make[1]: Leaving directory '/home/acme/git/linux/tools/power/x86/turbostat'
DESCEND spi
make[1]: Entering directory '/home/acme/git/linux/tools/spi'
rm -f spidev_test spidev_fdx
make[1]: Leaving directory '/home/acme/git/linux/tools/spi'
DESCEND usb
make[1]: Entering directory '/home/acme/git/linux/tools/usb'
rm -f testusb ffs-test
make[1]: Leaving directory '/home/acme/git/linux/tools/usb'
DESCEND virtio
make[1]: Entering directory '/home/acme/git/linux/tools/virtio'
rm -f *.o vringh_test virtio_test vhost_test/*.o vhost_test/.*.cmd \
vhost_test/Module.symvers vhost_test/modules.order *.d
make[1]: Leaving directory '/home/acme/git/linux/tools/virtio'
DESCEND vm
make[1]: Entering directory '/home/acme/git/linux/tools/vm'
rm -f page-types slabinfo page_owner_sort
make -C ../lib/api clean
make[2]: Entering directory '/home/acme/git/linux/tools/lib/api'
CLEAN libapi
make[2]: Leaving directory '/home/acme/git/linux/tools/lib/api'
make[1]: Leaving directory '/home/acme/git/linux/tools/vm'
DESCEND net
make[1]: Entering directory '/home/acme/git/linux/tools/net'
rm -rf *.o bpf_jit_disasm bpf_dbg bpf_asm bpf_exp.yacc.* bpf_exp.lex.*
make[1]: Leaving directory '/home/acme/git/linux/tools/net'
DESCEND iio
make[1]: Entering directory '/home/acme/git/linux/tools/iio'
rm -f *.o iio_event_monitor lsiio generic_buffer
make[1]: Leaving directory '/home/acme/git/linux/tools/iio'
DESCEND power/x86/x86_energy_perf_policy
make[1]: Entering directory '/home/acme/git/linux/tools/power/x86/x86_energy_perf_policy'
rm -f x86_energy_perf_policy
make[1]: Leaving directory '/home/acme/git/linux/tools/power/x86/x86_energy_perf_policy'
DESCEND thermal/tmon
make[1]: Entering directory '/home/acme/git/linux/tools/thermal/tmon'
find . -name "*.o" | xargs rm -f
rm -f tmon
make[1]: Leaving directory '/home/acme/git/linux/tools/thermal/tmon'
DESCEND laptop/freefall
make[1]: Entering directory '/home/acme/git/linux/tools/laptop/freefall'
rm -f freefall
make[1]: Leaving directory '/home/acme/git/linux/tools/laptop/freefall'
DESCEND build
make[1]: Entering directory '/home/acme/git/linux/tools/build'
CLEAN fixdep
make[1]: Leaving directory '/home/acme/git/linux/tools/build'
DESCEND lib/bpf
make[1]: Entering directory '/home/acme/git/linux/tools/lib/bpf'
CLEAN libbpf
CLEAN core-gen
make[1]: Leaving directory '/home/acme/git/linux/tools/lib/bpf'
DESCEND lib/subcmd
make[1]: Entering directory '/home/acme/git/linux/tools/lib/subcmd'
CLEAN libsubcmd
make[1]: Leaving directory '/home/acme/git/linux/tools/lib/subcmd'
DESCEND lib/lockdep
make[1]: Entering directory '/home/acme/git/linux/tools/lib/lockdep'
git statusrm -f *.o *~ liblockdep.a liblockdep.so.4.4.0 *.a *liblockdep*.so* .*.d .*.cmd
rm -f tags TAGS
make[1]: Leaving directory '/home/acme/git/linux/tools/lib/lockdep'
make: Leaving directory '/home/acme/git/linux/tools'
[acme@jouet linux]$ git status
On branch perf/core
Untracked files:
(use "git add <file>..." to include in what will be committed)

perf.data
perf.data.old
tools/perf/BUILD_TEST_FEATURE_DUMP
tools/perf/make_no_libbpf
tools/perf/make_no_newt

nothing added to commit but untracked files present (use "git add" to track)
[acme@jouet linux]$ rm -f tools/perf/BUILD_TEST_FEATURE_DUMP tools/perf/make_no_libbpf tools/perf/make_no_newt
[acme@jouet linux]$ perf stat make -C tools/perf build-test
make: Entering directory '/home/acme/git/linux/tools/perf'
Testing Makefile
- /home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
cd . && make FEATURE_DUMP_COPY=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
- make_doc: cd . && make -f Makefile DESTDIR=/tmp/tmp.lLyAWJ2KUJ doc FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP
- make_no_libperl: cd . && make -f Makefile DESTDIR=/tmp/tmp.iPREXpyGhh NO_LIBPERL=1 FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP
cd . && make -f Makefile DESTDIR=/tmp/tmp.iPREXpyGhh NO_LIBPERL=1 FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP
BUILD: Doing 'make -j4' parallel build
GEN common-cmds.h
CC fixdep.o
CC perf-read-vdso32
In file included from /usr/include/features.h:389:0,
from /usr/include/stdio.h:27,
from perf-read-vdso.c:1:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
Makefile.perf:416: recipe for target 'perf-read-vdso32' failed
make[4]: *** [perf-read-vdso32] Error 1
make[4]: *** Waiting for unfinished jobs....
LD fixdep-in.o
LINK fixdep
PERF_VERSION = 4.4.g80fcfd7
Makefile:68: recipe for target 'all' failed
make[3]: *** [all] Error 2
test: test -x ./perf
tests/make:274: recipe for target 'make_no_libperl' failed
make[2]: *** [make_no_libperl] Error 1
tests/make:7: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:81: recipe for target 'build-test' failed
make: *** [build-test] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'

Performance counter stats for 'make -C tools/perf build-test':

61660.694764 task-clock (msec) # 3.494 CPUs utilized
13,836 context-switches # 0.224 K/sec
3,707 cpu-migrations # 0.060 K/sec
1,151,896 page-faults # 0.019 M/sec
190,413,042,688 cycles # 3.088 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
206,130,087,553 instructions # 1.08 insns per cycle
48,604,926,191 branches # 788.264 M/sec
603,468,422 branch-misses # 1.24% of all branches

17.647845909 seconds time elapsed

[acme@jouet linux]$