History log of /linux-master/tools/perf/bench/futex.h
Revision Date Author Comments
# ba4026b0 01-Nov-2021 Arnaldo Carvalho de Melo <acme@redhat.com>

Revert "perf bench futex: Add support for 32-bit systems with 64-bit time_t"

This reverts commit c1ff12dac4657e0134c972978479b97f652711a2.

This commit makes the build break on ubuntu 20.04 and other older
systems and it as well has identation problems, lets revert it till we
get these problems fixed.

Test results:

1 78.36 almalinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module_el8.4.0+2107+39fed697)
2 8.40 alpine:3.4 : FAIL gcc version 5.3.0 (Alpine 5.3.0)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
3 8.89 alpine:3.5 : FAIL gcc version 6.2.1 20160822 (Alpine 6.2.1)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
4 8.59 alpine:3.6 : FAIL gcc version 6.3.0 (Alpine 6.3.0)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
5 9.01 alpine:3.7 : FAIL gcc version 6.4.0 (Alpine 6.4.0)
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
6 8.70 alpine:3.8 : FAIL gcc version 6.4.0 (Alpine 6.4.0)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
7 9.70 alpine:3.9 : FAIL gcc version 8.3.0 (Alpine 8.3.0)
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
8 9.40 alpine:3.10 : FAIL gcc version 8.3.0 (Alpine 8.3.0)
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
9 9.81 alpine:3.11 : FAIL gcc version 9.3.0 (Alpine 9.3.0)
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
16 | #include <linux/time_types.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
16 | #include <linux/time_types.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
10 10.32 alpine:3.12 : FAIL gcc version 9.3.0 (Alpine 9.3.0)
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
11 99.82 alpine:3.13 : Ok gcc (Alpine 10.2.1_pre1) 10.2.1 20201203 , Alpine clang version 10.0.1
12 87.39 alpine:3.14 : Ok gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424 , Alpine clang version 11.1.0
13 86.89 alpine:edge : Ok gcc (Alpine 10.3.1_git20210921) 10.3.1 20210921 , Alpine clang version 12.0.1
14 7.30 alt:p8 : FAIL gcc version 5.3.1 20151207 (ALT p8 5.3.1-alt3.M80P.1) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
make[3]: *** [bench] Error 2
15 63.92 alt:p9 : Ok x86_64-alt-linux-gcc (GCC) 8.4.1 20200305 (ALT p9 8.4.1-alt0.p9.1) , clang version 10.0.0
16 61.42 alt:sisyphus : Ok x86_64-alt-linux-gcc (GCC) 11.2.1 20210911 (ALT Sisyphus 11.2.1-alt1) , ALT Linux Team clang version 12.0.1
17 8.30 amazonlinux:1 : FAIL gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [bench] Error 2
18 8.71 amazonlinux:2 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-13) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [bench] Error 2
19 79.56 centos:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module_el8.4.0+587+5187cac0)
20 82.28 centos:stream : Ok gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-3) , clang version 12.0.1 (Red Hat 12.0.1-2.module_el8.6.0+937+1cafe22c)
21 55.24 clearlinux:latest : Ok gcc (Clear Linux OS for Intel Architecture) 11.2.1 20211020 releases/gcc-11.2.0-375-g40b209e340 , clang version 11.1.0
22 7.41 debian:9 : FAIL gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
23 7.90 debian:10 : FAIL gcc version 8.3.0 (Debian 8.3.0-6)
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
24 60.32 debian:11 : Ok gcc (Debian 10.2.1-6) 10.2.1 20210110 , Debian clang version 11.0.1-2
25 59.42 debian:experimental : Ok gcc (Debian 11.2.0-10) 11.2.0 , Debian clang version 11.1.0-4
26 23.76 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 11.2.0-9) 11.2.0
27 19.25 debian:experimental-x-mips : Ok mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110
28 21.25 debian:experimental-x-mips64 : Ok mips64-linux-gnuabi64-gcc (Debian 10.2.1-6) 10.2.1 20210110
29 21.88 debian:experimental-x-mipsel : Ok mipsel-linux-gnu-gcc (Debian 11.2.0-9) 11.2.0
30 8.20 fedora:22 : FAIL gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
31 8.20 fedora:23 : FAIL gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
32 8.59 fedora:24 : FAIL gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
33 6.60 fedora:24-x-ARC-uClibc : FAIL gcc version 7.1.1 20170710 (ARCompact ISA Linux uClibc toolchain 2017.09-rc2)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
34 8.59 fedora:25 : FAIL gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
35 14.61 fedora:26 : FAIL gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
36 8.79 fedora:27 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) (GCC)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
37 15.12 fedora:28 : FAIL gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
38 9.60 fedora:29 : FAIL gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
39 101.90 fedora:30 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) , clang version 8.0.0 (Fedora 8.0.0-3.fc30)
40 99.30 fedora:31 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) , clang version 9.0.1 (Fedora 9.0.1-4.fc31)
41 82.46 fedora:32 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 10.0.1 (Fedora 10.0.1-3.fc32)
42 81.32 fedora:33 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 11.0.0 (Fedora 11.0.0-3.fc33)
43 84.07 fedora:34 : Ok gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1) , clang version 12.0.1 (Fedora 12.0.1-1.fc34)
44 7.09 fedora:34-x-ARC-glibc : FAIL gcc version 8.3.1 20190225 (ARC HS GNU/Linux glibc toolchain 2019.03-rc1)
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
45 6.29 fedora:34-x-ARC-uClibc : FAIL gcc version 8.3.1 20190225 (ARCv2 ISA Linux uClibc toolchain 2019.03-rc1)
In file included from bench/futex-hash.c:29:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
46 74.74 fedora:35 : Ok gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1) , clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35)
47 73.13 fedora:rawhide : Ok gcc (GCC) 11.2.1 20211019 (Red Hat 11.2.1-6) , clang version 13.0.0 (Fedora 13.0.0-4.fc36)
48 28.17 gentoo-stage3:latest : Ok gcc (Gentoo 11.2.0 p1) 11.2.0
49 9.10 mageia:6 : FAIL gcc version 5.5.0 (Mageia 5.5.0-1.mga6)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
50 38.60 mageia:7 : FAIL clang version 8.0.0 (Mageia 8.0.0-1.mga7)
yychar = yylex (&yylval, &yylloc, scanner);
^
#define yylex parse_events_lex
^
1 error generated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: util] Error 2
51 6.18 openmandriva:cooker : FAIL gcc version 11.2.0 20210728 (OpenMandriva) (GCC)
In file included from builtin-bench.c:22:
bench/bench.h:66:19: error: conflicting types for 'pthread_attr_setaffinity_np'; have 'int(pthread_attr_t *, size_t, cpu_set_t *)' {aka 'int(pthread_attr_t *, long unsigned int, cpu_set_t *)'}
66 | static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr __maybe_unused,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from bench/bench.h:64,
from builtin-bench.c:22:
/usr/include/pthread.h:394:12: note: previous declaration of 'pthread_attr_setaffinity_np' with type 'int(pthread_attr_t *, size_t, const cpu_set_t *)' {aka 'int(pthread_attr_t *, long unsigned int, const cpu_set_t *)'}
394 | extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
file: Compiled magic version [540] does not match with shared library magic version [539]

ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections
ld: warning: -r and --icf may not be used together, disabling --icf
ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections
ld: warning: -r and --icf may not be used together, disabling --icf
file: Compiled magic version [540] does not match with shared library magic version [539]

