aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
AgeCommit message (Collapse)Author
2016-07-01pythonnative.bbclass, python3native.bbclass: export STAGING_INCDIR, ↵Alexander Kanavin
STAGING_LIBDIR, PYTHON variables We patch Python's distutils modules to access STAGING_INCDIR/LIBDIR, so when they are not set, scripts that utilize distutils (e.g. python-config) fail. Several recipes need to export those manually to prevent such failures, so let's do that in the class instead. PYTHON variable is exported because otherwise autotools' python.m4 macro will pick up its own internal default, which may not be the version that we want. glib recipe in particular was previously using Python 2.x during build due to python.m4 defaulting to it - now it's using Python 3.x, and so needs a small fix in deletion of *.pyc files. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-30python-native, python3-native: remove the use of exported HOST_SYS and ↵Alexander Kanavin
BUILD_SYS variables The code that utilized them was superseded by the code (in the same patch!) that is utilizing STAGING_LIBDIR/STAGING_INCDIR, and wasn't correct in the first place as HOST_SYS is not necessarily the same as the sysroot directory name. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2016-04-19perf: pass DESTDIR in EXTRA_OEMAKERoss Burton
Instead of passing DESTDIR just in the make install invocation, pass it in EXTRA_OEMAKE. This appears to stop perf from rebuilding at instal time for me, which appears to be the trigger for the random build failure. [ YOCTO #9182 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-24perf: package python modules into perf-pythonBruce Ashfield
The scripts that are part of perf require python and supporting modules. The existing perf-pyton dependency only brought in core python, which left us unable to actually execute the scripts on target. With this additional runtime dependency, we can now execte the sample analysis scripts when perf-scripting is availble. This is a partial fix for [YOCTO #9069], since there are still scripts looking for non-existent modules, and those will be dealt with in future releases. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-24perf: fix python scripts QA errorsBruce Ashfield
Two QA warnings were being generated from perf, due to the location of python scripts changing in the kernel build: WARNING: perf-1.0-r9 do_package_qa: QA Issue: /usr/libexec/perf-core/scripts/python/call-graph-from-postgresql.py contained in package perf-python requires /usr/bin/python2, but no providers found in RDEPENDS_perf-python? [file-rdeps] WARNING: QA Issue: /usr/libexec/perf-core/tests/attr.py_perf contained in package perf requires /usr/bin/python, but no providers found in its RDEPENDS [file-rdeps] By adding libexec dir to both the tests and scripts packaging, we get the appropriate RDEPENDS on the packages that actually contain the python scripts (without making perf-core depend on python). We also tweak any python scripts to use '/usr/bin/env python', rather than a version specific python, since it won't be provided and generate a QA error. [YOCTO #8991] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26perf: add sysroot handling to subcmdMartin Donnelly
v4.5-rc1 of the kernel splits the subcommand related files from perf into a new library, this patch adds the modification of the Makefile to preserve the --sysroot option as for the other perf related Makefiles. Signed-off-by: Martin Donnelly <martin.donnelly@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16meta: more removals of redunant FILES_${PN}-dbgRoss Burton
In some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-16perf: mkdir ${B} -> mkdir -p ${B}Robert Yang
${B} is the default cwd of tasks, so there might be race issues such as: | mkdir: cannot create directory `/path/to/work/qemux86-poky-linux/perf/1.0-r9/perf-1.0/': File exists [snip] NOTE: recipe perf-1.0-r9: task do_configure: Failed Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-16perf: fix the install-python_ext on upstream kernelRoy Li
The Perf source code between Yocto and upstream are different, like below commit is not in upstream, so broaden the "--root" replacement to Makefile* commit 33e96fb1e2d77541e81eb341ccd3fbe9419e4c9a Author: Tom Zanussi <tom.zanussi@intel.com> Date: Tue Jul 3 13:07:23 2012 -0500 perf: change --root to --prefix for python install Otherwise we get the sysroot path appended to the build path, not what we want. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-12perf: fix the install-python_extRoy Li
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and can not compare with 0, this fixes that python module never are installed. 2. python library is installed into /usr/lib/ by default, but we expect it is installed into ${libdir}, so add --install-lib parameter for python setup.py to set the library dir; this fixes not shipped warning, since python modules are installed into /usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is /usr/lib64/ for 64bit machine 3. the makefile target install-python_ext is moved from Makefile to Makefile.perf from linux v3.13, so match install-python_ext in Makefile.* and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target python library to native sysroot, so replace it with --prefix as after linux 3.13; this fixes not shipped warning, and install target files to native dir, like below: ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package: /home /home/pokybuild /home/pokybuild/yocto-autobuilder /home/pokybuild/yocto-autobuilder/yocto-worker /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7 /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-12perf: fix build breakage on kernels after 4.1Reinette Chatre
A recent commit fixed perf build failures with a change that duplicates a fix that can be found in kernels after 4.1. Unfortunately there is a conflict between these two fixes and we see perf build failures when building perf in kernels that contain the fix already. The problem is that the fix from the recipe modifies the location of .config-detected to $(OUTPUT).config-detected. In a 4.2 kernel the location will be changed to $(OUTPUT)$(OUTPUT).config-detected. We change the recipe to require a space in the pattern to only change kernel sources that do not already place file in $(OUTPUT). The recent commit that introduced the build failure is: commit ea9016b60b47138bc58d84a06954b44527b20a19 Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sat Jul 25 14:37:58 2015 +0100 perf: Fix config file conflict with 4.1 kernels If you setup mutlitlibs and then: bitbake perf libb32-perf bitbake perf libb32-perf -c cleansstate bitbake perf libb32-perf you will see races where the two builds get confused about which directory they should be using and they corrupt each other. The issue is that .config-detected is created in ${S}, not $(OUTPUT). We can fix this by moving the file to $(OUTPUT). [YCOTO #8043] (From OE-Core rev: 00608cffffb586e8d2a2075117e710113c471448) (From OE-Core rev: 57df1ebd910e42af47a0039830a60f41a3bd29b6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> The commit in the kernel source that fixes the problem from kernel side is: commit 642273795fa81da11290ffa90bce6ff242f2a7bb Author: Aaro Koskinen <aaro.koskinen@nokia.com> Date: Wed Jul 1 14:54:42 2015 +0300 perf tools: Create config.detected into OUTPUT directory Create config.detected into OUTPUT directory instead of source directory. This fixes parallel builds that share the same source directory. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1435751683-18500-1-git-send-email-aaro.koskinen@nokia.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31perf: add liblzma depdenencyBruce Ashfield
With kernel commit 6c6f0f6164f [tools build: Add feature check for lzma library], perf now performs a test for lzma and adds functionality appropriately. This currently is a floating dependency that will sometimes be present, and sometimes not. The result is the following QA warning: WARNING: QA Issue: perf rdepends on liblzma, but it isn't a build dependency? [build-deps] By adding xz to the DEPENDS, we'll ensure that it is consistently in place. [YOCTO: #8045] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-25perf: Fix config file conflict with 4.1 kernelsRichard Purdie
If you setup mutlitlibs and then: bitbake perf libb32-perf bitbake perf libb32-perf -c cleansstate bitbake perf libb32-perf you will see races where the two builds get confused about which directory they should be using and they corrupt each other. The issue is that .config-detected is created in ${S}, not $(OUTPUT). We can fix this by moving the file to $(OUTPUT). [YCOTO #8043] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16perf: Modify SPDX_S directory to avoid do_spdx error.Li xin
This is because S = "${STAGING_KERNEL_DIR}". Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12perf: remove invalid sed commandRobert Yang
The current kernel supports WERROR now, and there is no Werror in tools/perf/Makefile, remove both sed commands. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03perf: fix build (and feature tests) for 4.1-rcXBruce Ashfield
The way that perf detects features has changed/moved via commit e6c76d620 [perf build: Move feature checks code under tools/build]. This code movement resulted in the definition of CC being dropped, and in turn the passing of --sysroot not part of the build. This results in feature tests failing with errors such as: In file included from test-pthread-attr-setaffinity-np.c:1:0: sysroots/x86_64-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.2/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory # include_next <stdint.h> ^ compilation terminated. While the fix is going upstream, we can modify the perf recipe to add the definition of CC into the Makefile, and we'll continue to work on patched and unpatched kernels. Upstream-status: Pending Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20perf: add bash to RDEPENDSBruce Ashfield
perf has a dependency on bash in its utilities, which generate the following warning: WARNING: QA Issue: perf requires /bin/bash, but no providers in its RDEPENDS [file-rdeps] Since perf is not installed on extremely small systems, we just add bash to the RDEPENDS, rather than modifying scripts or removing content. [YOCTO: #7445] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-02-14meta: enable parallel build for several recipesRobert Yang
I used a for loop to build these packages more than 520 times, these recipes never failed. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-02-03perf: add LIBNUMA_DEFINESRobert Yang
Fixed: WARNING: QA Issue: perf rdepends on numactl, but it isn't a build dependency? [build-deps] The numactl is in meta-oe. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-01-23perf: fix for rebuildingRobert Yang
Fix for rebuilding error: make[3]: *** No rule to make target `/path/to/sysroots/qemuarm64/usr/src/kernel/tools/lib/traceevent//trace-seq.c', needed by `.trace-seq.d'. Stop. make[2]: *** [sub-make] Error 2 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-01-16perf: Disable perf-libunwindTom Zanussi
It hasn't actually been being enabled anyway: 'Disabling post unwind, no support found.'. For now, turn it off because of [YOCTO #7129]. Fixes [YOCTO #7129]. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16perf: Add libdw unwind support to perf-libunwind featureTom Zanussi
perf can use either libdw or libunwind dwarf unwinders, or neither. The perf-libunwind feature implies that if disabled, neither should be used, so have it disable both libdw and libunwind DWARF unwinders if disabled. This fixes [YOCTO #7129]. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16kernel: move source and build output to work-sharedBruce Ashfield
commit 3b3f7e785e279 [kernel: Rearrange for 1.8] began the process of moving the kernel source and build artefacts out of sstate control and into a shared location. This changed triggered some workflow issues, as well as bugs related to the kernel source containing build output, and hence being dirty and breaking kernel rebuilds. To solve these issues, and to make it clear that the kernel is not under sstate control, we move the source and build outputs to: work-shared/MACHINE/kernel-source work-shared/MACHINE/kernel-build-artifacts Where kernel-build-artifacts is the kernel build output and kernel-source is kept "pristine". The build-artifacts contain everything that is required to build external modules against the kernel source, and includes the defconfig, the kernel-abiversion, System.map files and output from "make scripts". External module builds should either pass O= on the command line, or set KBUILD_OUTPUT to point to the build-artifacts. module-base.bbclass takes care of setting KBUILD_OUTPUT, so most existing external module recipes are transparently adapted to the new source/build layout. recipes that depend on the kernel source must have a depedency on the do_shared_workdir task: do_configure[depends] += "virtual/kernel:do_shared_workdir" With this dependency added, the STAGING_KERNEL_DIR will be populated and available to the rest of the build. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-20lttng/perf: depend on virtual/kernel:do_installBruce Ashfield
To ensure that the minimal environment has been created for out of tree module builds, perf and lttng should depend on the do_install task of the kernel. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-12-20kernel: Rearrange for 1.8Richard Purdie
In 1.8 we want to streamline the kernel build process. Basically we currently have multiple copies of the kernel source floating around and the copying/compression/decompression is painful. Lets assume we have a kernel source per machine since in most cases this is true (and we have a sysroot per machine anyway). Basically, instead of extracting a source into WORKDIR, then copying to a sysroot, we now set S to point straight at STAGING_DIR_KERNEL. Anything using kernel source can then just point at it and use: do_configure[depends] += "virtual/kernel:do_patch" to depend on the kernel source being present. Note this is different behaviour to DEPENDS += "virtual/kernel" which equates to do_configure[depends] += "virtual/kernel:do_populate_sysroot". Once we do this, we no longer need the copy operation in do_populate_sysroot, in fact there is nothing to do there (yay). The remaining part of the challenge is to kill off the horrible do_install. This patch splits it off to a different class, the idea here is to have a separate recipe which depends on the virtual/kernel:do_patch and just installs and packages the source needed to build modules on target into a specific package. Right now this code is proof of concept. It builds kernels and kernel modules. perf blows up in do_package with issues on finding the kernel version which can probably be fixed by adding back the right bit of do_install, and adding a dependency of do_package[depends] += "virtual/kernel:do_install" to perf. The whole thing needs a good write up, the corner cases testing and probably a good dose of cleanup to the remaining code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-01perf: fix undefined pr_* routinesBruce Ashfield
When cross compiling libunwind support for ARM a missing debug include means that pr* macros are not expanded, and hence link failures on the undefined functions. Since we must be compatible with many versions of the kernel and perf, we sed the proper include into the files, while the permanent fix goes upstream to the mainline kernel. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29perf: fix issue about package splittingChong Lu
Currently, perf can't split to perf-archive, perf-tests, perf-python and perf-perl. All files are included in perf package. Change the perfexecdir variable to make split successfull. Add python to RDEPENDS_perf-tests. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-10perf: fix v3.17 powerpc compilation issuesBruce Ashfield
The powerpc perf arch port has two issues in the current 3.17-rc seriers. Undefined dwarf symbols and undefined pr_debug calls. commit a60335ba [perf tools powerpc: Adjust callchain based on DWARF debug info] introduces skip-callchain-idx.c, and breaks the perf build. Until fixes get into the mainline kernel, we temporarily fix the issues by adding a forced linke to -ldw and modifying skip-callchain-idx.c to include the proper debug files for pr_debug. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-10perf: add libunwind supportChong Lu
Add a new feature named 'perf-libunwind'. Adding this support to perf allows it to do stack traces on ARM - thumb2 and MIPS targets. PERF_FEATURES variable in perf-features.inc will enable the perf-libunwind. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02perf.bb: fix multilib buildRobert Yang
Fixed: $ bitbake perf lib32-perf ERROR: QA Issue: lib32-perf: Files/directories were installed but not shipped /usr/lib64 /usr/lib64/traceevent /usr/lib64/traceevent/plugins /usr/lib64/traceevent/plugins/plugin_function.so /usr/lib64/traceevent/plugins/plugin_scsi.so /usr/lib64/traceevent/plugins/plugin_hrtimer.so /usr/lib64/traceevent/plugins/plugin_kmem.so /usr/lib64/traceevent/plugins/plugin_jbd2.so /usr/lib64/traceevent/plugins/plugin_xen.so /usr/lib64/traceevent/plugins/plugin_mac80211.so /usr/lib64/traceevent/plugins/plugin_cfg80211.so /usr/lib64/traceevent/plugins/plugin_sched_switch.so /usr/lib64/traceevent/plugins/plugin_kvm.so [installed-vs-shipped] The perf.do_configure edits kernel's ${STAGING_KERNEL_DIR}/tools/perf/config/Makefile, there would be problems since kernel doesn't have multilib, and the build result is undetermined. Previously, the sed command changed libdir to /usr/lib64 (or 32) in the Makefile, so the build result was different if we build perf (64) first or lib32-perf first. Use the weak assignment "libdir ?=" to instead of "libdir =" will fix the problem since the multilib builds are in different processes, and they won't affect each other any more. The sed command will match both $(prefix)/$(lib) and $(prefix)/lib since the Makefile may has been modified before this patch. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06perf: fix indentationMartin Jansa
* multiline variables should use spaces not tabs for indentation * do_configure is also using wrong indentation, but I'm not fixing this one (still hoping that we'll eventually fix styleguide to use 4 spaces everywhere) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06perf: explicitly disable libunwindMartin Jansa
* it's not included in DEPENDS and it's detected from sysroot Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23perf: remove CFLAGS overrideTing Liu
definition of __SANE_USERSPACE_TYPES__ was added in kernel source by commit e3541ec75219819d3235f80125a1a75d798ff6e1 perf tools, powerpc: Fix compile warnings in tests/attr.c Overriding the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as: | CC /.../perf/1.0-r9/perf-1.0/perf.o | In file included from builtin.h:4:0, | from perf.c:9: | util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory | #include <lk/debugfs.h> | ^ | compilation terminated. Signed-off-by: Ting Liu <ting.liu@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-17perf: add slang to the dependenciesHenning Heinold
* TUI/GUI support was added in 2.6.35 based on libnewt * since 3.10 slang replaced libnewt completly * changing TUI_DEFINES is not necessary, because NO_NEWT is still respected with newer kernels * add comment about the gui history to the recipe The patch was sponsored by sysmocom Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13perf: split packgingHenning Heinold
* some fundamental perf commands can work without the dependency on perl, python or bash make them separate packages and RSUGGEST them * bump PR The patch was sponsored by sysmocom Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13perf: fix broken shell comparsion in do_installHenning Heinold
The patch was sponsored by sysmocom Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-10perf: Fix sysroot option to CC handlingRichard Purdie
If you build perf in tree /xxx/treea, then cleansstate perf and build it in /xxx/treeb having deleted treea, the build will fail, unable to find libc. The problem is that the --sysroot option passed in through CC is missing. This works fine if the default sysroot is ok, if it isn't, things will fail. In 1.7 we'll start poisoning the default sysroot in gcc to catch this kind of issue however that doesn't fix the problem with perf. The problem is that various Makefiles set CC = $(CROSS_COMPILE)gcc. The easist fix for now is to sed out the problematic Makefile lines. Its worth noting the tools/lib/traceevent Makefile has a much more funky way of setting CC which works for us and may be the way we need to fix the other Makefiles upstream. This fixes build failures we're occasionally seen on the autobuilders. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21perf: add libexec and traceevent to packagesBruce Ashfield
Recent versions of perf may install files into /usr/libexec/perf-core and in /usr/lib/traceevent. To avoid packaging QA errors, we add these two directories to the FILES variables. We also add: INHIBIT_PACKAGE_DEBUG_SPLIT="1" to avoid the following issue (due to a trailing / being removed): ERROR: debugedit failed with exit code 256 ... debugedit: canonicalization unexpectedly shrank by one character And finally, we must ensure that the traceevent libraries are installed to the proper multilib library path. If building some multlibs, the incorrect library path will be selected by perf, since it triggers via: ifeq ($(ARCH),x86_64) (or similiar mechanism per arch). In a 32 bit build, with a 64 bit multilib, the arch won't match and the detection of a 64 bit build (and library) are not exected. To ensure that libraries are installed to the correct location, we can make the substitution in the config/Makefile. For non multilib builds, this has no impact. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07perf: don't use oe.path.relativeRoss Burton
Instead of using oe.path.relative, use the Python Standard Library function os.path.relpath. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-09perf: Disable warnings as errors for kernels 3.1+Konrad Scherer
Turns out the sed command has not been working as intended since kernel 3.1 due to the trailing space. Adding the WERROR=0 environment variable is the correct way to disable warnings as errors. Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-26perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for mips64Wenzong Fan
As the same reason to powerpc64, mips64 also need the flag. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64Ting Liu
PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h prevents 64-bit userland from seeing this definition, instead defaulting to u64 == long in userspace. Perf want LL64, flag __SANE_USERSPACE_TYPES__ to get int-ll64.h. Fix the below issue: | tests/attr.c:71:4: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' [-Werror=format=] | tests/attr.c:80:7: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type '__u64' [-Werror=format=] | attr->type, attr->config, fd) < 0) { | ^ Signed-off-by: Ting Liu <b28495@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-09-18perf: Add LDFLAGS to allow build of old kernels without patchingOtavio Salvador
The LDFLAGS is required or some old kernels fails due missing symbols and this is preferred than requiring patches to every old supported kernel. Fixes [YOCTO: #5221] Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17perf: Ensure we use CFLAGS and LDFLAGS settings from kernel build systemOtavio Salvador
The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it. Using the CFLAGS and LDFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as: | CC /.../perf/1.0-r8/perf-1.0/perf.o | In file included from builtin.h:4:0, | from perf.c:9: | util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory | #include <lk/debugfs.h> | ^ | compilation terminated. The unset is done in do_compile and do_install otherwise it /rebuild/ perf as it detects the compiler options has change. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-12perf: source should be ready after do_unpackRobert Yang
In perf.bb: S = "${STAGING_KERNEL_DIR}" So the source should be ready after the do_unpack, and we need this: do_unpack[depends] += "virtual/kernel:do_populate_sysroot" Otherwise, maybe no source after do_unpack. [YOCTO #5168] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-27perf: Ensure we general PIC code to avoid build failuresRichard Purdie
Without this we see relocation errors on mips with 3.10. This should be safe to be included in general. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18perf: Ensure license is handled correctlyRichard Purdie
The do_populate_lic task has a race with the recipe since it relies on the kernel being populated in the sysroot. This patch adds in the explicit missing dependency. [YOCTO #3534] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19perf: Fix parsing errorRichard Purdie
Due to the use of ${@...} the code will try and expand this when performing the initial parsing. If the sysroot doesn't exist with an existing kernel, this will fail at parsing time. Sinec we're already in python, just remove the ${@....} wrapping and then we execute at do_package time which is what we want. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19perf: make PKGV match kernel versionTom Zanussi
Have perf grab and use the kernel version it's built from for PKGV, rather than the default perf recipe version, so the final packages get the kernel version instead of the default 1.0, which represents a backwards value from the previous recipe. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-09perf: rename perf_3.4 to perfTom Zanussi
There's nothing kernel-version-specific about the perf_3.4 recipe, so it's actually misnamed and misleading now that it also gets used with the 3.8 kernel. Since the recipe isn't tied to a specific PV, and simply uses whatever's in STAGING_KERNEL_DIR, there's no reason to add anything else either to the bare PN, so just use that as the recipe name. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>