aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-12perf test: Use macro for "suite" definitionsIan Rogers1-330/+149
Add a macro to simplify later refactoring. No functional change. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Daniel Latypov <dlatypov@google.com> Cc: David Gow <davidgow@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20211104064208.3156807-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf test: Use macro for "suite" declarationsIan Rogers1-74/+77
Currently tests are setup in builtin-test with function pointers. Kunit exposes tests as a kunit_suite with a null terminated array of test cases. Use a macro to aid transition from one to the other in later changes. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Daniel Latypov <dlatypov@google.com> Cc: David Gow <davidgow@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20211104064208.3156807-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty: Add socket level scnprintf that handles ARCH specific SOL_SOCKETArnaldo Carvalho de Melo2-0/+21
SOL_SOCKET has a different value according to the architecture, some have it as 0xffff while all the others have it as 1, so a simple string array isn't usable, add a scnprintf routine that treats it as a special case, using the array for other values. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf trace: Beautify the 'level' argument of setsockoptArnaldo Carvalho de Melo1-0/+2
# perf trace -e setsockopt 0.000 ( 0.019 ms): systemd-resolv/1121 setsockopt(fd: 22, level: IP, optname: 50, optval: 0x7ffee2c0c134, optlen: 4) = 0 0.022 ( 0.003 ms): systemd-resolv/1121 setsockopt(fd: 22, level: IP, optname: 11, optval: 0x7ffee2c0c114, optlen: 4) = 0 0.027 ( 0.003 ms): systemd-resolv/1121 setsockopt(fd: 22, level: IP, optname: 8, optval: 0x7ffee2c0c134, optlen: 4) = 0 0.032 ( 0.002 ms): systemd-resolv/1121 setsockopt(fd: 22, level: IP, optname: 10, optval: 0x7ffee2c0c134, optlen: 4) = 0 0.036 ( 0.002 ms): systemd-resolv/1121 setsockopt(fd: 22, level: IP, optname: 25, optval: 0x7ffee2c0c114, optlen: 4) = 0 0.043 ( 0.003 ms): systemd-resolv/1121 setsockopt(fd: 22, level: 1, optname: 62, optval: 0x7ffee2c0c0fc, optlen: 4) = 0 0.055 ( 0.003 ms): systemd-resolv/1121 setsockopt(fd: 22, level: 1, optname: 25) ^C# So the simple straight STRARRAY method is not enough as SOL_SOCKET is '1' in most architectures but some use 0xffff (alpha, mips, parisc and sparc), so a followup patch will create a specialized scnprintf to cover that. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf trace: Beautify the 'level' argument of getsockoptArnaldo Carvalho de Melo1-0/+2
# perf trace -e getsockopt 0.000 ( 0.006 ms): systemd-resolv/1121 getsockopt(fd: 21, level: 1, optname: 17, optval: 0x7ffee2c0c6cc, optlen: 0x7ffee2c0c6c8) = 0 0.301 ( 0.003 ms): systemd-resolv/1121 getsockopt(fd: 22, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) 2.215 ( 0.005 ms): systemd-resolv/1121 getsockopt(fd: 21, level: 1, optname: 17, optval: 0x7ffee2c0c6cc, optlen: 0x7ffee2c0c6c8) = 0 2.422 ( 0.005 ms): systemd-resolv/1121 getsockopt(fd: 22, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) 1001.308 ( 0.006 ms): systemd-resolv/1121 getsockopt(fd: 21, level: 1, optname: 17, optval: 0x7ffee2c0c6cc, optlen: 0x7ffee2c0c6c8) = 0 1001.586 ( 0.003 ms): systemd-resolv/1121 getsockopt(fd: 22, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) 1001.647 ( 0.002 ms): systemd-resolv/1121 getsockopt(fd: 23, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) 1003.868 ( 0.010 ms): systemd-resolv/1121 getsockopt(fd: 21, level: 1, optname: 17, optval: 0x7ffee2c0c6cc, optlen: 0x7ffee2c0c6c8) = 0 1004.036 ( 0.006 ms): systemd-resolv/1121 getsockopt(fd: 22, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) 1004.087 ( 0.002 ms): systemd-resolv/1121 getsockopt(fd: 23, level: IP, optname: 14, optval: 0x7ffee2c0c1a0, optlen: 0x7ffee2c0c1a4) = -1 ENOTCONN (Transport endpoint is not connected) ^C# So the simple straight STRARRAY method is not enough as SOL_SOCKET is '1' in most architectures but some use 0xffff (alpha, mips, parisc and sparc), so a followup patch will create a specialized scnprintf to cover that. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty socket: Add generator for socket level (SOL_*) string tableArnaldo Carvalho de Melo3-3/+17
$ tools/perf/trace/beauty/socket.sh static const char *socket_ipproto[] = { [0] = "IP", [1] = "ICMP", <SNIP> [255] = "RAW", [262] = "MPTCP", }; static const char *socket_level[] = { [0] = "IP", [6] = "TCP", [17] = "UDP", [41] = "IPV6", [58] = "ICMPV6", [132] = "SCTP", [136] = "UDPLITE", [255] = "RAW", [256] = "IPX", [257] = "AX25", [258] = "ATALK", [259] = "NETROM", [260] = "ROSE", [261] = "DECNET", [262] = "X25", [263] = "PACKET", [264] = "ATM", [265] = "AAL", [266] = "IRDA", [267] = "NETBEUI", [268] = "LLC", [269] = "DCCP", [270] = "NETLINK", [271] = "TIPC", [272] = "RXRPC", [273] = "PPPOL2TP", [274] = "BLUETOOTH", [275] = "PNPIPE", [276] = "RDS", [277] = "IUCV", [278] = "CAIF", [279] = "ALG", [280] = "NFC", [281] = "KCM", [282] = "TLS", [283] = "XDP", [284] = "MPTCP", [285] = "MCTP", }; $ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty socket: Sort the ipproto array entriesArnaldo Carvalho de Melo1-1/+1
Just tidying up the output for human consumption. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty socket: Rename 'regex' to 'ipproto_regex'Arnaldo Carvalho de Melo1-3/+3
Paving the way for more regexps to be used here. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty socket: Prep to receive more input header filesArnaldo Carvalho de Melo1-1/+5
Move from ternary like expression to an if block, this way we'll have just the extra lines for new files in the following patches. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty socket: Rename header_dir to uapi_header_dirArnaldo Carvalho de Melo1-2/+2
Paving the way to pass more headers to be consumed, like tools/perf/trace/beauty/include/linux/socket.h in addition to the current tools/include/uapi/linux/in.h, to get the SOL_* defines. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty: Rename socket_ipproto.sh to socket.sh to hold more socket table generatorsArnaldo Carvalho de Melo3-7/+8
To avoid having to add new entries to tools/perf/Makefile.perf prep socket.sh so that it can generate other socket table generators, such as the upcoming SOL_ socket level one. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-12perf beauty: Make all sockaddr files use a common naming schemeArnaldo Carvalho de Melo3-7/+7
The script that generates the tables was named 'socket.sh', which is confusing, rename it to sockaddr.sh and make sure the related Makefile.perf targets also use the 'sockaddr' namespace. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-08Add 'tools/perf/libbpf/' to ignored filesLinus Torvalds1-0/+1
Commit 6b491a86b77c ("perf build: Install libbpf headers locally when building") installed copies of the libbpf headers into the build tree, causing unnecessary noise from 'git status' after a perf tools build. Add the 'libbpf/' subdirectory to the .gitignore file to silence it all again. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-07perf build: Install libbpf headers locally when buildingQuentin Monnet1-13/+19
API headers from libbpf should not be accessed directly from the library's source directory. Instead, they should be exported with "make install_headers". Let's adjust perf's Makefile to install those headers locally when building libbpf. v2: - Fix $(LIBBPF_OUTPUT) when $(OUTPUT) is null. - Make sure the recipe for $(LIBBPF_OUTPUT) is not under a "ifdef". Signed-off-by: Quentin Monnet <quentin@isovalent.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Song Liu <songliubraving@fb.com> Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20211107002445.4790-1-quentin@isovalent.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf MANIFEST: Add bpftool files to allow building with BUILD_BPF_SKEL=1Arnaldo Carvalho de Melo1-0/+3
We need bpftool and required kernel/bpf/disasm.[ch] to bootstrap the cgroups, bperf and other BPF skels used by perf. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf metric: Fix memory leaksIan Rogers1-1/+4
Certain error paths may leak memory as caught by address sanitizer. Ensure this is cleaned up to make sure address/leak sanitizer is happy. Fixes: 5ecd5a0c7d1cca79 ("perf metrics: Modify setup and deduplication") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211107090002.3784612-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf parse-event: Add init and exit to parse_event_errorIan Rogers13-51/+74
parse_events() may succeed but leave string memory allocations reachable in the error. Add an init/exit that must be called to initialize and clean up the error. This fixes a leak in metricgroup parse_ids. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211107090002.3784612-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf parse-events: Rename parse_events_error functionsIan Rogers11-79/+79
Group error functions and name after the data type they manipulate. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211107090002.3784612-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf stat: Fix memory leak on error pathIan Rogers1-0/+1
strdup() is used to deduplicate, ensure it isn't leaking an already created string by freeing first. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211107085444.3781604-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf tools: Use __BYTE_ORDER__Ilya Leoshkevich7-10/+10
Switch from the libc-defined __BYTE_ORDER to the compiler-defined __BYTE_ORDER__ in order to make endianness detection more robust, like it was done for libbpf. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Link: https://lore.kernel.org/r/20211104132311.984703-1-iii@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf inject: Add vmlinux and ignore-vmlinux argumentsJames Clark2-0/+14
Other perf tools allow specifying the path to vmlinux. 'perf inject' didn't have this argument which made some auxtrace workflows difficult. Also add --ignore-vmlinux for consistency with other tools. Suggested-by: Denis Nikitin <denik@chromium.org> Signed-off-by: James Clark <james.clark@arm.com> Tested-by: Denis Nikitin <denik@chromium.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20211018134844.2627174-4-james.clark@arm.com [ Added the perf-inject man page entries for these options, as noted by Denis ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf tools: Check vmlinux/kallsyms arguments in all toolsJames Clark7-0/+28
Only perf report checked the validity of these arguments so apply the same check to all tools that read them for consistency. Signed-off-by: James Clark <james.clark@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Denis Nikitin <denik@chromium.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20211018134844.2627174-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf tools: Refactor out kernel symbol argument sanity checkingJames Clark3-11/+26
User supplied values for vmlinux and kallsyms are checked before continuing. Refactor this into a function so that it can be used elsewhere. Reviewed-by: Denis Nikitin <denik@chromium.org> Signed-off-by: James Clark <james.clark@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20211018134844.2627174-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf symbols: Ignore $a/$d symbols for ARM modulesLexi Shao1-0/+4
On anARM machine, kernel symbols from modules can be resolved to $a instead of printing the actual symbol name. Ignore symbols starting with "$" when building kallsyms rbtree. A sample stacktrace is shown as follows: c0f2e39c schedule_hrtimeout+0x14 ([kernel.kallsyms]) bf4a66d8 $a+0x78 ([test_module]) c0a4f5f4 kthread+0x15c ([kernel.kallsyms]) c0a001f8 ret_from_fork+0x14 ([kernel.kallsyms]) On an ARM machine, $a/$d symbols are used by the compiler to mark the beginning of code/data part in code section. These symbols are filtered out when linking vmlinux(see scripts/kallsyms.c ignored_prefixes), but are left on modules. So there are $a symbols in /proc/kallsyms which share the same addresses with the actual module symbols and confuses perf when resolving symbols. After this patch, the module symbol name is printed: c0f2e39c schedule_hrtimeout+0x14 ([kernel.kallsyms]) bf4a66d8 test_func+0x78 ([test_module]) c0a4f5f4 kthread+0x15c ([kernel.kallsyms]) c0a001f8 ret_from_fork+0x14 ([kernel.kallsyms]) Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Lexi Shao <shaolexi@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jessica Yu <jeyu@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <natechancellor@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: QiuXi <qiuxi1@huawei.com> Cc: Song Liu <songliubraving@fb.com> Cc: Wangbing <wangbing6@huawei.com> Cc: Xiaoming Ni <nixiaoming@huawei.com> Cc: Yonghong Song <yhs@fb.com> Cc: bpf@vger.kernel.org Cc: clang-built-linux@googlegroups.com Link: https://lore.kernel.org/r/20211029065038.39449-2-shaolexi@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-07perf evsel: Don't set exclude_guest by defaultRavi Bangoria3-5/+31
Perf tool sets exclude_guest by default while calling perf_event_open(). Because IBS does not have filtering capability, it always gets rejected by IBS PMU driver and thus perf falls back to non-precise sampling. Fix it by not setting exclude_guest by default on AMD. Before: $ sudo ./perf record -C 0 -vvv true |& grep precise precise_ip 3 decreasing precise_ip by one (2) precise_ip 2 decreasing precise_ip by one (1) precise_ip 1 decreasing precise_ip by one (0) After: $ sudo ./perf record -C 0 -vvv true |& grep precise precise_ip 3 decreasing precise_ip by one (2) precise_ip 2 Committer notes: Fixup init to zero for perf_env in older compilers: arch/x86/util/evsel.c:15:26: error: missing field 'os_release' initializer [-Werror,-Wmissing-field-initializers] struct perf_env env = {0}; ^ Committer notes: Namhyung remarked: It'd be nice if it can cover explicit "-e cycles:pp" as well. Ravi clarified: For explicit :pp modifier, evsel->precise_max does not get set and thus perf does not try with different attr->precise_ip values while exclude_guest set. So no issue with explicit :pp: $ sudo ./perf record -C 0 -e cycles:pp -vvv |& grep "precise_ip\|exclude_guest" precise_ip 2 exclude_guest 1 precise_ip 2 exclude_guest 1 switching off exclude_guest, exclude_host precise_ip 2 ^C Also, with :P modifier, evsel->precise_max gets set but exclude_guest does not and thus :P also works fine: $ sudo ./perf record -C 0 -e cycles:P -vvv |& grep "precise_ip\|exclude_guest" precise_ip 3 decreasing precise_ip by one (2) precise_ip 2 ^C Reported-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211103072112.32312-1-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-06perf evsel: Fix missing exclude_{host,guest} settingNamhyung Kim4-5/+42
The current logic for the perf missing feature has a bug that it can wrongly clear some modifiers like G or H. Actually some PMUs don't support any filtering or exclusion while others do. But we check it as a global feature. For example, the cycles event can have 'G' modifier to enable it only in the guest mode on x86. When you don't run any VMs it'll return 0. # perf stat -a -e cycles:G sleep 1 Performance counter stats for 'system wide': 0 cycles:G 1.000721670 seconds time elapsed But when it's used with other pmu events that don't support G modifier, it'll be reset and return non-zero values. # perf stat -a -e cycles:G,msr/tsc/ sleep 1 Performance counter stats for 'system wide': 538,029,960 cycles:G 16,924,010,738 msr/tsc/ 1.001815327 seconds time elapsed This is because of the missing feature detection logic being global. Add a hashmap to set pmu-specific exclude_host/guest features. Committer notes: Fix 'perf test python' by adding a stub for evsel__find_pmu() in tools/perf/util/python.c, document that it is used so far only for the above reasons so that if anybody needs this in the python binding usecases, we can revisit this. Reported-by: Stephane Eranian <eranian@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Link: http://lore.kernel.org/lkml/20211105205847.120950-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-06perf bpf: Add missing free to bpf_event__print_bpf_prog_info()Ian Rogers1-1/+3
If btf__new() is called then there needs to be a corresponding btf__free(). Fixes: f8dfeae009effc0b ("perf bpf: Show more BPF program info in print_bpf_prog_info()") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <songliubraving@fb.com> Cc: Stephane Eranian <eranian@google.com> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Yonghong Song <yhs@fb.com> Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20211106053733.3580931-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-06perf beauty: Update copy of linux/socket.h with the kernel sourcesArnaldo Carvalho de Melo1-0/+2
To pick the changes in: 99ce45d5e7dbde39 ("mctp: Implement extended addressing") 55c42fa7fa331f98 ("mptcp: add MPTCP_INFO getsockopt") That don't result in any changes in the tables generated from that header. A table generator for setsockopt is needed, probably will be done in the 5.16 cycle. This silences this perf build warning: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Cc: David S. Miller <davem@davemloft.net> Cc: Florian Westphal <fw@strlen.de> Cc: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-06Merge remote-tracking branch 'torvalds/master' into perf/coreArnaldo Carvalho de Melo3-3/+21
To pick up some tools/perf/ patches that went via tip/perf/core, such as: tools/perf: Add mem_hops field in perf_mem_data_src structure Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-04perf clang: Fixes for more recent LLVM/clangIan Rogers1-8/+13
The parameters to two functions and the location of a variable have changed in more recent LLVM/clang releases. Remove the unneecessary -fmessage-length and -ferror-limit flags, the former causes failures like: 58: builtin clang support : 58.1: builtin clang compile C source to IR : --- start --- test child forked, pid 279307 error: unknown argument: '-fmessage-length' 1 error generated. test child finished with -1 Tested with LLVM 6, 8, 9, 10 and 11. Reviewed-by: Fangrui Song <maskray@google.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sedat Dilek <sedat.dilek@gmail.com>, Cc: llvm@lists.linux.dev Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-04tools: Bump minimum LLVM C++ std to GNU++14Ian Rogers1-1/+1
LLVM 9 (current release is LLVM 13) moved the minimum C++ version to GNU++14. Bump the version numbers in the feature test and perf build. Reviewed-by: Fangrui Song <maskray@google.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20211012021321.291635-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-02Merge tag 'net-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-nextLinus Torvalds1-1/+1
Pull networking updates from Jakub Kicinski: "Core: - Remove socket skb caches - Add a SO_RESERVE_MEM socket op to forward allocate buffer space and avoid memory accounting overhead on each message sent - Introduce managed neighbor entries - added by control plane and resolved by the kernel for use in acceleration paths (BPF / XDP right now, HW offload users will benefit as well) - Make neighbor eviction on link down controllable by userspace to work around WiFi networks with bad roaming implementations - vrf: Rework interaction with netfilter/conntrack - fq_codel: implement L4S style ce_threshold_ect1 marking - sch: Eliminate unnecessary RCU waits in mini_qdisc_pair_swap() BPF: - Add support for new btf kind BTF_KIND_TAG, arbitrary type tagging as implemented in LLVM14 - Introduce bpf_get_branch_snapshot() to capture Last Branch Records - Implement variadic trace_printk helper - Add a new Bloomfilter map type - Track <8-byte scalar spill and refill - Access hw timestamp through BPF's __sk_buff - Disallow unprivileged BPF by default - Document BPF licensing Netfilter: - Introduce egress hook for looking at raw outgoing packets - Allow matching on and modifying inner headers / payload data - Add NFT_META_IFTYPE to match on the interface type either from ingress or egress Protocols: - Multi-Path TCP: - increase default max additional subflows to 2 - rework forward memory allocation - add getsockopts: MPTCP_INFO, MPTCP_TCPINFO, MPTCP_SUBFLOW_ADDRS - MCTP flow support allowing lower layer drivers to configure msg muxing as needed - Automatic Multicast Tunneling (AMT) driver based on RFC7450 - HSR support the redbox supervision frames (IEC-62439-3:2018) - Support for the ip6ip6 encapsulation of IOAM - Netlink interface for CAN-FD's Transmitter Delay Compensation - Support SMC-Rv2 eliminating the current same-subnet restriction, by exploiting the UDP encapsulation feature of RoCE adapters - TLS: add SM4 GCM/CCM crypto support - Bluetooth: initial support for link quality and audio/codec offload Driver APIs: - Add a batched interface for RX buffer allocation in AF_XDP buffer pool - ethtool: Add ability to control transceiver modules' power mode - phy: Introduce supported interfaces bitmap to express MAC capabilities and simplify PHY code - Drop rtnl_lock from DSA .port_fdb_{add,del} callbacks New drivers: - WiFi driver for Realtek 8852AE 802.11ax devices (rtw89) - Ethernet driver for ASIX AX88796C SPI device (x88796c) Drivers: - Broadcom PHYs - support 72165, 7712 16nm PHYs - support IDDQ-SR for additional power savings - PHY support for QCA8081, QCA9561 PHYs - NXP DPAA2: support for IRQ coalescing - NXP Ethernet (enetc): support for software TCP segmentation - Renesas Ethernet (ravb) - support DMAC and EMAC blocks of Gigabit-capable IP found on RZ/G2L SoC - Intel 100G Ethernet - support for eswitch offload of TC/OvS flow API, including offload of GRE, VxLAN, Geneve tunneling - support application device queues - ability to assign Rx and Tx queues to application threads - PTP and PPS (pulse-per-second) extensions - Broadcom Ethernet (bnxt) - devlink health reporting and device reload extensions - Mellanox Ethernet (mlx5) - offload macvlan interfaces - support HW offload of TC rules involving OVS internal ports - support HW-GRO and header/data split - support application device queues - Marvell OcteonTx2: - add XDP support for PF - add PTP support for VF - Qualcomm Ethernet switch (qca8k): support for QCA8328 - Realtek Ethernet DSA switch (rtl8366rb) - support bridge offload - support STP, fast aging, disabling address learning - support for Realtek RTL8365MB-VC, a 4+1 port 10M/100M/1GE switch - Mellanox Ethernet/IB switch (mlxsw) - multi-level qdisc hierarchy offload (e.g. RED, prio and shaping) - offload root TBF qdisc as port shaper - support multiple routing interface MAC address prefixes - support for IP-in-IP with IPv6 underlay - MediaTek WiFi (mt76) - mt7921 - ASPM, 6GHz, SDIO and testmode support - mt7915 - LED and TWT support - Qualcomm WiFi (ath11k) - include channel rx and tx time in survey dump statistics - support for 80P80 and 160 MHz bandwidths - support channel 2 in 6 GHz band - spectral scan support for QCN9074 - support for rx decapsulation offload (data frames in 802.3 format) - Qualcomm phone SoC WiFi (wcn36xx) - enable Idle Mode Power Save (IMPS) to reduce power consumption during idle - Bluetooth driver support for MediaTek MT7922 and MT7921 - Enable support for AOSP Bluetooth extension in Qualcomm WCN399x and Realtek 8822C/8852A - Microsoft vNIC driver (mana) - support hibernation and kexec - Google vNIC driver (gve) - support for jumbo frames - implement Rx page reuse Refactor: - Make all writes to netdev->dev_addr go thru helpers, so that we can add this address to the address rbtree and handle the updates - Various TCP cleanups and optimizations including improvements to CPU cache use - Simplify the gnet_stats, Qdisc stats' handling and remove qdisc->running sequence counter - Driver changes and API updates to address devlink locking deficiencies" * tag 'net-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2122 commits) Revert "net: avoid double accounting for pure zerocopy skbs" selftests: net: add arp_ndisc_evict_nocarrier net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter net: arp: introduce arp_evict_nocarrier sysctl parameter libbpf: Deprecate AF_XDP support kbuild: Unify options for BTF generation for vmlinux and modules selftests/bpf: Add a testcase for 64-bit bounds propagation issue. bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off. net: vmxnet3: remove multiple false checks in vmxnet3_ethtool.c net: avoid double accounting for pure zerocopy skbs tcp: rename sk_wmem_free_skb netdevsim: fix uninit value in nsim_drv_configure_vfs() selftests/bpf: Fix also no-alu32 strobemeta selftest bpf: Add missing map_delete_elem method to bloom filter map selftests/bpf: Add bloom map success test for userspace calls bpf: Add alignment padding for "map_extra" + consolidate holes bpf: Bloom filter map naming fixups selftests/bpf: Add test cases for struct_ops prog bpf: Add dummy BPF STRUCT_OPS for test purpose ...
2021-11-01Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-nextJakub Kicinski1-1/+1
Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-11-01 We've added 181 non-merge commits during the last 28 day(s) which contain a total of 280 files changed, 11791 insertions(+), 5879 deletions(-). The main changes are: 1) Fix bpf verifier propagation of 64-bit bounds, from Alexei. 2) Parallelize bpf test_progs, from Yucong and Andrii. 3) Deprecate various libbpf apis including af_xdp, from Andrii, Hengqi, Magnus. 4) Improve bpf selftests on s390, from Ilya. 5) bloomfilter bpf map type, from Joanne. 6) Big improvements to JIT tests especially on Mips, from Johan. 7) Support kernel module function calls from bpf, from Kumar. 8) Support typeless and weak ksym in light skeleton, from Kumar. 9) Disallow unprivileged bpf by default, from Pawan. 10) BTF_KIND_DECL_TAG support, from Yonghong. 11) Various bpftool cleanups, from Quentin. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (181 commits) libbpf: Deprecate AF_XDP support kbuild: Unify options for BTF generation for vmlinux and modules selftests/bpf: Add a testcase for 64-bit bounds propagation issue. bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off. selftests/bpf: Fix also no-alu32 strobemeta selftest bpf: Add missing map_delete_elem method to bloom filter map selftests/bpf: Add bloom map success test for userspace calls bpf: Add alignment padding for "map_extra" + consolidate holes bpf: Bloom filter map naming fixups selftests/bpf: Add test cases for struct_ops prog bpf: Add dummy BPF STRUCT_OPS for test purpose bpf: Factor out helpers for ctx access checking bpf: Factor out a helper to prepare trampoline for struct_ops prog selftests, bpf: Fix broken riscv build riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h tools, build: Add RISC-V to HOSTARCH parsing riscv, bpf: Increase the maximum number of iterations selftests, bpf: Add one test for sockmap with strparser selftests, bpf: Fix test_txmsg_ingress_parser error ... ==================== Link: https://lore.kernel.org/r/20211102013123.9005-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-01Merge tag 'x86_misc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-0/+2
Pull misc x86 changes from Borislav Petkov: - Use the proper interface for the job: get_unaligned() instead of memcpy() in the insn decoder - A randconfig build fix * tag 'x86_misc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/insn: Use get_unaligned() instead of memcpy() x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
2021-11-01perf bpf: Pull in bpf_program__get_prog_info_linear()Dave Marchevsky11-33/+374
To prepare for impending deprecation of libbpf's bpf_program__get_prog_info_linear(), pull in the function and associated helpers into the perf codebase and migrate existing uses to the perf copy. Since libbpf's deprecated definitions will still be visible to perf, it is necessary to rename perf's definitions. Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20211011082031.4148337-4-davemarchevsky@fb.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-01Merge tag 'perf-core-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-2/+18
Pull perf updates from Thomas Gleixner: "Core: - Allow ftrace to instrument parts of the perf core code - Add a new mem_hops field to perf_mem_data_src which allows to represent intra-node/package or inter-node/off-package details to prepare for next generation systems which have more hieararchy within the node/pacakge level. Tools: - Update for the new mem_hops field in perf_mem_data_src Arch: - A set of constraints fixes for the Intel uncore PMU - The usual set of small fixes and improvements for x86 and PPC" * tag 'perf-core-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix ICL/SPR INST_RETIRED.PREC_DIST encodings powerpc/perf: Fix data source encodings for L2.1 and L3.1 accesses tools/perf: Add mem_hops field in perf_mem_data_src structure perf: Add mem_hops field in perf_mem_data_src structure perf: Add comment about current state of PERF_MEM_LVL_* namespace and remove an extra line perf/core: Allow ftrace for functions in kernel/event/core.c perf/x86: Add new event for AUX output counter index perf/x86: Add compiler barrier after updating BTS perf/x86/intel/uncore: Fix Intel SPR M3UPI event constraints perf/x86/intel/uncore: Fix Intel SPR M2PCIE event constraints perf/x86/intel/uncore: Fix Intel SPR IIO event constraints perf/x86/intel/uncore: Fix Intel SPR CHA event constraints perf/x86/intel/uncore: Fix Intel ICX IIO event constraints perf/x86/intel/uncore: Fix invalid unit check perf/x86/intel/uncore: Support extra IMC channel on Ice Lake server
2021-11-01Revert "perf bench futex: Add support for 32-bit systems with 64-bit time_t"Arnaldo Carvalho de Melo1-40/+3
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>
2021-11-01Merge remote-tracking branch 'torvalds/master' into perf/coreArnaldo Carvalho de Melo2-6/+10
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-31perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT supportKan Liang1-1/+1
-F weight in perf script is broken. # ./perf mem record # ./perf script -F weight Samples for 'dummy:HG' event do not have WEIGHT attribute set. Cannot print 'weight' field. The sample type, PERF_SAMPLE_WEIGHT_STRUCT, is an alternative of the PERF_SAMPLE_WEIGHT sample type. They share the same space, weight. The lower 32 bits are exactly the same for both sample type. The higher 32 bits may be different for different architecture. For a new kernel on x86, the PERF_SAMPLE_WEIGHT_STRUCT is used. For an old kernel or other ARCHs, the PERF_SAMPLE_WEIGHT is used. With -F weight, current perf script will only check the input string "weight" with the PERF_SAMPLE_WEIGHT sample type. Because the commit ea8d0ed6eae3 ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT") didn't update the PERF_SAMPLE_WEIGHT_STRUCT sample type for perf script. For a new kernel on x86, the check fails. Use PERF_SAMPLE_WEIGHT_TYPE, which supports both sample types, to replace PERF_SAMPLE_WEIGHT Fixes: ea8d0ed6eae37b01 ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT") Reported-by: Joe Mario <jmario@redhat.com> Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Tested-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Joe Mario <jmario@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Joe Mario <jmario@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Link: https://lore.kernel.org/r/1632929894-102778-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-31perf callchain: Fix compilation on powerpc with gcc11+Jiri Olsa1-1/+1
Got following build fail on powerpc: CC arch/powerpc/util/skip-callchain-idx.o In function ‘check_return_reg’, inlined from ‘check_return_addr’ at arch/powerpc/util/skip-callchain-idx.c:213:7, inlined from ‘arch_skip_callchain_idx’ at arch/powerpc/util/skip-callchain-idx.c:265:7: arch/powerpc/util/skip-callchain-idx.c:54:18: error: ‘dwarf_frame_register’ accessing 96 bytes \ in a region of size 64 [-Werror=stringop-overflow=] 54 | result = dwarf_frame_register(frame, ra_regno, ops_mem, &ops, &nops); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/util/skip-callchain-idx.c: In function ‘arch_skip_callchain_idx’: arch/powerpc/util/skip-callchain-idx.c:54:18: note: referencing argument 3 of type ‘Dwarf_Op *’ In file included from /usr/include/elfutils/libdwfl.h:32, from arch/powerpc/util/skip-callchain-idx.c:10: /usr/include/elfutils/libdw.h:1069:12: note: in a call to function ‘dwarf_frame_register’ 1069 | extern int dwarf_frame_register (Dwarf_Frame *frame, int regno, | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors The dwarf_frame_register args changed with [1], Updating ops_mem accordingly. [1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=5621fe5443da23112170235dd5cac161e5c75e65 Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Mark Wieelard <mjw@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Link: https://lore.kernel.org/r/20210928195253.1267023-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-31perf script: Check session->header.env.arch before using itSong Liu1-4/+8
When perf.data is not written cleanly, we would like to process existing data as much as possible (please see f_header.data.size == 0 condition in perf_session__read_header). However, perf.data with partial data may crash perf. Specifically, we see crash in 'perf script' for NULL session->header.env.arch. Fix this by checking session->header.env.arch before using it to determine native_arch. Also split the if condition so it is easier to read. Committer notes: If it is a pipe, we already assume is a native arch, so no need to check session->header.env.arch. Signed-off-by: Song Liu <songliubraving@fb.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: kernel-team@fb.com Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20211004053238.514936-1-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-31perf build: Suppress 'rm dlfilter' build messageAdrian Hunter1-0/+2
The following build message: rm dlfilters/dlfilter-test-api-v0.o is unwanted. The object file is being treated as an intermediate file and being automatically removed. Mark the object file as .SECONDARY to prevent removal and hence the message. Requested-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20210930062849.110416-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-28perf test sample-parsing: Add endian test for struct branch_flagsMadhavan Srinivasan1-5/+38
Extend the sample-parsing test to include a branch_flag bitfield-endian swap test. This patch adds a include for "util/trace-event.h" in the sample-parsing test for importing tep_is_bigendian() and extends samples_same() to include "needs_swap" to detect/enable check for bitfield-endian swap. Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211028113714.600549-2-maddy@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-28perf evsel: Add bitfield_swap() to handle branch_stack endian issueMadhavan Srinivasan2-2/+88
The branch_stack struct has bit field definition which produces different bit ordering for big/little endian. Because of this, when branch_stack sample is collected in a BE system and viewed/reported in a LE system, bit fields of the branch stack are not presented properly. To address this issue, a evsel__bitfield_swap_branch_stack() is defined and introduced in evsel__parse_sample. Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20211028113714.600549-1-maddy@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-28perf script: Support instruction latencyKan Liang2-3/+13
The instruction latency information can be recorded on some platforms, e.g., the Intel Sapphire Rapids server. With both memory latency (weight) and the new instruction latency information, users can easily locate the expensive load instructions, and also understand the time spent in different stages. The users can optimize their applications in different pipeline stages. Add a new field "ins_lat" to filter the instruction latency information, which is available with sample type PERF_SAMPLE_WEIGHT_STRUCT. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Joe Mario <jmario@redhat.com> Link: https://lore.kernel.org/r/1632929894-102778-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-27perf script: Show binary offsets for userspace addrLexi Shao1-3/+9
Show binary offsets for userspace addr with map in perf script output with callchain. In commit 19610184693c("perf script: Show virtual addresses instead of offsets"), the addr shown in perf script output with callchain is changed from binary offsets to virtual address to fix the incorrectness when displaying symbol offset. This is inconvenient in scenario that the binary is stripped and symbol cannot be resolved. If someone wants to further resolve symbols for specific binaries later, he would need an extra step to translate virtual address to binary offset with mapping information recorded in perf.data, which can be difficult for people not familiar with perf. This patch modifies function sample__fprintf_callchain to print binary offset for userspace addr with dsos, and virtual address otherwise. It does not affect symbol offset calculation so symoff remains correct. Before applying this patch: test 1512 78.711307: 533129 cycles: aaaae0da07f4 [unknown] (/tmp/test) aaaae0da0704 [unknown] (/tmp/test) ffffbe9f7ef4 __libc_start_main+0xe4 (/lib64/libc-2.31.so) After this patch: test 1519 111.330127: 406953 cycles: 7f4 [unknown] (/tmp/test) 704 [unknown] (/tmp/test) 20ef4 __libc_start_main+0xe4 (/lib64/libc-2.31.so) Fixes: 19610184693c("perf script: Show virtual addresses instead of offsets") Signed-off-by: Lexi Shao <shaolexi@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Jiri Olsa <jolsa@redhat.com> 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: QiuXi <qiuxi1@huawei.com> Cc: Wangbing <wangbing6@huawei.com> Cc: Xiaoming Ni <nixiaoming@huawei.com> Link: http://lore.kernel.org/lkml/20211019072417.122576-1-shaolexi@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-27perf bench futex: Add support for 32-bit systems with 64-bit time_tAlistair Francis1-3/+40
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>
2021-10-27perf bench futex: Call the futex syscall from a functionAlistair Francis1-17/+26
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>
2021-10-27perf intel-pt: Support itrace d+o option to direct debug log to stdoutAdrian Hunter3-6/+8
It can be useful to see debug output in between normal output. Add support for AUXTRACE_LOG_FLG_USE_STDOUT to Intel PT. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20211027080334.365596-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-10-27perf auxtrace: Add itrace d+o option to direct debug log to stdoutAdrian Hunter2-0/+3
It can be useful to see debug output in between normal output. Add 'o' to the flags of debug option 'd', so that '--itrace=d+o' can specify output of the debug log to stdout. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20211027080334.365596-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>