file: Compiled magic version [540] does not match with shared library magic version [539]

ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections
ld: warning: -r and --icf may not be used together, disabling --icf
52 12.51 opensuse:15.0 : FAIL gcc version 7.4.1 20190905 [gcc-7-branch revision 275407] (SUSE Linux)
Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
update-alternatives: error: no alternatives for java
update-alternatives: error: no alternatives for java
Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... libbfd: [ OFF ]
... libbfd-buildid: [ OFF ]
... libcap: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... disassembler-four-args: [ on ]

PERF_VERSION = 5.15.g875eaa399042
GEN perf-archive
GEN perf-with-kcore
GEN perf-iostat
--
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-requeue.c:26:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
53 12.41 opensuse:15.1 : FAIL gcc version 7.5.0 (SUSE Linux)
Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
update-alternatives: error: no alternatives for java
update-alternatives: error: no alternatives for java
Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... libbfd: [ OFF ]
... libbfd-buildid: [ OFF ]
... libcap: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... disassembler-four-args: [ on ]

PERF_VERSION = 5.15.g875eaa399042
GEN perf-archive
GEN perf-with-kcore
GEN perf-iostat
--
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-requeue.c:26:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
54 12.20 opensuse:15.2 : FAIL gcc version 7.5.0 (SUSE Linux)
Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
update-alternatives: error: no alternatives for java
update-alternatives: error: no alternatives for java
Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... libbfd: [ OFF ]
... libbfd-buildid: [ OFF ]
... libcap: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... disassembler-four-args: [ on ]

