summaryrefslogtreecommitdiffstats
path: root/tools/perf/bench
Commit message (Collapse)AuthorAgeFilesLines
* perf bench inject-buildid: Use zfree() to reduce chances of use after freeArnaldo Carvalho de Melo2023-04-121-1/+2
| | | | | | | | Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Add pmu-scan benchmarkNamhyung Kim2023-04-043-0/+186
| | | | | | | | | | | | | | | | | | | | | | The pmu-scan benchmark will repeatedly scan the sysfs to get the available PMU information. $ ./perf bench internals pmu-scan # Running 'internals/pmu-scan' benchmark: Computing performance of sysfs PMU event scan for 100 times Average PMU scanning took: 6850.990 usec (+- 48.445 usec) Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench numa: Fix type of loop iterator in do_work, it should be 'long'Andreas Herrmann2023-04-041-1/+1
| | | | | | | | | | | 'j' is of type int and start/end are of type 'long'. Thus 'j' might become negative and cause segfault in access_data(). Fix it by using 'long' for 'j' as well. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Andreas Herrmann <aherrmann@suse.de> Link: https://lore.kernel.org/r/20230330074202.14052-1-aherrmann@suse.de Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Avoid NDEBUG warningIan Rogers2023-04-041-2/+6
| | | | | | | | | | | | | | | | | | | With NDEBUG set the asserts are compiled out. This yields "unused-but-set-variable" variables. Move these variables behind NDEBUG to avoid the warning. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20230330183827.1412303-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench syscall: Add fork syscall benchmarkTiezhu Yang2023-04-042-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | This is a follow up patch for the execve bench which is actually fork + execve, it makes sense to add the fork syscall benchmark to compare the execve part precisely. Some archs have no __NR_fork definition which is used only as a check condition to call test_fork(), let us just define it as -1 to avoid build error. Suggested-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/1679381821-22736-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench syscall: Add execve syscall benchmarkTiezhu Yang2023-02-022-0/+37
| | | | | | | | | | | | | | | This commit adds the execve syscall benchmark, more syscall benchmarks can be added in the future. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/1668052208-14047-5-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench syscall: Add getpgid syscall benchmarkTiezhu Yang2023-02-022-0/+12
| | | | | | | | | | | | | | | This commit adds a simple getpgid syscall benchmark, more syscall benchmarks can be added in the future. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/1668052208-14047-4-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench syscall: Introduce bench_syscall_common()Tiezhu Yang2023-02-021-4/+25
| | | | | | | | | | | | | | | | | | In the current code, there is only a basic syscall benchmark via getppid, this is not enough. Introduce bench_syscall_common() so that we can add more syscalls to benchmark. This is preparation for later patch, no functionality change. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/1668052208-14047-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* Merge tag 'parisc-for-6.2-1' of ↵Linus Torvalds2022-12-201-12/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "There is one noteable patch, which allows the parisc kernel to use the same MADV_xxx constants as the other architectures going forward. With that change only alpha has one entry left (MADV_DONTNEED is 6 vs 4 on others) which is different. To prevent an ABI breakage, a wrapper is included which translates old MADV values to the new ones, so existing userspace isn't affected. Reason for that patch is, that some applications wrongly used the standard MADV_xxx values even on some non-x86 platforms and as such those programs failed to run correctly on parisc (examples are qemu-user, tor browser and boringssl). Then the kgdb console and the LED code received some fixes, and some 0-day warnings are now gone. Finally, the very last compile warning which was visible during a kernel build is now fixed too (in the vDSO code). The majority of the patches are tagged for stable series and in summary this patchset is quite small and drops more code than it adds: Fixes: - Fix potential null-ptr-deref in start_task() - Fix kgdb console on serial port - Add missing FORCE prerequisites in Makefile - Drop PMD_SHIFT from calculation in pgtable.h Enhancements: - Implement a wrapper to align madvise() MADV_* constants with other architectures - If machine supports running MPE/XL, show the MPE model string Cleanups: - Drop duplicate kgdb console code - Indenting fixes in setup_cmdline()" * tag 'parisc-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Show MPE/iX model string at bootup parisc: Add missing FORCE prerequisites in Makefile parisc: Move pdc_result struct to firmware.c parisc: Drop locking in pdc console code parisc: Drop duplicate kgdb_pdc console parisc: Fix locking in pdc_iodc_print() firmware call parisc: Drop PMD_SHIFT from calculation in pgtable.h parisc: Align parisc MADV_XXX constants with all other architectures parisc: led: Fix potential null-ptr-deref in start_task() parisc: Fix inconsistent indenting in setup_cmdline()
| * parisc: Align parisc MADV_XXX constants with all other architecturesHelge Deller2022-12-171-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust some MADV_XXX constants to be in sync what their values are on all other platforms. There is currently no reason to have an own numbering on parisc, but it requires workarounds in many userspace sources (e.g. glibc, qemu, ...) - which are often forgotten and thus introduce bugs and different behaviour on parisc. A wrapper avoids an ABI breakage for existing userspace applications by translating any old values to the new ones, so this change allows us to move over all programs to the new ABI over time. Signed-off-by: Helge Deller <deller@gmx.de>
* | perf tools: Use dedicated non-atomic clear/set bit helpersSean Christopherson2022-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the dedicated non-atomic helpers for {clear,set}_bit() and their test variants, i.e. the double-underscore versions. Depsite being defined in atomic.h, and despite the kernel versions being atomic in the kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move to the double-underscore versions so that the versions that are expected to be atomic (for kernel developers) can be made atomic without affecting users that don't want atomic operations. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: James Morse <james.morse@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Marc Zyngier <maz@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Sean Christopherson <seanjc@google.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Yury Norov <yury.norov@gmail.com> Cc: alexandru elisei <alexandru.elisei@arm.com> Cc: kvm@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu Cc: kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20221119013450.2643007-6-seanjc@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf tools: Move 'struct perf_sample' to a separate header file to ↵Arnaldo Carvalho de Melo2022-10-311-1/+1
| | | | | | | | | | | | | | | | | | disentangle headers Some places were including event.h just to get 'struct perf_sample', move it to a separate place so that we speed up a bit the build. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf tools: Make quiet mode consistent between toolsJames Clark2022-10-271-4/+5
|/ | | | | | | | | | | | | | | | | | | | Use the global quiet variable everywhere so that all tools hide warnings in quiet mode and update the documentation to reflect this. 'perf probe' claimed that errors are not printed in quiet mode but I don't see this so remove it from the docs. Signed-off-by: James Clark <james.clark@arm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20221018094137.783081-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Update use of pthread mutex/condIan Rogers2022-10-048-171/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the use of mutex wrappers that provide better error checking. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexandre Truong <alexandre.truong@arm.com> Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andres Freund <andres@anarazel.de> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: André Almeida <andrealmeid@igalia.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Colin Ian King <colin.king@intel.com> Cc: Dario Petrillo <dario.pk1@gmail.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Dave Marchevsky <davemarchevsky@fb.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Fangrui Song <maskray@google.com> Cc: Hewenliang <hewenliang4@huawei.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jason Wang <wangborong@cdjrlc.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kim Phillips <kim.phillips@amd.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin Liška <mliska@suse.cz> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Pavithra Gurushankar <gpavithrasha@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Monnet <quentin@isovalent.com> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Remi Bernon <rbernon@codeweavers.com> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Song Liu <songliubraving@fb.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Tom Rix <trix@redhat.com> Cc: Weiguo Li <liwg06@foxmail.com> Cc: Wenyu Liu <liuwenyu7@huawei.com> Cc: William Cohen <wcohen@redhat.com> Cc: Zechuan Chen <chenzechuan1@huawei.com> Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Cc: yaowenbin <yaowenbin1@huawei.com> Link: https://lore.kernel.org/r/20220826164242.43412-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* Merge remote-tracking branch 'torvalds/master' into perf/coreArnaldo Carvalho de Melo2022-05-231-1/+1
|\ | | | | | | | | | | To get the rest of 5.18. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| * perf bench numa: Address compiler error on s390Thomas Richter2022-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compilation on s390 results in this error: # make DEBUG=y bench/numa.o ... bench/numa.c: In function ‘__bench_numa’: bench/numa.c:1749:81: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 10 and 20 [-Werror=format-truncation=] 1749 | snprintf(tname, sizeof(tname), "process%d:thread%d", p, t); ^~ ... bench/numa.c:1749:64: note: directive argument in the range [-2147483647, 2147483646] ... # The maximum length of the %d replacement is 11 characters because of the negative sign. Therefore extend the array by two more characters. Output after: # make DEBUG=y bench/numa.o > /dev/null 2>&1; ll bench/numa.o -rw-r--r-- 1 root root 418320 May 19 09:11 bench/numa.o # Fixes: 3aff8ba0a4c9c919 ("perf bench numa: Avoid possible truncation when using snprintf()") Suggested-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Link: https://lore.kernel.org/r/20220520081158.2990006-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench breakpoint: Fix build on 32-bit archesArnaldo Carvalho de Melo2022-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cast pointers to unsigned long instead of to uint64_t to avoid this problem on 32-bit arches: 31 6.89 debian:experimental-x-mips : FAIL gcc version 11.2.0 (Debian 11.2.0-18) bench/breakpoint.c: In function 'breakpoint_setup': bench/breakpoint.c:56:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 56 | attr.bp_addr = (uint64_t)addr; | ^ cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.18.0-rc7/tools/build/Makefile.build:139: bench] Error 2 Fixes: 68a6772f11dbb1ed ("perf bench: Add breakpoint benchmarks") Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Dmitriy Vyukov <dvyukov@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/YoLq1nHx1doi+VWl@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | Merge remote-tracking branch 'torvalds/master' into perf/coreArnaldo Carvalho de Melo2022-05-161-0/+2
|\| | | | | | | | | | | To pick up fixes from perf/urgent. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| * perf bench: Fix two numa NDEBUG warningsIan Rogers2022-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG_ON is a no-op if NDEBUG is defined, otherwise it is an assert. Compiling with NDEBUG yields: bench/numa.c: In function ‘bind_to_cpu’: bench/numa.c:314:1: error: control reaches end of non-void function [-Werror=return-type] 314 | } | ^ bench/numa.c: In function ‘bind_to_node’: bench/numa.c:367:1: error: control reaches end of non-void function [-Werror=return-type] 367 | } | ^ Add return statements to cover this case. Reviewed-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20220428202912.1056444-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench: Add breakpoint benchmarksDmitry Vyukov2022-05-133-0/+247
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 2 benchmarks: 1. Performance of thread creation/exiting in presence of breakpoints. 2. Performance of breakpoint modification in presence of threads. The benchmarks capture use cases that we are interested in: using inheritable breakpoints in large highly-threaded applications. The benchmarks show significant slowdown imposed by breakpoints (even when they don't fire). Testing on Intel 8173M with 112 HW threads show: perf bench --repeat=56 breakpoint thread --breakpoints=0 --parallelism=56 --threads=20 78.675000 usecs/op perf bench --repeat=56 breakpoint thread --breakpoints=4 --parallelism=56 --threads=20 12967.135714 usecs/op That's 165x slowdown due to presence of the breakpoints. perf bench --repeat=20000 breakpoint enable --passive=0 --active=0 1.433250 usecs/op perf bench --repeat=20000 breakpoint enable --passive=224 --active=0 585.318400 usecs/op perf bench --repeat=20000 breakpoint enable --passive=0 --active=111 635.953000 usecs/op That's 408x and 444x slowdown due to presence of threads. Profiles show some overhead in toggle_bp_slot, but also very high contention: 90.83% breakpoint-thre [kernel.kallsyms] [k] osq_lock 4.69% breakpoint-thre [kernel.kallsyms] [k] mutex_spin_on_owner 2.06% breakpoint-thre [kernel.kallsyms] [k] __reserve_bp_slot 2.04% breakpoint-thre [kernel.kallsyms] [k] toggle_bp_slot 79.01% breakpoint-enab [kernel.kallsyms] [k] smp_call_function_single 9.94% breakpoint-enab [kernel.kallsyms] [k] llist_add_batch 5.70% breakpoint-enab [kernel.kallsyms] [k] _raw_spin_lock_irq 1.84% breakpoint-enab [kernel.kallsyms] [k] event_function_call 1.12% breakpoint-enab [kernel.kallsyms] [k] send_call_function_single_ipi 0.37% breakpoint-enab [kernel.kallsyms] [k] generic_exec_single 0.24% breakpoint-enab [kernel.kallsyms] [k] __perf_event_disable 0.20% breakpoint-enab [kernel.kallsyms] [k] _perf_event_enable 0.18% breakpoint-enab [kernel.kallsyms] [k] toggle_bp_slot Committer notes: Fixup struct init for older compilers: 3 32.90 alpine:3.5 : FAIL clang version 3.8.1 (tags/RELEASE_381/final) bench/breakpoint.c:49:34: error: missing field 'size' initializer [-Werror,-Wmissing-field-initializers] struct perf_event_attr attr = {0}; ^ 1 error generated. 7 37.31 alpine:3.9 : FAIL gcc version 8.3.0 (Alpine 8.3.0) bench/breakpoint.c:49:34: error: missing field 'size' initializer [-Werror,-Wmissing-field-initializers] struct perf_event_attr attr = {0}; ^ 1 error generated. Signed-off-by: Dmitriy Vyukov <dvyukov@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20220505155745.1690906-1-dvyukov@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix numa bench to fix usage of affinity for machines with #CPUs > 1KAthira Rajeev2022-04-141-33/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'perf bench numa' testcase fails on systems with more than 1K CPUs. Testcase: perf bench numa mem -p 1 -t 3 -P 512 -s 100 -zZ0qcm --thp 1 Snippet of code: <<>> perf: bench/numa.c:302: bind_to_node: Assertion `!(ret)' failed. Aborted (core dumped) <<>> bind_to_node() uses "sched_getaffinity" to save the original cpumask and this call is returning EINVAL ((invalid argument). This happens because the default mask size in glibc is 1024. To overcome this 1024 CPUs mask size limitation of cpu_set_t, change the mask size using the CPU_*_S macros ie, use CPU_ALLOC to allocate cpumask, CPU_ALLOC_SIZE for size. Apart from fixing this for "orig_mask", apply same logic to "mask" as well which is used to setaffinity so that mask size is large enough to represent number of possible CPU's in the system. sched_getaffinity is used in one more place in perf numa bench. It is in "bind_to_cpu" function. Apply the same logic there also. Though currently no failure is reported from there, it is ideal to change getaffinity to work with such system configurations having CPU's more than default mask size supported by glibc. Also fix "sched_setaffinity" to use mask size which is large enough to represent number of possible CPU's in the system. Fixed all places where "bind_cpumask" which is part of "struct thread_data" is used such that bind_cpumask works in all configuration. Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com> Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nageswara R Sastry <rnsastry@linux.ibm.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220412164059.42654-3-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix numa testcase to check if CPU used to bind task is onlineAthira Rajeev2022-04-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf numa bench test fails with error: Testcase: ./perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq --thp 1 --no-data_rand_walk Failure snippet: <<>> Running 'numa/mem' benchmark: # Running main, "perf bench numa numa-mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq --thp 1 --no-data_rand_walk" perf: bench/numa.c:333: bind_to_cpumask: Assertion `!(ret)' failed. <<>> The Testcases uses CPU's 0 and 8. In function "parse_setup_cpu_list", There is check to see if cpu number is greater than max cpu's possible in the system ie via "if (bind_cpu_0 >= g->p.nr_cpus || bind_cpu_1 >= g->p.nr_cpus) {". But it could happen that system has say 48 CPU's, but only number of online CPU's is 0-7. Other CPU's are offlined. Since "g->p.nr_cpus" is 48, so function will go ahead and set bit for CPU 8 also in cpumask ( td->bind_cpumask). bind_to_cpumask function is called to set affinity using sched_setaffinity and the cpumask. Since the CPU8 is not present, set affinity will fail here with EINVAL. Fix this issue by adding a check to make sure that, CPU's provided in the input argument values are online before proceeding further and skip the test. For this, include new helper function "is_cpu_online" in "tools/perf/util/header.c". Since "BIT(x)" definition will get included from header.h, remove that from bench/numa.c Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com> Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Tested-by: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nageswara R Sastry <rnsastry@linux.ibm.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220412164059.42654-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix epoll bench to correct usage of affinity for machines with ↵Athira Rajeev2022-04-092-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #CPUs > 1K The 'perf bench epoll' testcase fails on systems with more than 1K CPUs. Testcase: perf bench epoll all Result snippet: <<>> Run summary [PID 106497]: 1399 threads monitoring on 64 file-descriptors for 8 secs. perf: pthread_create: No such file or directory <<>> In epoll benchmarks (ctl, wait) pthread_create is invoked in do_threads from respective bench_epoll_* function. Though the logs shows direct failure from pthread_create, the actual failure is from "sched_setaffinity" returning EINVAL (invalid argument). This happens because the default mask size in glibc is 1024. To overcome this 1024 CPUs mask size limitation of cpu_set_t, change the mask size using the CPU_*_S macros. Patch addresses this by fixing all the epoll benchmarks to use CPU_ALLOC to allocate cpumask, CPU_ALLOC_SIZE for size, and CPU_SET_S to set the mask. Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com> Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Tested-by: Disha Goel <disgoel@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nageswara R Sastry <rnsastry@linux.ibm.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220406175113.87881-3-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix futex bench to correct usage of affinity for machines with ↵Athira Rajeev2022-04-095-28/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #CPUs > 1K The 'perf bench futex' testcase fails on systems with more than 1K CPUs. Testcase: perf bench futex all Failure snippet: <<>>Running futex/hash benchmark... perf: pthread_create: No such file or directory <<>> All the futex benchmarks (ie hash, lock-api, requeue, wake, wake-parallel), pthread_create is invoked in respective bench_futex_* function. Though the logs shows direct failure from pthread_create, strace logs showed that actual failure is from "sched_setaffinity" returning EINVAL (invalid argument). This happens because the default mask size in glibc is 1024. To overcome this 1024 CPUs mask size limitation of cpu_set_t, change the mask size using the CPU_*_S macros. Patch addresses this by fixing all the futex benchmarks to use CPU_ALLOC to allocate cpumask, CPU_ALLOC_SIZE for size, and CPU_SET_S to set the mask. Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com> Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Tested-by: Disha Goel <disgoel@linux.vnet.ibm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nageswara R Sastry <rnsastry@linux.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20220406175113.87881-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf evlist: Rename cpus to user_requested_cpusIan Rogers2022-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | evlist contains cpus and all_cpus. all_cpus is the union of the cpu maps of all evsels. For non-task targets, cpus is set to be cpus requested from the command line, defaulting to all online cpus if no cpus are specified. For an uncore event, all_cpus may be just CPU 0 or every online CPU. This causes all_cpus to have fewer values than the cpus variable which is confusing given the 'all' in the name. To try to make the behavior clearer, rename cpus to user_requested_cpus and add comments on the two struct variables. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Antonov <alexander.antonov@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: German Gomez <german.gomez@arm.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: John Garry <john.garry@huawei.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Song Liu <songliubraving@fb.com> Cc: Stephane Eranian <eranian@google.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Yonghong Song <yhs@fb.com> Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20220328232648.2127340-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix NULL check against wrong variableWeiguo Li2022-03-121-1/+1
| | | | | | | | | | | | | | | | | We did a NULL check after "epollfdp = calloc(...)", but we checked "epollfd" instead of "epollfdp". Signed-off-by: Weiguo Li <liwg06@foxmail.com> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Davidlohr Bueso <dbueso@suse.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/tencent_B5D64530EB9C7DBB8D2C88A0C790F1489D0A@qq.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf cpumap: Migrate to libperf cpumap apiIan Rogers2022-01-228-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch from directly accessing the perf_cpu_map to using the appropriate libperf API when possible. Using the API simplifies the job of refactoring use of perf_cpu_map. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: André Almeida <andrealmeid@collabora.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Dmitriy Vyukov <dvyukov@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: German Gomez <german.gomez@arm.com> Cc: James Clark <james.clark@arm.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Miaoqian Lin <linmq006@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com> Cc: Song Liu <song@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Stephen Brennan <stephen.s.brennan@oracle.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Yury Norov <yury.norov@gmail.com> Link: http://lore.kernel.org/lkml/20220122045811.3402706-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf cpumap: Give CPUs their own typeIan Rogers2022-01-127-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common problem is confusing CPU map indices with the CPU, by wrapping the CPU with a struct then this is avoided. This approach is similar to atomic_t. Committer notes: To make it build with BUILD_BPF_SKEL=1 these files needed the conversions to 'struct perf_cpu' usage: tools/perf/util/bpf_counter.c tools/perf/util/bpf_counter_cgroup.c tools/perf/util/bpf_ftrace.c Also perf_env__get_cpu() was removed back in "perf cpumap: Switch cpu_map__build_map to cpu function". Additionally these needed to be fixed for the ARM builds to complete: tools/perf/arch/arm/util/cs-etm.c tools/perf/arch/arm64/util/pmu.c Suggested-by: John Garry <john.garry@huawei.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Vineet Singh <vineet.singh@intel.com> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: zhengjun.xing@intel.com Link: https://lore.kernel.org/r/20220105061351.120843-49-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* Revert "perf bench: Fix two memory leaks detected with ASan"Jiri Olsa2021-12-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This: This reverts commit 92723ea0f11d92496687db8c9725248e9d1e5e1d. # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRRRRRRR Ok # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRR Ok # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRRRR Ok yep, it seems the perf bench is broken so the counts won't correlated if I revert this one: 92723ea0f11d perf bench: Fix two memory leaks detected with ASan it works for me again.. it seems to break -t option [root@dell-r440-01 perf]# ./perf bench sched messaging -g 1 -l 100 -t # Running 'sched/messaging' benchmark: RRRperf: CLIENT: ready write: Bad file descriptor Rperf: SENDER: write: Bad file descriptor Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com> Cc: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/lkml/YZev7KClb%2Fud43Lc@krava/ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench: Fix two memory leaks detected with ASanSohaib Mohamed2021-11-181-0/+4
| | | | | | | | | | | | | | | | | | | | ASan reports memory leaks while running: $ perf bench sched all Fixes: e27454cc6352c422 ("perf bench: Add sched-messaging.c: Benchmark for scheduler and IPC mechanisms based on hackbench") Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Hitoshi Mitake <h.mitake@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Russel <rusty@rustcorp.com.au> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Pierre Gondois <pierre.gondois@arm.com> Link: http://lore.kernel.org/lkml/20211110022012.16620-1-sohaib.amhmd@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf bench futex: Fix memory leak of perf_cpu_map__new()Sohaib Mohamed2021-11-134-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | ASan reports memory leaks while running: $ sudo ./perf bench futex all The leaks are caused by perf_cpu_map__new not being freed. This patch adds the missing perf_cpu_map__put since it calls cpu_map_delete implicitly. Fixes: 9c3516d1b850ea93 ("libperf: Add perf_cpu_map__new()/perf_cpu_map__read() functions") Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: André Almeida <andrealmeid@collabora.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Ian Rogers <irogers@google.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: Sohaib Mohamed <sohaib.amhmd@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lore.kernel.org/lkml/20211112201134.77892-1-sohaib.amhmd@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf parse-event: Add init and exit to parse_event_errorIan Rogers2021-11-071-2/+4
| | | | | | | | | | | | | | | | | | | 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>
* perf parse-events: Rename parse_events_error functionsIan Rogers2021-11-071-1/+1
| | | | | | | | | | | | | | | 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>
* Revert "perf bench futex: Add support for 32-bit systems with 64-bit time_t"Arnaldo Carvalho de Melo2021-11-011-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>
* perf bench futex: Add support for 32-bit systems with 64-bit time_tAlistair Francis2021-10-271-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>
* perf bench futex: Call the futex syscall from a functionAlistair Francis2021-10-271-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>
* perf test evlist-open-close: Use inline func to convert timeval to usecRiccardo Mancini2021-10-081-1/+6
| | | | | | | | | | | | | | | | This patch introduces a new inline function to convert a timeval to usec. This function will be used also in the next patch. Signed-off-by: Riccardo Mancini <rickyman7@gmail.com> Cc: Ian Rogers <irogers@google.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> Link: http://lore.kernel.org/lkml/b95035ec4a125355be8ea843f7275c4580da6398.1629490974.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Allow controlling synthesizing PERF_RECORD_ metadata events ↵Namhyung Kim2021-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | during record Depending on the use case, it might require some kind of synthesizing and some not. Make it controllable to turn off heavy operations like MMAP for all tasks. Currently all users are converted to enable all the synthesis by default. It'll be updated in the later patch. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https //lore.kernel.org/r/20210811044658.1313391-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* Merge branch 'akpm' (patches from Andrew)Linus Torvalds2021-09-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge more updates from Andrew Morton: "147 patches, based on 7d2a07b769330c34b4deabeed939325c77a7ec2f. Subsystems affected by this patch series: mm (memory-hotplug, rmap, ioremap, highmem, cleanups, secretmem, kfence, damon, and vmscan), alpha, percpu, procfs, misc, core-kernel, MAINTAINERS, lib, checkpatch, epoll, init, nilfs2, coredump, fork, pids, criu, kconfig, selftests, ipc, and scripts" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (94 commits) scripts: check_extable: fix typo in user error message mm/workingset: correct kernel-doc notations ipc: replace costly bailout check in sysvipc_find_ipc() selftests/memfd: remove unused variable Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH configs: remove the obsolete CONFIG_INPUT_POLLDEV prctl: allow to setup brk for et_dyn executables pid: cleanup the stale comment mentioning pidmap_init(). kernel/fork.c: unexport get_{mm,task}_exe_file coredump: fix memleak in dump_vma_snapshot() fs/coredump.c: log if a core dump is aborted due to changed file permissions nilfs2: use refcount_dec_and_lock() to fix potential UAF nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group nilfs2: fix NULL pointer in nilfs_##name##_attr_release nilfs2: fix memory leak in nilfs_sysfs_create_device_group trap: cleanup trap_init() init: move usermodehelper_enable() to populate_rootfs() ...
| * tools: rename bitmap_alloc() to bitmap_zalloc()Andy Shevchenko2021-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename bitmap_alloc() to bitmap_zalloc() in tools to follow the bitmap API in the kernel. No functional changes intended. Link: https://lkml.kernel.org/r/20210814211713.180533-14-yury.norov@gmail.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Yury Norov <yury.norov@gmail.com> Suggested-by: Yury Norov <yury.norov@gmail.com> Acked-by: Yury Norov <yury.norov@gmail.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Lobakin <alobakin@pm.me> Cc: Alexey Klimov <aklimov@redhat.com> Cc: Dennis Zhou <dennis@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | perf bench evlist-open-close: Use PRIu64 with u64 to fix build on 32-bit ↵Arnaldo Carvalho de Melo2021-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | architectures 73 9.00 ubuntu:18.04-x-powerpc : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) bench/evlist-open-close.c: In function 'bench_evlist_open_close__run': bench/evlist-open-close.c:173:12: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'u64 {aka long long unsigned int}' [-Werror=format=] pr_debug("Iteration %d took:\t%ldus\n", i, runtime_us); ^ bench/../util/debug.h:18:21: note: in definition of macro 'pr_fmt' #define pr_fmt(fmt) fmt ^~~ bench/evlist-open-close.c:173:3: note: in expansion of macro 'pr_debug' pr_debug("Iteration %d took:\t%ldus\n", i, runtime_us); ^~~~~~~~ cc1: all warnings being treated as errors /git/perf-5.14.0/tools/build/Makefile.build:139: recipe for target 'bench' failed Cc: Riccardo Mancini <rickyman7@gmail.com> Fixes: 4241eabf59d5b7e9 ("perf bench: Add benchmark for evlist open/close operations") Link: http://lore.kernel.org/lkml/YS0oTcA9Zuy8Wjm9@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench inject-buildid: Handle writen() errorsArnaldo Carvalho de Melo2021-08-301-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build on fedora:35 and fedora:rawhide with clang is failing with: 49 41.00 fedora:35 : FAIL clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35) bench/inject-buildid.c:351:6: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] u64 len = 0; ^ 1 error generated. make[3]: *** [/git/perf-5.14.0-rc7/tools/build/Makefile.build:139: bench] Error 2 50 41.11 fedora:rawhide : FAIL clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35) bench/inject-buildid.c:351:6: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] u64 len = 0; ^ 1 error generated. make[3]: *** [/git/perf-5.14.0-rc7/tools/build/Makefile.build:139: bench] Error 2 That 'len' variable is not used at all, so just make sure all the synthesize_RECORD() routines return ssize_t to propagate the writen() return, as it may fail, ditch the 'ret' var and bail out if those routines fail. Fixes: 0bf02a0d80427f26 ("perf bench: Add build-id injection benchmark") Acked-by: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/lkml/CAM9d7cgEZNSor+B+7Y2C+QYGme_v5aH0Zn0RLfxoQ+Fy83EHrg@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench: Add benchmark for evlist open/close operationsRiccardo Mancini2021-08-103-0/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new benchmark finds the total time that is taken to open, mmap, enable, disable, munmap, close an evlist (time taken for new, create_maps, config, delete is not counted in). The evlist can be configured as in perf-record using the -a,-C,-e,-u,--per-thread,-t,-p options. The events can be duplicated in the evlist to quickly test performance with many events using the -n options. Furthermore, also the number of iterations used to calculate the statistics is customizable. Examples: - Open one dummy event system-wide: $ sudo ./perf bench internals evlist-open-close Number of cpus: 4 Number of threads: 1 Number of events: 1 (4 fds) Number of iterations: 100 Average open-close took: 613.870 usec (+- 32.852 usec) - Open the group '{cs,cycles}' on CPU 0 $ sudo ./perf bench internals evlist-open-close -e '{cs,cycles}' -C 0 Number of cpus: 1 Number of threads: 1 Number of events: 2 (2 fds) Number of iterations: 100 Average open-close took: 8503.220 usec (+- 252.652 usec) - Open 10 'cycles' events for user 0, calculate average over 100 runs $ sudo ./perf bench internals evlist-open-close -e cycles -n 10 -u 0 -i 100 Number of cpus: 4 Number of threads: 328 Number of events: 10 (13120 fds) Number of iterations: 100 Average open-close took: 180043.140 usec (+- 2295.889 usec) Committer notes: Replaced a deprecated bzero() call with designated initialized zeroing. Added some missing evlist allocation checks, one noted by Riccardo on the mailing list. Minor cosmetic changes (sent in private). Signed-off-by: Riccardo Mancini <rickyman7@gmail.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Ian Rogers <irogers@google.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> Link: http://lore.kernel.org/lkml/20210809201101.277594-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench futex, requeue: Add --pi parameterDavidlohr Bueso2021-08-092-26/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | perf bench futex, requeue: Robustify futex_wait() handlingDavidlohr Bueso2021-08-091-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Do not assume success and account for EAGAIN or any other return value, however unlikely. 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-7-dave@stgolabs.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* | perf bench futex, requeue: Add --broadcast optionDavidlohr Bueso2021-08-092-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | perf bench futex: Add --mlockall parameterDavidlohr Bueso2021-08-096-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | perf bench futex: Remove bogus backslash from commentDavidlohr Bueso2021-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | perf bench futex: Group test parameters cleanupDavidlohr Bueso2021-08-096-137/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | perf tools: Remove repipe argument from perf_session__new()Namhyung Kim2021-08-021-2/+2
|/ | | | | | | | | | | | | | | | | | The repipe argument is only used by perf inject and the all others passes 'false'. Let's remove it from the function signature and add __perf_session__new() to be called from perf inject directly. This is a preparation of the change the pipe input/output. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210719223153.1618812-2-namhyung@kernel.org [ Fixed up some trivial conflicts as this patchset fell thru the cracks ;-( ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>