summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
Commit message (Collapse)AuthorAgeFilesLines
* kernelsrc/perf: clean up package version while using kernel sourceHongxu Jia2025-07-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If recipe inherits bbclass kernelsrc to use kernel sources, the recipe should explicitly set ${KERNEL_VERSION} to ${PKGV} in task do_package, otherwise package version (${PV} is usually default 1.0) is not consistent with kernel source. For example, there are 5 recipes in meta-openembedded to inherit kernelsrc, but 4 recipes explicitly set PKGV. meta-openembedded$ grep -e "setVar(.*PKGV.*KERNEL_VERSION" -e kernelsrc -rn * meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb:9:inherit kernelsrc meta-oe/recipes-kernel/bpftool/bpftool.bb:8:inherit bash-completion kernelsrc kernel-arch meta-oe/recipes-kernel/bpftool/bpftool.bb:44: d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) meta-oe/recipes-kernel/cpupower/cpupower.bb:8:inherit kernelsrc kernel-arch bash-completion meta-oe/recipes-kernel/cpupower/cpupower.bb:32: d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) meta-oe/recipes-kernel/turbostat/turbostat.bb:98: d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:25:inherit kernelsrc autotools-brokensep meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:68: d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) meta-oe/recipes-kernel/spidev-test/spidev-test.bb:7:inherit bash-completion kernelsrc kernel-arch meta-oe/recipes-kernel/spidev-test/spidev-test.bb:26: d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) This commit clean up the setting of PKGV, move it to kernelsrc.bbclass for common use, the recipe (such as intel-speed-select) that inherited kernelsrc will not be required to explicitly set ${PKGV} with ${KERNEL_VERSION} (From OE-Core rev: 77a93e8cf1da4231341c56f64f9d4d474f9f2bb7) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove consecutive blank linesAlexander Kanavin2025-06-201-1/+0
| | | | | | | | | | | | | | | | | Some of them were introduced by mass-removal of S = WORKDIR/git assignments; rather than try to fix up (or redo) just these, I've run this sed command over the whole tree: sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name *.bb -o -name *.inc` The rationale is that more than one empty line is wasting vertical screen space, and does nothing for readability. (From OE-Core rev: cedc4ff7c9bcfb22a20e43e47f9759f4007a4f1a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: set S to be in UNPACKDIR in recipes that explicitly set SAlexander Kanavin2025-06-201-1/+1
| | | | | | | | (From OE-Core rev: 7321cc17ae5483f17fe9cdffea7b62acd9d9c3a2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add arm64 source files for unistd_64.hYannic Moog2025-06-091-1/+2
| | | | | | | | | | | | | | | | | | kernel commit bfb713ea53c7 ("perf tools: Fix arm64 build by generating unistd_64.h") introduces a new dependency on source files for arm64, specifically include/uapi/asm-generic. Build fails with: [..]/perf/1.0/perf-1.0/scripts/Makefile.asm-headers:33: [...]/perf/1.0/perf-1.0/include/uapi/asm-generic/Kbuild: No such file or directory make[4]: *** No rule to make target '[...]/perf/1.0/perf-1.0/include/uapi/asm-generic/Kbuild'. Stop. Add the directory to PERF_SRC. Fix whitespace error while at it. (From OE-Core rev: 7e24a0e9dd75070bff0c11c4db47a30b71afaa94) Signed-off-by: Yannic Moog <y.moog@phytec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Do not treat maybe-uninitialized warnings as errorsKhem Raj2025-05-221-0/+10
| | | | | | | | | | | Clang finds more warnings in kernel code, make clang happy to not treat these extra warnings as errors (From OE-Core rev: c587f473a4581d1640aa227a23d517c51b7ec3cc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: enable zstd in default PACKAGECONFIGBruce Ashfield2025-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following upstream commit: commit 44b44ffd5dcef03d273ad070d0b02a65a323f5f6 Author: Leo Yan <leo.yan@arm.com> Date: Sun Dec 15 22:12:22 2024 +0000 perf build: Minor improvement for linking libzstd The zstd library will be automatically linked by detecting the feature libzstd. It is no need to explicitly link it for static builds, so remove the redundant linkage. It is contradictory to detect the feature libelf-zstd while the build configuration NO_LIBZSTD is set. Report an error for reminding users not to set NO_LIBZSTD. Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Guilherme Amadio <amadio@gentoo.org> Cc: Hao Luo <haoluo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nick Terrell <terrelln@fb.com> Cc: Quentin Monnet <qmo@kernel.org> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20241215221223.293205-3-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Enforces that zstd must be enabled if libelfstd is detected. Our build of perf and the other default features lead to libelf-zstd being detected, and hence the build aborts when the features are checked. We can't condionally enable this for 6.14+ kernels due to the way that the perf recipe works. The feature is minor and probably should have already been in the defaults. To keep things simple, we just enable it and will watch for any fallout. (From OE-Core rev: c1b44f4e9f7d13673a93aa81be6a3e11aa9f742b) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest: Fix variable assignment whitespaceRichard Purdie2025-02-011-1/+1
| | | | | | | | | | Recipes are much more readable with whitespace around the assignment operators. Fix various assignments in OE-Core to show this is definitely the preferred formatting. (From OE-Core rev: 30ea609d3357fb3de911f2f6a5e6856c151b976a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Fix a minor typoLeon Anavi2024-12-161-1/+1
| | | | | | | | | Fix a minor typo in a comment by replacing "nsures" with ensures. (From OE-Core rev: c1f2df5616e9a14d1d6f2c993de8cc6204aea41f) Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add PACKAGECONFIG for zstdAlexander Hirsch2024-11-011-0/+1
| | | | | | | | | | perf record can use zstd when available to provide on the fly compression. (From OE-Core rev: 1db5bc41e6c672a0c2ac104ee52dfdfe66ac67cd) Signed-off-by: Alexander Hirsch <alexander.hirsch@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Drop perl buildpaths skipRichard Purdie2024-08-081-4/+0
| | | | | | | | | According to my tests, enabling perl in PACKAGECONFIG and building doesn't show any buildpaths QA issue. Therefore drop this INSANE_SKIP as obsolete. (From OE-Core rev: f5f48a53507d73051c77159f423e555f3634b5fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icu/perf: Drop SPDX_S variableRichard Purdie2024-07-141-1/+0
| | | | | | | | | | These were used by external layers and were needed before we had better unpack instrumenation and the recent unpack directory changes. Drop them as obsolete. (From OE-Core rev: 8dae8778ee14caebea92acd0bebf28c5681e39f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Further cleanup compiler optimization flagsRichard Purdie2024-07-131-4/+3
| | | | | | | | | | | | | | Move the -pipe option out of the optimization flags and directly into the flags variables since we always use it now. Also move the debug prefix mapping there to match the nativesdk case which already does this. Fix the documentation and two recipe usages to match the change. (From OE-Core rev: 9badf68d78d995f7d5d4cf27e045f029fc6d4044) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: drop newt from tui build requirementsAlexander Kanavin2024-06-241-4/+1
| | | | | | | | | | | | As the comment says this was used by very old kernels (pre 3.10), and slang has been the only option for a long time. Also, correct the option to disable slang TUI. (From OE-Core rev: a36a84490b943e6f0638c0430ad1eac7740e9be3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: make bpf asm include arch conditionalBruce Ashfield2024-04-081-2/+5
| | | | | | | | | | | | | | | | | | | To keep the perf source copying as small as possible, we can further refine the arch/uapi copy to the single file that we currently need. To avoid a warning from the general perf source copy routine, we make the .h conditional based on the architecture. The supported architectures will not change often, so updating this arch list is very minimal effort. Alternatively, we could add a PERF_OPTIONAL_SRC variable and not warn if a file isn't available for a given architecture. (From OE-Core rev: 879b4a7d378b4d4d11fdda7921b8c47e4523a948) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add asm include required for v6.9+Max Krummenacher2024-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Kernel commit 9eea8fafe33e ("libbpf: fix __arg_ctx type enforcement for perf_event programs") added with 6.9-rc1 tools/include/uapi/asm/bpf_perf_event.h which for arc, arm64, loongarch, riscv and s390 includes headers from the arch/${ARCH}/... directories. Which results in: ERROR: perf-1.0-r0 do_compile: oe_runmake failed | In file included from 1.0/perf-1.0/tools/include/uapi/linux/bpf_perf_event.h:11, | from libbpf.c:36: | perf/1.0/perf-1.0/tools/include/uapi/asm/bpf_perf_event.h:2:10: fatal error: ../../arch/arm64/include/uapi/asm/bpf_perf_event.h: No such file or directory | 2 | #include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h" | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We copy the uapi/asm directory to make sure the header file is present. (From OE-Core rev: d92e04c1cebd7d29a767d5862b713fa97d3e5d8e) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix TMPDIR contamination for recent mainline kernelsEnrico Jörns2024-04-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sed command sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(PYTHON_SITEPACKAGES_DIR)' --root='\$(DESTDIR)',g" \ ${S}/tools/perf/Makefile.perf that was introduced by oe-core commit 43f96506 ("perf: fix the install-python_ext") [1] and adapted with oe-core commit 138673f8 ("perf: Fix reproducibility issues with 5.19 onwards") [2], patches the 'setup.py install' arguments for the 'install-python_ext' Make target similar to what the setuptools3_legacy.bbclass provides as ${SETUPTOOLS_INSTALL_ARGS}. However, this only applies to the linux-yocto kernel patched with linux-yocto commit 3fd60d4d ("perf: change --root to --prefix for python install") [3] that was introduced in 2012 and never went upstream in any way. For a recent mainline kernel instead, we will run into host path contamination QA warnings like: | WARNING: perf-1.0-r0 do_package_qa: QA Issue: File /usr/lib/python3.11/site-packages/perf-0.1-py3.11-linux-x86_64.egg/EGG-INFO/SOURCES.txt in package perf-python contains reference to TMPDIR | File /usr/lib/python3.11/site-packages/perf-0.1-py3.11-linux-x86_64.egg/__pycache__/perf.cpython-311.pyc in package perf-python contains reference to TMPDIR [buildpaths] To fix this, this commit introduces a replacement for Makefile.perf that results in the exact same setup.py install args as for the linux-yocto kernel. In oe-core commit c849ed0c ("perf: fix the install-python_ext on upstream kernel") [4], the sed that was originally meant for 'Makefile' only, was extended to 'Makefile*' (and thus including) Makefile.perf to fix similar issues. Since this would the affect the just-introduced Makefile.perf-specific sed, the scope of this extra sed was limited back to 'Makefile' only. The line could also be entirely removed maybe, since it seems to be for very old kernels only. In general, I would tend to argue that the above-mentioned linux-yocto patch for should be dropped if it requires additional sed-based patching anyway. [1] https://git.openembedded.org/openembedded-core/commit/?id=43f965061f8af4c4537e9d9c0257253e613a616d [2] https://git.openembedded.org/openembedded-core/commit/?id=138673f833a72c636a7fa185089f25dda350dc54 [3] https://git.yoctoproject.org/linux-yocto/commit/?id=3fd60d4d6f0095b03ff9b7b1499a049c580e7302 [4] https://git.openembedded.org/openembedded-core/commit/?id=c849ed0c66a2fb7d91795c421eb4c87b47d03c0d (From OE-Core rev: e68d97dd605babc3c16815b890a52ea3a3a69965) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Fix QA error due to most recent kernelRyan Eatmon2024-04-041-1/+1
| | | | | | | | | | | | | A change in the latest kernel (next), triggers a QA error due to a missing RDEPENDS on perl for perf-tests. ERROR: QA Issue: /usr/libexec/perf-core/tests/shell/common/check_no_patterns_found.pl contained in package perf-tests requires /usr/bin/perl, but no providers found in RDEPENDS:perf-tests? [file-rdeps] (From OE-Core rev: a85e8eb558acbfd77fe83ad150f3dab2f240b094) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/recipes: python 3.12 regexAdrian Freihofer2024-02-131-4/+4
| | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: f2d80817baea298b953d6e14daad65087b3b50c9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Switch to use inherit_deferRichard Purdie2024-01-181-1/+1
| | | | | | | | | | | | | | | | | Now that bitbake supports the use of inherit_defer, switch all conditional (variable based) inherits to use this instead. This leads to more a more deterministic user experience since there is no longer an immediate expansion and later changes to the variables in question (e.g. a bbappend) are accounted for. This patch tries to ensure the behaviour before/after remains as unchanged as it reasonably can, e.g. by always inherting populate_sdk_base. native and nativesdk continue to need to be inherited last, hence being used with inherit_defer in a handful of very specific cases. (From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: drop PE, PR from /usr/src/debug pathsMartin Jansa2023-11-201-2/+2
| | | | | | | | (From OE-Core rev: 4cac17c7de064b6d4e5d7dd252c5b4c610a0c6ee) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix build with latest kernelMax Krummenacher2023-11-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | Kernel 6.7-rc1 commit 02e85f74668e ("tools: arm64: Add a Makefile for generating sysreg-defs.h") uses files from arch/arm64/tools/, gen-sysreg.awk and sysreg. Without the files the build of perf fails independent of the used architecture (confirmed with armv7 and qemux86_64). As arch/arm64/tools/ has been added with 5.13 allow perf to build even it that directory does not exist. Add arch/arm64/tools/ to PERF_SRC. Fixes: | make[3]: *** No rule to make target '.../qemux86_64-tdx-linux/perf/1.0/perf-1.0/arch/arm64/tools/gen-sysreg.awk', needed by '.../qemux86_64-tdx-linux/perf/1.0/perf-1.0/tools/arch/arm64/include/generated/asm/sysreg-defs.h'. Stop. | make[2]: *** [Makefile.perf:456: arm64-sysreg-defs] Error 2 (From OE-Core rev: 432b4ac20dadb9c08596266fce4f3941d4856c7e) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add jevents PACKAGECONFIG itemRasmus Villemoes2023-11-091-0/+3
| | | | | | | | | | | | Building for an arm64 target, e.g. qemuarm64 or a raspberrypi3, without "python" in PACKAGECONFIG, results in | Makefile.config:892: *** ERROR: No python interpreter needed for jevents generation. Install python or build with NO_JEVENTS=1.. Stop. (From OE-Core rev: df1905294690682496d8f8e8284964ab897f0cd4) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: lift TARGET_CC_ARCH modification out of security_flags.incRasmus Villemoes2023-10-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Building perf without security_flags.inc being included in one's distro results in the buildpaths warning WARNING: perf-1.0-r9 do_package_qa: QA Issue: File /usr/bin/trace in package perf contains reference to TMPDIR because the ${DEBUG_PREFIX_MAP} does not get used. Most recipes get that from CFLAGS, but the perf recipe explicitly unsets that. Now ${SELECTED_OPTIMIZATION} of course contains more than just ${DEBUG_FLAGS}/${DEBUG_PREFIX_MAP}. For most TUs, perf's build system adds its own optimization flags (-O6 for odd reasons), so for those including the -O2 or -Og doesn't change anything. But looking at the .o.cmd files show that there are some TUs which currently get built without any -O flag. So for those adding the distro's SELECTED_OPTIMIZATION seem to be the right thing to do. (From OE-Core rev: aa01c9122ef4a2159df503ef6ed25e802277f13a) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Drop remaining PR values from recipesRichard Purdie2023-09-221-1/+0
| | | | | | | | | | | | | | | | We've been removing PR values from recipes at upgrade time for a while. In general anyone maintaining a binary distro would end up having to curate these themselves so the values in OE-Core aren't really that useful anymore. In many ways it makes sense to clear out the remaining ones (which are mostly for 'config' recipes that are unlikely to increase in PV) and leave a clean slate for anyone implementing a binary distro config. References are left in meta-selftest since the tests there do involve them and their removal upon upgrade. (From OE-Core rev: d4c346e8ab8f3cae25d1b01c7331ed9f6d4f96ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: disable perl supportRoss Burton2023-08-241-1/+1
| | | | | | | | | | The perf support was broken and if enabled results in non-reproducible binaries, so disable it for now. (From OE-Core rev: 55463c1898c220b79b77da95b2d0dd9bdc1628a2) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: split scripting PACKAGECONFIG into perl and pythonRoss Burton2023-08-241-9/+11
| | | | | | | | | | There's no reason for Python and Perl support to be tied together, so split the PACKAGECONFIG into two. (From OE-Core rev: af1511065120b12600e39725d8507fa2c018ae1b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix perl binding supportRoss Burton2023-08-242-3/+10
| | | | | | | | | | | | | | | | | | The build of the perl integration has been broken for some time. Update the PERL_* variables so that it can find libperl in the new location. This then fails because the Perl headers cause warnings and the feature checks run with -Werror, so disable the errors. The perf-dbg package then has target build paths, so set INSANE_SKIP for now until this is resolved. (From OE-Core rev: a59e31c78b5468fac461067e5bacf263c2cf23ad) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add more PACKAGECONFIGsRoss Burton2023-08-241-0/+2
| | | | | | | | | | libpfm4 and babeltrace are enabled if they're found, so add PACKAGECONFIGs so that our configuration is explicit. (From OE-Core rev: 8818a259495310f3054abc2918771587e6f82ae9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: enable verbose feature detectionRoss Burton2023-08-241-0/+1
| | | | | | | | | | Having verbose feature detection is helpful to see exactly what has been enabled or disabled. (From OE-Core rev: d08de74d09a83d3bc94cce80f886bd2c6add416b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix buildpaths QA warning in 6.4+Bruce Ashfield2023-07-101-1/+1
| | | | | | | | | | | | | kernel version 6.4 introduces a new file that need to have absolute paths removed, so we can avoid the buildpaths QA warning and have relocatable packages. We add pmu-flex.h to the processing, and the issue is resolved. (From OE-Core rev: b9f1d1ec162531e0ce59ea829ae570ca907b3448) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Make built-in libtraceevent plugins cohabit with external libtraceeventKhem Raj2023-05-311-1/+5
| | | | | | | | | | | | | | | | This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe Fixes do_sdk_depends: The file /usr/lib/traceevent/plugins/plugin_cfg80211.so is installed by both perf and libtraceevent, aborting (From OE-Core rev: 28f39769c27d257a60ff0152acc0c76f0276fa6a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: add libtraceevent packageconfigMax Krummenacher2023-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | With kernel 6.4-rc1 commit 6898e60f709b ("perf build: If libtraceevent isn't present error the build") having libtraceevent is a required dependency unless building it with 'NO_LIBTRACEEVENT=1'. Older kernels did build libtraceevent as provided by the kernel sources. (Unless LIBTRACEEVENT_DYNAMIC=1 was defined, then it tried to pickup an external provided libtraceevent and printed a warning if not found.) Add a libtraceevent packageconfig which adds the dependency on libtraceevent if set, otherwise builds with NO_LIBTRACEEVENT=1. For older kernels the old behaviour of building libtraceevent from the kernel sources isn't changed. (From OE-Core rev: 7e7a7394b47f6fd4a4dd26a18a5d94302ab6df1e) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: make pkg-config availableMax Krummenacher2023-05-221-0/+2
| | | | | | | | | | | | | | | Fixup the to be called pkg-config as $(CROSS_COMPILE)pkg-config doesn't exist. With kernels < 6.4 pkg-config is only used for the gtk+-2.0 integration which is disabled in the OE config. Thus the issue wasn't exposed so far. With kernel 6.4 pkg-config is additionally used for libtraceevent and libtracefs. (From OE-Core rev: f7e743428792fde93d5ca1c97244fc2b967fe666) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix buildpaths QA warningBruce Ashfield2023-03-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the 6.2+ kernel, arm64 perf has a buildpaths QA warning as a syscall table is now being dynamically generated. That generated table includes unistd.h by absolute path, which in turn triggers the buildpaths QA warning. This could easily be patched in linux-yocto, but that would leave the QA issue in perf built from other kernel trees. So we instead to the following: - Add the perf tools directory to the include path - Modify the Makefile to have a relative path to unistd.h and pass both the relative and absolute path to the generation script - Modify the generation script to take the relative location of unistd.h as a new parameter, and use that in the generated sycalls.c file At build, the added include path of the perf source allows the relative path file to be included, and no buildpaths warning is generated. (From OE-Core rev: c8845ab59cd7c28874473618f134a5d45906d6ea) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Enable debug/source packagingRichard Purdie2023-02-041-2/+12
| | | | | | | | | | | | | | | | | | This was disabled in 2014[1] due to an error message which as far as I can tell, no longer occurs. Having debug information and source files present will make debugging reproducibility issues much easier so remove this line as it appears no longer needed. Fix up a few files which have buildpaths in them to avoid QA warnings and reproducubility issues. [1] OE-Core revision c1b5a262c0201faf2c6bf545d6acb32dfe383ba3 (From OE-Core rev: 95983108121c8b96f5659d110498bf2afc6189d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Fix 6.1 kernel reproducibility issueRichard Purdie2023-02-031-0/+4
| | | | | | | | | | | | | | | | | The pmu-events.c file is generated by a python script making os.scandir() calls. The return value is "order on disk" which can cary between machines. Add in a sed to fix the perf source to sort this data which makes the pmu-events.c file deterministic. We should try and upstream this change but we'll need to sed for varying kernel versions. We should also try and get the perf source being added to the perf-devsrc package so when failures like this occur, diffoscope is much more helpful! (From OE-Core rev: d2c27ae5c0d06363d2f0a2a8eb4e8e492df58444) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Depend on native setuptools3Khem Raj2022-10-251-1/+1
| | | | | | | | | | | | perf has need for python setuptools when scripting is enabled from 6.0.0 onwards it seems to throw an explicit error (From OE-Core rev: da3d00178809bbf7cc453401e0c5937796ebc2c1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Fix for recent kernel upgradesRichard Purdie2022-09-211-0/+6
| | | | | | | | | | With recent kernel changes in stable, the full path to python was being encoded into binaries and python install files. Add some workarounds for both issues to fix build reproducibility issues. (From OE-Core rev: cf33e2ab2693eafaf0e5fc45666355d60e084281) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Add packageconfig for libbfd support and use disabled as defaultKhem Raj2022-08-161-0/+1
| | | | | | | | | | | | | | | Disable it by default, libbfd changes with binutils major releases and sometimes it creates a dependency to fix it. See [1] This will help building with binutils 2.39 [1] https://lore.kernel.org/lkml/20210910225756.729087-1-irogers@google.com/T/ (From OE-Core rev: 119b37cd59163970476644183ed509a2d2ea6acd) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Fix reproducibility issues with 5.19 onwardsRichard Purdie2022-08-121-1/+1
| | | | | | | | | | In 5.19 onwards the build process changed and encoded full build paths into the output. Adapt the code to look more like our setuptools class calls. This seems to work ok with older kernels too. (From OE-Core rev: 138673f833a72c636a7fa185089f25dda350dc54) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix reproduciblity in older releases of LinuxRoss Burton2022-07-231-0/+3
| | | | | | | | | | | | | | If you build perf from Linux 5.4 it still contains buildpaths (pointing to the sysroot's Python) as the existing fixes don't apply to the lines in that old release. Add further expressions to remove the final buildpaths. (From OE-Core rev: 6783c1e295e5afafd73a02fd986ca8956a89dda7) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: fix reproducibility in 5.19+Bruce Ashfield2022-07-041-0/+6
| | | | | | | | | | | | | | | | | kernels with upstream commit 630af16eee495f583db5202c3613d1b191f10694 [perf tools: Use Python devtools for version autodetection rather than runtime], or -stable backports of that commmit, evade our substitutions for reproducibility. We add a second sed expression to ensure that our definition of python is used, as we have the proper environement setup and don't need the full path of python, which eventually will be captured by the perf binaries. (From OE-Core rev: b24e73fb34049061ea03a6f2b6a54cdbee7b406b) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: sort-pmuevents: really keep array terminatorsLucas Stach2022-06-221-1/+4
| | | | | | | | | | | | | | | | | | | Commit e1382583cd50 ("perf: sort-pmuevents: don't drop elements") tried to fix a case where the array terminator elements were dropped from the sorted list breaking the build, but it only worked for the case where the terminator is the only element of the array. When the array has other elements the terminator will still be silently dropped, causing invalid memory accesses at runtime when the perf utility iterates over the array. Fix this by treating any unmatched entry as an array terminator and also add a comment to make it a little more clear how things are ending up at the right position in the sorted list. (From OE-Core rev: 69c35a48c5100b884f1b633142b07222b9390e92) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-201-1/+1
| | | | | | | | | | | | | license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Tweak for mips n64Richard Purdie2021-12-121-1/+3
| | | | | | | | | With the changes to binutils, perf's direct calls to ld break for mips n64. We already have tweaks for n32 so match those with the ones for n64. (From OE-Core rev: 33828620872b80e1c745612e025215666ba755c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: Enable libunwind packageconfig on riscv64Khem Raj2021-12-061-1/+0
| | | | | | | | | libunwind now supports risc64 (From OE-Core rev: 41ab1040b61a86157dd1995e36deb3df65d9c0c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: sort-pmuevents: allow for additional type qualifiers and storage classMax Krummenacher2021-11-261-14/+16
| | | | | | | | | | | | | | | | With kernel 5.16 some structs in pmu-events do get a const qualifier, some a static const storage class and qualifier. The current sort-pmuevents cannot cope with that and drops all struct arrays with such additional elements. This then leads to compiler errors. Allow '^struct', '^const struct', '^static struct', '^static const struct'. (From OE-Core rev: 8406e83ade1c34d8a7d8063f2e7445aafa471721) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perf: sort-pmuevents: don't drop elementsMax Krummenacher2021-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a struct element neither has an element cpuid or name it gets silenty dropped. Kernel 5.15 for some ARCHs have at least one array of structs matching this. e.g. for arm pmu-events.c: |#include "pmu-events/pmu-events.h" struct pmu_events_map pmu_events_map[] = { { .cpuid = 0, .version = 0, .type = 0, .table = 0, }, }; struct pmu_sys_events pmu_sys_event_tables[] = { { .table = 0 }, }; Before this patch the second struct is translated to an empty array:: struct pmu_sys_events pmu_sys_event_tables[] = { }; (From OE-Core rev: e1382583cd5060be301afaa9998ccf250cc8bca3) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: convert nested overrides leftovers to new syntaxDenys Dmytriyenko2021-08-041-1/+1
| | | | | | | | | Those were missed in previous rounds of automated and manual conversion. (From OE-Core rev: 22f9c7268b542baf6cd8aa0e34c8fb7aa1579e08) Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-20/+20
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>