PERF_VERSION = 5.15.g875eaa399042
GEN perf-archive
GEN perf-with-kcore
GEN perf-iostat
--
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
In file included from bench/futex-wake.c:25:0:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
55 12.30 opensuse:15.3 : FAIL gcc version 7.5.0 (SUSE Linux)
Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
update-alternatives: error: no alternatives for java
update-alternatives: error: no alternatives for java
Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... libbfd: [ OFF ]
... libbfd-buildid: [ OFF ]
... libcap: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... disassembler-four-args: [ on ]

PERF_VERSION = 5.15.g875eaa399042
GEN perf-archive
GEN perf-with-kcore
GEN perf-iostat
--
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
In file included from bench/futex-hash.c:29:0:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
struct __kernel_old_timespec ts32;
^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
56 92.79 opensuse:tumbleweed : Ok gcc (SUSE Linux) 11.2.1 20210816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9] , clang version 13.0.0
57 78.85 oraclelinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1.0.4) , clang version 11.0.0 (Red Hat 11.0.0-1.0.1.module+el8.4.0+20046+39fed697)
58 78.47 rockylinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module+el8.4.0+412+05cf643f)
59 8.32 ubuntu:16.04 : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
60 7.19 ubuntu:16.04-x-arm : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
61 18.14 ubuntu:16.04-x-arm64 : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
62 6.99 ubuntu:16.04-x-powerpc : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
63 7.29 ubuntu:16.04-x-powerpc64 : FAIL gcc version 5.4.0 20160609 (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-requeue.c:26:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-lock-pi.c:19:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
64 7.29 ubuntu:16.04-x-powerpc64el : FAIL gcc version 5.4.0 20160609 (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
65 6.59 ubuntu:16.04-x-s390 : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
66 9.00 ubuntu:18.04 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
67 7.49 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
68 7.49 ubuntu:18.04-x-arm64 : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
69 6.09 ubuntu:18.04-x-m68k : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake-parallel.c:31:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
70 7.40 ubuntu:18.04-x-powerpc : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
71 8.00 ubuntu:18.04-x-powerpc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
72 7.99 ubuntu:18.04-x-powerpc64el : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
73 6.89 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
74 6.69 ubuntu:18.04-x-s390 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
75 7.29 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
76 6.69 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
In file included from bench/futex-hash.c:29:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from bench/futex-wake.c:25:0:
bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory
#include <linux/time_types.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
77 9.59 ubuntu:20.04 : FAIL gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
In file included from bench/futex-wake.c:25:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
In file included from bench/futex-wake-parallel.c:31:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
78 8.29 ubuntu:20.04-x-powerpc64el : FAIL gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04)
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
In file included from bench/futex-wake.c:25:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
In file included from bench/futex-requeue.c:26:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
In file included from bench/futex-wake-parallel.c:31:
bench/futex.h: In function 'futex_syscall':
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec'
64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec))
| ^~~~~~
bench/futex.h:68:32: error: storage size of 'ts32' isn't known
68 | struct __kernel_old_timespec ts32;
| ^~~~
bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable]
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2
79 65.92 ubuntu:20.10 : Ok gcc (Ubuntu 10.3.0-1ubuntu1~20.10) 10.3.0 , Ubuntu clang version 11.0.0-2
80 65.91 ubuntu:21.04 : Ok gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0 , Ubuntu clang version 12.0.0-3ubuntu1~21.04.2
81 68.12 ubuntu:21.10 : Ok gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 , Ubuntu clang version 13.0.0-2

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# c1ff12da 21-Oct-2021 Alistair Francis <alistair.francis@wdc.com>

