summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
AgeCommit message (Collapse)Author
2021-06-22perf: Use python3targetconfig to ensure we use target librariesRichard Purdie
We've seen some reproducibility issues on the autobuilder in perf where the size of the python module varies slightly between systems. After some head scratching and removing the --quiet option to the python module build, you can see it using -Lrecipe-sysroot-native in the linking commandline for the module. This means it is linking against the native library on systems where that works, skipping it and using the target one otherwise, probably with warnings in logs we've not seen. The fix is to inherit the python3targetconfig class which ensures that the target sysroot is used, then the byte differences between the builds go away and things are sane(r) again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8e2b6c042edd9ec76cb8281247604e4f81518780) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-05-06perf: fix python-audit RDEPENDSBruce Ashfield
When doing the perf python3 conversion, the audit-python RDEPENDS was caught up in the regex replacement and was incorrectly changed. The audit recipe continues to produce a package called audit-python and it is that package we should have as a RDEPENDS. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7eccb9c0c2ea00685451c44cb8faa96c4a2272fd) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-06perf-tests: add bash into RDEPENDS (v5.12-rc5+)Bruce Ashfield
Upstream commit: commit 1dc481c0b0cf18d3952d93a73c4ece90dec277f0 Author: Leo Yan <leo.yan@linaro.org> Date: Sat Mar 20 18:45:54 2021 +0800 perf test: Change to use bash for daemon test When executing the daemon test on Arm64 and x86 with Debian (Buster) distro, both skip the test case with the log: Changes tools/perf/tests/shell/daemon.sh to be explicitly bash (it was already required, but was just skipped on various distros). We add it into our RDEPENDS for perf-tests to fixup 5.12+ builds. We already have relatively heavy RDEPENDS for perf tests (python3), so adding bash into the RDEPENDS isn't signifcant even for older perf builds that use the same recipe. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-14perf: Remove libunwind for rv32Khem Raj
libunwind is not yet ported to RISCV32 Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-11perf: reproducibility fixes for pmu-events.cBruce Ashfield
perf generates pmu-events.c as part of the build process. The code that generates the events is doing tree walks and potentially other non-determinstic things. We'd rather not mess with that implementation, so we add a script that knows how to read the pmu-events.c, sort the entries and then copy it over the generated one. With this, we should always have events in the same order, improving reproducibility. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10perf: fix reproducibility issuesBruce Ashfield
perf has been failing our reproducible testing due to multiple symbols containg build paths. With this commit, we fix the issues: 1) The following line in the Makefle: override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO)) "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've ensure that the environment is setup and we do not need the full path to be captured, since the symbol gets built into the executable, making it not reproducible. 2) The following line: srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))), Captures the full src path of perf, which of course makes it not reproducible. We really only need the relative location 'tools/perf', so we change the Makefile line to remove everything before 'tools/perf' 3) OUTPUT is the full path, we have python on the path so we remove it from the definition. This is captured in the perf binary, so breaks reproducibility PYTHONPATH="BUILD_STR(python) 4) To avoid bison generating #ifdefs that have captured paths, we make sure all the calls have YFLAGS, which contains prefix mapping information. Upstream-status: OE specific to our cross/build environments. Variants will be developed for upstream Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-20perf: backport a fix for confusing non-fatal errorMartin Jansa
* add V=1 to make log.do_compile a bit more useful, with this it shows: /bin/sh '/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools/perf/trace/beauty/arch_errno_names.sh' x86_64-oe-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/recipe-sysroot /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools > /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/trace/beauty/generated/arch_errno_name_array.c find: unknown predicate `-m64/arch' x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h' x86_64-oe-linux-gcc: fatal error: no input files compilation terminated. x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h' x86_64-oe-linux-gcc: fatal error: no input files compilation terminated. * apply https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8 with sed call to fix this Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18perf: add PACKAGECONFIG for CoreSight supportRoss Burton
meta-arm has a recipe for OpenCSD, the CoreSight Trace Decoder library, so add a PACKAGECONFIG so that users can enable the use of CoreSight in perf builds. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02perf: fix compile error when rebuildingChangqing Li
Fix error like: Makefile.perf:597: recipe for target 'intel_x86_64-wrs-linux/perf/1.0-r9/perf-1.0/perf-in.o] Error 2 Makefile.perf:220: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 Makefile:69: recipe for target 'all' failed make: *** [all] Error 2 during rebuilding, when kernel version changed, some source files also maybe changed. It could happened that the source under ${S} messed up with some already dropped files and also new files. Fix by clean the ${S} before copy source files. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-10perf: Fix externalsrc supportPaul Barker
When the externalsrc class is used the tasks listed in SRCTREECOVEREDTASKS are deleted to prevent them being executed. If externalsrc is used for the kernel then this will include virtual/kernel:do_patch. We can depend on do_shared_workdir instead as this will survive when externalsrc is used. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22perf: Correct the substitution of python shebangsHe Zhe
To make the native python3 always used, - Use sed one-liner instead - Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the following warning. File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) ModuleNotFoundError: No module named '_sysconfigdata' This issue is first reported by Joel Stanley <joel@jms.id.au> The sed one-liner is credited to Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27perf: Pass LDSHARED and CCLD via EXTRA_OEMAKEKhem Raj
python code underneath is smart and pokes at python installation in sysroot for compile environment, the overrides from EXTRA_OEMAKE are ofcourse preferred but it falls back to python3's distutils/sysconfig for rest of them, and it does use CCLD and LDSHARED for linking, when we use clang to compile python3 then it encodes these variables to be clang however, when building perf we inherit kernel which forces gcc to be used for compiling perf, which then mixes both compilers due to CCLD and LDSHARED demands. Therefore override CCLD and LDSHARED in make environment helps python/distutils to use right linker Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-16perf: fix build for v5.5+Bruce Ashfield
In kernel 5.5+ there are python3 scripts that explicitly use /usr/bin/python3 as the interpreter. That will find the host python and produce undefined results. We add that interpreter path to our substitutions to ensure that our sysroot variant is used. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04perf: drop 'include' copyBruce Ashfield
The copy of the kernel's top level include directory is not required to build perf. We have both the linux-libc-headers and perf's captured/copied headers for what it requires. The copy of the kernel's headers is leading us to multiple smaller fixes to ensure that the various .h files are in sync. We can remove the copy and all of the sync checks, and perf still builds and executes correctly. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-11-04perf: add 'cap' PACKAGECONFIGBruce Ashfield
perf can use libcap when available, so we add a packageconfig for those that want the support. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-11-04perf: create directories before copying single filesBruce Ashfield
If we need to copy a single file from the linux source tree into the perf source tree, we need to ensure that the directory structure it requires has been created first. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-11-04perf: fix v5.4+ buildsBruce Ashfield
When building perf for 5.4+, we have some new files that need to be copied (and synchronized) due to structural changes in the kernel source tree. Some of the issues these fixes are warnings, but none the less, they are worth fixing. - We copy arch/${ARCH}/Makefile, since it is source by some perf Makefiles - We copy scripts/, since the perf utilities are looking for files in that directory stucture. - We have *three* copies of ctypes.h in the tools/* hierarchy during the build. If the tools/perf/util/include/linux/ variant is used, it will trigger build errors since it is not complete. We copy the kernel's main include/linux/ctype.h to ensure they are in sync. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-16perf: fix build on kernels which don't have ${S}/tools/include/linux/bits.hMartin Jansa
* tools/include/linux/bits.h was added in v4.20-rc1 with this commit: commit ba4aa02b417f08a0bee5e7b8ed70cac788a7c854 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Sep 25 10:55:59 2018 -0300 tools include: Adopt linux/bits.h * also if you're building for such older kernel you will probably see do_compile failing with: | config/Makefile:448: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev | config/Makefile:495: Python 3 is not yet supported; please set | config/Makefile:496: PYTHON and/or PYTHON_CONFIG appropriately. easiest work around is to disable scripting PACKAGECONFIG, because since oe-core commit: commit 584af667e0000129bcb5c9e8108485f2f6590eaf Author: Bruce Ashfield <bruce.ashfield@gmail.com> Date: Wed Aug 28 22:14:41 2019 -0400 perf: change dependencies on python to python3 The upstream kernel can now handle python3 for the perf scripts, coupled with the impending EOL of python2, we switch the dependencies in perf (scripting) to python3. it now uses python3, but the support for that was added in kernel v4.17-rc1 with: commit 66dfdff03d196e51322c6a85c0d8db8bb2bdd655 Author: Jaroslav Skarvada <jskarvad@redhat.com> Date: Fri Jan 19 21:56:41 2018 +0100 perf tools: Add Python 3 support Added Python 3 support while keeping Python 2.7 compatibility. if you really need scripting support than either backport the kernel patch to your kernel or undo the perf recipe changes. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-30perf: v5.3+ build fixesBruce Ashfield
In the 5.3+ perf builds, there are multiple unistd.h files that need to be kept in sync. So not only do we update one, we update both to ensure that libc-headers and the perf build are in sync. perf checks some key files itself to be sure they are in sync, and bits.h can be out of sync. There's no build error that results with bits.h at the moment, but we still make sure they are in sync to avoid the configure/compile warning. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30perf: change dependencies on python to python3Bruce Ashfield
The upstream kernel can now handle python3 for the perf scripts, coupled with the impending EOL of python2, we switch the dependencies in perf (scripting) to python3. Outside of dependency changes, we also pass the following two variables to the perf build: PYTHON=python3 PYTHON_CONFIG=python3-config. To ensure that our python3 components are used. For configurations that disable perf scripting, there is no change in behaviour. [YOCTO #13358] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15perf: make sure that the tools/include/uapi/asm-generic directory existsMartin Jansa
* before trying to copy unistd.h into it * older kernels don't have uapi in tools/include and do_configure fails with: DEBUG: Executing shell function do_configure cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h': No such file or directory WARNING: exit code 1 from a shell command. * tools/include/uapi was added in kernel 4.8 with https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f tools: Add copy of perf_event.h to tools/include/linux/ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11perf: workaround the error cased by maybe-uninitialized warningDengke Du
When enable DEBUG_BUILD, the perf build failed by the following error: libbpf.c:727:36: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized] This is ok until Khem commit a patch in oe-core: 16643b03227466e2c80a24c2d079fe36e89553c1 This commit import "-Og" option to "DEBUG_OPTIMIZATION", result in this error. Actually, the warning was misinformation. We explore the code in libbpf.c: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n640 -------------------------------------------------------------------------- if (scn) data = elf_getdata(scn, NULL); if (!scn || !data) { pr_warning("failed to get Elf_Data from map section %d\n", obj->efile.maps_shndx); return -EINVAL; } ...... using data... ...... -------------------------------------------------------------------------- If the 'scn' was not null, the data will be initialized. if the data was null, the function will return -EINVAL, so the data must be not null, but compiler can't see it in 'if' code block, so treat it as 'maybe-uninitialized'. Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09perf: synchronize unistd.h between libc-headers and perf sourceBruce Ashfield
During the build for some architectures, perf generates a program which executes on the host to dump the syscall table. The generation of that program uses the cross compiler + sysroot to expand unistd.h. As such, we are getting the contents of that file from linux-libc-headers. The compilation of that generated program uses the host compiler and a restricted include path to the perf source code. In the perf source there is a captured unistd.h, as such it will be used when compiling the host executable. The perf source code is copied from the kernel version that is being built .. so we have a mismatch between the generation and the compilation of the host program. Normally this mismatch is fine, but if the libc-headers are newer than the kernel, we'll have syscalls (and their syscall numbers) that are not defined in the perf source code. This leads to a compiler error and a cascading failure of the perf build due to a missing generated file. To fix this, we can copy unistd.h from the recipe-sysroot into the perf source code and they will always be in sync. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-01perf: Set libunwind dir explicitly to point into staging sysrootKhem Raj
This helps it find the unwind library in sysroot always and not look around and confuse with host Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-16perf: Package libperf-jvmti.so as part of ${PN}Alex Kiernan
perf's jvmti support builds libperf-jvmti.so that needs to be packaged as part of the main package, not a developer package. Given there's no files in the developer package, override FILES_SOLIBSDEV so it's not gobbled by FILES_${PN}-dev, and then add just that file to FILES_${PN} so that if in the future there other files which would be added to the dev package we'll fail then. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06perf: Disable libunwind for ARC & RISCV64Alexey Brodkin
libunwind is not yet ported for ARC & RISCV64 and on attempt to build it for those arches we just get an error message. If we explicitly disable libunwind it is gracefully handled by perf build system and it just gets configured to not use it so perf is still usable even on those arches. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20perf: fix do_compile failure with /tmp mounted with noexecHongxu Jia
On a builder which has /tmp mounted nexec, the ARM64 generation of the sycall table will fail: [snip] |perf-1.0/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: /tmp/create-table-6VGPSt: Permission denied [snip] To avoid the permission denied error, we must instruct the perf build to place temporary files in an appropriate directory (versus always using /tmp). To do this, we need both a kernel source change to perf, and a recipe change to pass the temp directory in by a TMPDIR variable. The linux-yocto has a reference kernel change: [perf arm64: Fix generate system call table failed with /tmp mounted with noexec], that has also been submitted upstream mailing list linux-perf-users@vger.kernel.org Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Reviewed-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-10perf: make tools needed for API documentation respect the manpages PACKAGECONFIGRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13perf: do not pull in any perl dependencies unless scripting is requestedDima Zavin
Signed-off-by: Dima Zavin <dmitriyz@waymo.com> Signed-off-by: Andrew Bresticker <abrestic@waymo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14perf: fail if src path does not existMikko Rapeli
A missing src directory from a broken kernel recipe resulted only in a warning: WARNING: copyfile: stat of /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch failed ([Errno 2] No such file or directory: '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch') and the build failed horribly. With this change it's an error which can not be missed: ERROR: perf-1.0-r9 do_configure: Path does not exist: /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch. Maybe PERF_SRC does not match the kernel version. ERROR: perf-1.0-r9 do_configure: Function failed: copy_perf_source_from_kernel ERROR: Logfile of failure stored in: /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083 NOTE: recipe perf-1.0-r9: task do_configure: Failed ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure) failed with exit code '1' To get get perf compiling from a custom kernel, a perf.bbappend can be created which defines PERF_SRC as list of files and directories needed from kernel source tree to compile perf. This varies between kernel versions. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14perf: inherit manpages instead of adding man to RDEPENDS_${PN}-docMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-13perf: add dwarf to PACKAGECONFIGAnuj Mittal
Enable perf to be built with DWARF support. Fixes [YOCTO #3359] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-13perf: disable parallelism for 'make clean'Rasmus Villemoes
Whenever perf got rebuilt, I was consistently getting errors such as | find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory | find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory | find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory | [...] | find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory breaking the whole build. The root cause seems to be that the implicit 'make clean' done during do_configure ends up running in parallel, and thus multiple find commands attempt to stat and/or delete the same file. A patch disabling parallelism for the clean target has been ack'ed upstream (lkml.kernel.org/r/20180705134955.GB3686@krava), but it should be harmless to pass JOBS=1 even with a fixed kernel. This can be removed if and when all relevant -stable kernels have that patch. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-29perf: fix build with kernel older than 4.8Martin Jansa
* perf is failing to build for me since this oe-core commit: commit 9b38c824961fc9dce51bda95c25dac91a69fc64f Author: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue Apr 24 11:33:47 2018 +0800 perf: make a copy of kernel source to perf workdir the problem is that perf sources in kernel older than 4.8 (in my case 4.4) are depending on the "global" include headers outside tools directory, e.g. swab.h in: kernel-source/tools$ git grep swab.h perf/MANIFEST:include/linux/swab.h perf/MANIFEST:include/uapi/linux/swab.h perf/util/include/asm/byteorder.h:#include "../../../../include/uapi/linux/swab.h" this was resolved in 4.8 with: commit 7e3f36411342a54f1981fa97b43550b8406a3d69 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon Jul 18 17:42:16 2016 -0300 perf tools: Remove tools/perf/util/include/asm/byteorder.h Not used anymore. This also stops include linux/swab.h directly from the kernel sources, remove that reference from the MANIFEST. and few more changes to make tools/include more complete and standalone: tools/include in 4.15: asm asm-generic linux tools trace uapi tools/include in 4.4: asm asm-generic linux tools but copying the include header even for kernels which don't really need it doesn't add big overhead, so just copy include to perf sources for all kernels. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04perf: make a copy of kernel source to perf workdirHongxu Jia
Since perf contaminates linux shared workdir, it probably caused kernel-devsrc compile failure at world build. ... |0 blocks |cpio: ./tools/perf/arch/arm/util/sedr7ORqk: Cannot stat: No such file or directory |0 blocks ... cpio tried to find a file at ${S}/tools/perf and failed if the input list is not valid. Make a copy of kernel shared source directory into a perf workdir could fix the issue. Drop `Fix for rebuilding' which is obsolete [YOCTO #10880] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-20perf: enable support for libauditAnuj Mittal
perf needs audit-python to be able to show syscall names and for 'perf trace' to work. Enable dependency on audit-python if present in PACKAGECONFIG. It's disabled by default since audit as of now is in meta-selinux. Fixes [YOCTO #3343] Fixes [YOCTO #3358] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-04perf: fix packaging of scripting modulesAnuj Mittal
Make sure that python and perl scripts are packaged in the correct rpm. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-14perf: conditionalise pythonnative and perlnative inheritsRoss Burton
Only inherit these classes (and so, add perl-native and python-native to DEPENDS) if the scripting PACKAGECONFIG is actually enabled. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-11perf: depend on native versions of bison and flexDenys Dmytriyenko
Explicitly depend on bison-native and flex-native for deterministic builds, as those are required for the build: | Makefile.config:129: *** Error: flex is missing on this system, please install it. Stop. | Makefile.perf:205: recipe for target 'sub-make' failed | make[1]: *** [sub-make] Error 2 | Makefile:68: recipe for target 'all' failed | make: *** [all] Error 2 | Makefile.config:133: *** Error: bison is missing on this system, please install it. Stop. | Makefile.perf:205: recipe for target 'sub-make' failed | make[1]: *** [sub-make] Error 2 | Makefile:68: recipe for target 'all' failed | make: *** [all] Error 2 In most cases, those dependencies come indirectly via toolchain dependencies, specifically binutils-cross, which pulls both bison-native and flex-native. Different setups, such as with external toolchain, would expose this problem, since correct dependency is not marked explicitly. The change is build-tested on all qemu architectures. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-05perf: Add HOMEPAGE info into recipe file.Fan Xin
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-09perf: enable libunwindRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15perf: add PACKAGECONFIG for jvmtiStefan Müller-Klieser
Recent kernel build jvmti, java profiling agent, if a host jdk is detected. The library will be packaged in -dev and throws a qa error. Disable the jvmti build per default. Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19perf: add PACKAGECONFIG for systemtapRoss Burton
Otherwise it's possible to race with systemtap headers being present during the autodetection and disappearing during the build: tests/sdt.c:14:21: fatal error: sys/sdt.h: No such file or directory #include <sys/sdt.h> ^ Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-19perf: use PACKAGECONFIG instead of hand-rolled logicRoss Burton
PERF_FEATURES_ENABLE and perf_feature_enabled() was basically a poor man's clone of PACKAGECONFIG, without the automatic handling of dependencies and configure options. As part of the port to PACKAGECONFIG the options have been changed to remove the perf- prefix, but are otherwise unchanged. Also remove BUILDPERF_libc_uclibc assignment as nothing in the metadata uses a BUILDPERF variable. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-30perf: Add EXTRA_LDFLAGS for MIPS N32Zubair Lutfullah Kakakhel
MIPS N32 requires EXTRA_LDFLAGS to link correctly. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28Remove LIC_FILES_CHKSUM from recipes without SRC_URIOlaf Mandel
LICENSE and LIC_FILES_CHKSUM apply to the sources specified by SRC_URI, not to the recipe itself. As such a license declaration for a source-less recipe makes little sense. The LICENSE declaration is mandatory, but LIC_FILES_CHKSUM can be removed in such cases. Remove the LIC_FILES_CHKSUM declarations from all recipes that do not need it. CC: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05perf: Fix to obey LD failureSujith Haridasan
This patch brings the last bit from meta-mentor for the perf to build successfully with minnowmax BSP. The meta-mentor commit for the same is: http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor/commit/meta-mentor-staging?id=a8db95c0d4081cf96915e0c3c4063a44f55e21cc The previous fix: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-kernel/perf?id=ef942d6025e1a339642b10ec1e29055f4ee6bd46 was incomplete and was not submitted upstream. And due to that this change is required. When built on minnowmax ( machine name: intel-corei7-64), an error is noticed during the do_compile: /home/sujith/codebench-linux-install-2015.12-133-i686-pc-linux-gnu/codebench/bin/i686-pc-linux-gnu-ld: Relocatable linking with relocations from format elf64-x86-64 (/home/sujith/MEL/dogwood/build-minnowmax/tmp/work/intel_corei7_64-mel-linux/perf/1.0-r9/perf-1.0/fd/array.o) to format elf32-i386 (/home/sujith/MEL/dogwood/build-minnowmax/tmp/work/intel_corei7_64-mel-linux/perf/1.0-r9/perf-1.0/fd/libapi-in.o) is not supported This change help fix the issue. Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22perf: Fix to obey LD failure on qemux86-64Christopher Larson
When built on an i686 host for qemux86-64 without the fix to obey LD and it fails: /scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld: Relocatable linking with relocations from format elf64-x86-64 (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o) to format elf32-i386 (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o) is not supported This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS, which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>