perf bench futex: Add support for 32-bit systems with 64-bit time_t

Some 32-bit architectures (such are 32-bit RISC-V) only have a 64-bit
time_t and as such don't have the SYS_futex syscall. This patch will
allow us to use the SYS_futex_time64 syscall on those platforms.

This also converts the futex calls to be y2038 safe (when built for a
5.1+ kernel).

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alistair Francis <alistair23@gmail.com>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-riscv@lists.infradead.org
Link: http://lore.kernel.org/lkml/20211022013343.2262938-2-alistair.francis@opensource.wdc.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# fec5c3a5 21-Oct-2021 Alistair Francis <alistair.francis@wdc.com>

perf bench futex: Call the futex syscall from a function

In preparation for a more complex futex() function let's convert the
current macro into two functions. We need two functions to avoid
compiler failures as the macro is overloaded.

This will allow us to include pre-processor conditionals in the futex
syscall functions.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alistair Francis <alistair23@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-riscv@lists.infradead.org
Link: http://lore.kernel.org/lkml/20211022013343.2262938-1-alistair.francis@opensource.wdc.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 46f81532 08-Aug-2021 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex, requeue: Add --pi parameter

This extends the program to measure WAIT_REQUEUE_PI+CMP_REQUEUE_PI
pairs, which are the underlying machinery behind priority-inheritance
aware condition variables. The defaults are the same as with the regular
non-pi version, requeueing one task at a time, with the exception that
PI will always wakeup the first waiter.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-8-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# d262e6a9 08-Aug-2021 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex, requeue: Add --broadcast option

Such that all threads are requeued to uaddr2 in a single
futex_cmp_requeue(), unlike the default, which is 1.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-6-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 9f9a3ffe 08-Aug-2021 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Add --mlockall parameter

This adds, across all futex benchmarks, the -m/--mlockall option
which is a common operation for realtime workloads by not incurring
in page faults in paths that want determinism. As such, threads
started after a call to mlockall(2) will generate page faults
immediately since the new stack is immediately forced to memory,
due to the MCL_FUTURE flag.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-5-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# b2105a75 08-Aug-2021 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Remove bogus backslash from comment

It obviously doesn't belong there.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-3-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 09590463 08-Aug-2021 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Group test parameters cleanup

Do this across all futex-bench tests such that all program parameters
neatly share a common structure, which is nicer than how we have them
now. No changes in program behavior are expected.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-2-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# d47d77c3 09-Nov-2018 Davidlohr Bueso <dave@stgolabs.net>

perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h

Both futex and epoll need this call, and can cause build failure on
systems that don't have it pthread_attr_setaffinity_np().

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Jason Baron <jbaron@akamai.com>
Link: http://lkml.kernel.org/r/20181109210719.pr7ohayuwqmfp2wl@linux-r8p5
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# b2441318 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b8d1fd7e 02-Mar-2017 Arnaldo Carvalho de Melo <acme@redhat.com>

perf bench futex: Use __maybe_unused

Instead of attributing a variable to itself to silence the compiler, use
the attribute designed for that, avoiding this:

In file included from bench/futex-hash.c:24:
bench/futex.h:95:7: error: explicitly assigning value of variable of type 'pthread_attr_t *' to itself [-Werror,-Wself-assign]
attr = attr;
~~~~ ^ ~~~~
bench/futex.h:96:13: error: explicitly assigning value of variable of type 'size_t' (aka 'unsigned long') to itself [-Werror,-Wself-assign]
cpusetsize = cpusetsize;
~~~~~~~~~~ ^ ~~~~~~~~~~
bench/futex.h:97:9: error: explicitly assigning value of variable of type 'cpu_set_t *' (aka 'struct cpu_set_t *') to itself [-Werror,-Wself-assign]
cpuset = cpuset;
~~~~~~ ^ ~~~~~~

That is only triggered when HAVE_PTHREAD_ATTR_SETAFFINITY_NP isn't set.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-14ws1d1elj2d5ej8g7cwdqau@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 16cab322 14-Feb-2017 Arnaldo Carvalho de Melo <acme@redhat.com>

Revert "perf bench futex: Sanitize numeric parameters"

This reverts commit 60758d6668b3e2fa8e5fd143d24d0425203d007e.

Now that libsubcmd makes sure that OPT_UINTEGER options will not
return negative values, we can revert this patch while addressing
the problem it solved:

# perf bench futex hash -t -4
# Running 'futex/hash' benchmark:
Error: switch `t' expects an unsigned numerical value
Usage: perf bench futex hash <options>

-t, --threads <n> Specify amount of threads
# perf bench futex hash -t-4
# Running 'futex/hash' benchmark:
Error: switch `t' expects an unsigned numerical value
Usage: perf bench futex hash <options>

-t, --threads <n> Specify amount of threads
#

IMO it is more reasonable to flat out refuse to process a negative
number than to silently turn it into an absolute value.

This also helps in silencing clang's complaint about asking for an
absolute value of an unsigned integer:

bench/futex-hash.c:133:10: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
nsecs = futexbench_sanitize_numeric(nsecs);
^
bench/futex.h:104:42: note: expanded from macro 'futexbench_sanitize_numeric'
#define futexbench_sanitize_numeric(__n) abs((__n))
^
bench/futex-hash.c:133:10: note: remove the call to 'abs' since unsigned values cannot be negative

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2kl68v22or31vw643m2exz8x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 60758d66 24-Oct-2016 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Sanitize numeric parameters

This gets rid of oddities such as:

perf bench futex hash -t -4
perf: calloc: Cannot allocate memory

Runtime (and many more) are equally busted, i.e. run for bogus amounts of
time. Just use the abs, instead of, for example errorring out.

Committer note:

After the patch:

$ perf bench futex hash -t -4
# Running 'futex/hash' benchmark:
Run summary [PID 10178]: 4 threads, each operating on 1024 [private] futexes for 10 secs.

[thread 0] futexes: 0x34f9fa0 ... 0x34faf9c [ 4702208 ops/sec ]
[thread 1] futexes: 0x34fb140 ... 0x34fc13c [ 4707020 ops/sec ]
[thread 2] futexes: 0x34fc2e0 ... 0x34fd2dc [ 4711526 ops/sec ]
[thread 3] futexes: 0x34fd480 ... 0x34fe47c [ 4709683 ops/sec ]

Averaged 4707609 operations/sec (+- 0.04%), total secs = 10
$

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lkml.kernel.org/r/1477342613-9938-3-git-send-email-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 73b1794e 20-Apr-2016 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Simplify wrapper for LOCK_PI

Given that the 'val' parameter is ignored for FUTEX_LOCK_PI, get rid of
the bogus deadlock detection flag in the wrapper code and avoid the
extra argument, making it resemble its unlock counterpart. And if
nothing else, we already only pass 0 anyway.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Link: http://lkml.kernel.org/r/1461208447-29328-1-git-send-email-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# d2f3f5d2 07-Jul-2015 Davidlohr Bueso <dave@stgolabs.net>

perf bench futex: Add lock_pi stresser

Allows a way of measuring low level kernel implementation of FUTEX_LOCK_PI and
FUTEX_UNLOCK_PI.

The program comes in two flavors:

(i) single futex (default), all threads contend on the same uaddr. For the
sake of the benchmark, we call into kernel space even when the lock is
uncontended. The kernel will set it to TID, any waters that come in and
contend for the pi futex will be handled respectively by the kernel.

(ii) -M option for multiple futexes, each thread deals with its own futex. This
is a trivial scenario and only measures kernel handling of 0->TID transition.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Mel Gorman <mgorman@suse.de>
Link: http://lkml.kernel.org/r/1436259353.12255.78.camel@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 459a3df7 13-Jan-2015 Vineet Gupta <Vineet.Gupta1@synopsys.com>

perf tools: Provide stub for missing pthread_attr_setaffinity_np

uClibc Linuxthreads.old doesn't support the pthread_attr_setaffinity_np()
functioo:

----------------->8-----------------------
CC bench/futex-hash.o
CC bench/futex-wake.o
bench/futex-hash.c: In function 'bench_futex_hash':
bench/futex-hash.c:161:3: error: implicit declaration of function
'pthread_attr_setaffinity_np' [-Werror=implicit-function-declaration]
ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t),
&cpu);
^
bench/futex-hash.c:161:3: error: nested extern declaration of
'pthread_attr_setaffinity_np' [-Werror=nested-externs]
----------------->8-----------------------

So introduce a test to check that and if not available provide a stub.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1421156604-30603-6-git-send-email-vgupta@synopsys.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 0fb298cf 14-Dec-2013 Davidlohr Bueso <davidlohr@hp.com>

perf bench: Add futex-requeue microbenchmark

Block a bunch of threads on a futex and requeue them on another, N at a
time.

This program is particularly useful to measure the latency of nthread
requeues without waking up any tasks -- thus mimicking a regular
futex_wait.

An example run:

$ perf bench futex requeue -r 100 -t 64
Run summary [PID 151011]: Requeuing 64 threads (from 0x7d15c4 to 0x7d15c8), 1 at a time.

[Run 1]: Requeued 64 of 64 threads in 0.0400 ms
[Run 2]: Requeued 64 of 64 threads in 0.0390 ms
[Run 3]: Requeued 64 of 64 threads in 0.0400 ms
...
[Run 100]: Requeued 64 of 64 threads in 0.0390 ms
Requeued 64 of 64 threads in 0.0399 ms (+-0.37%)

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/1387081917-9102-4-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# 27db7830 14-Dec-2013 Davidlohr Bueso <davidlohr@hp.com>

perf bench: Add futex-wake microbenchmark

Block a bunch of threads on a futex and wake them up, N at a time.

This program is particularly useful to measure the latency of nthread
wakeups in non-error situations: all waiters are queued and all wake
calls wakeup one or more tasks.

An example run:

$ perf bench futex wake -t 512 -r 100
Run summary [PID 27823]: blocking on 512 threads (at futex 0x7e10d4), waking up 1 at a time.

[Run 1]: Wokeup 512 of 512 threads in 6.0080 ms
[Run 2]: Wokeup 512 of 512 threads in 5.2280 ms
[Run 3]: Wokeup 512 of 512 threads in 4.8300 ms
...
[Run 100]: Wokeup 512 of 512 threads in 5.0100 ms
Wokeup 512 of 512 threads in 5.0109 ms (+-2.25%)

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/1387081917-9102-3-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


# a0439711 14-Dec-2013 Davidlohr Bueso <davidlohr@hp.com>

perf bench: Add futex-hash microbenchmark

Introduce futexes to perf-bench and add a program that stresses and
measures the kernel's implementation of the hash table.

This is a multi-threaded program that simply measures the amount of
failed futex wait calls - we only want to deal with the hashing
overhead, so a negative return of futex_wait_setup() is enough to do the
trick.

An example run:

$ perf bench futex hash -t 32
Run summary [PID 10989]: 32 threads, each operating on 1024 [private] futexes for 10 secs.

[thread 0] futexes: 0x19d9b10 ... 0x19dab0c [ 418713 ops/sec ]
[thread 1] futexes: 0x19daca0 ... 0x19dbc9c [ 469913 ops/sec ]
[thread 2] futexes: 0x19dbe30 ... 0x19dce2c [ 479744 ops/sec ]
...
[thread 31] futexes: 0x19fbb80 ... 0x19fcb7c [ 464179 ops/sec ]

Averaged 454310 operations/sec (+- 0.84%), total secs = 10

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/1387081917-9102-2-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>