<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/recipes-kernel/perf, branch uninative-2.6</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.6</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.6'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-05-15T16:53:29+00:00</updated>
<entry>
<title>perf: make sure that the tools/include/uapi/asm-generic directory exists</title>
<updated>2019-05-15T16:53:29+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2019-05-14T07:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c10a9f72e3abc14a5cc3125ef6e20e7fded26462'/>
<id>urn:sha1:c10a9f72e3abc14a5cc3125ef6e20e7fded26462</id>
<content type='text'>
* 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/

(From OE-Core rev: 5fdb96f4996856286c4f72b93d31b7990ceed8aa)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: workaround the error cased by maybe-uninitialized warning</title>
<updated>2019-04-12T08:29:06+00:00</updated>
<author>
<name>Dengke Du</name>
<email>dengke.du@windriver.com</email>
</author>
<published>2019-04-04T09:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a9ab5627774b65e713259062b983b65fa693004a'/>
<id>urn:sha1:a9ab5627774b65e713259062b983b65fa693004a</id>
<content type='text'>
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-&gt;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'.

(From OE-Core rev: 0eb4048bc5865579327f5a88086e3e3241b012cb)

Signed-off-by: Dengke Du &lt;dengke.du@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: synchronize unistd.h between libc-headers and perf source</title>
<updated>2019-03-09T14:43:11+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2019-03-08T13:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=29500c42b44bbc477e810711c963cf7284e84307'/>
<id>urn:sha1:29500c42b44bbc477e810711c963cf7284e84307</id>
<content type='text'>
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.

(From OE-Core rev: 3a23e094c4189af878e467f1636aea63955e250d)

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: Set libunwind dir explicitly to point into staging sysroot</title>
<updated>2019-03-02T16:49:07+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2019-03-01T03:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=744ce04ddd6cd0b8496cc2261ac4288ec5ff4108'/>
<id>urn:sha1:744ce04ddd6cd0b8496cc2261ac4288ec5ff4108</id>
<content type='text'>
This helps it find the unwind library in sysroot always and not
look around and confuse with host

(From OE-Core rev: e914c03964c540493523b18660f8a4eaeec78e3d)

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: Package libperf-jvmti.so as part of ${PN}</title>
<updated>2019-02-16T08:19:34+00:00</updated>
<author>
<name>Alex Kiernan</name>
<email>alex.kiernan@gmail.com</email>
</author>
<published>2019-01-15T06:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d38dfb48cd2344eeff83c67e2f50d35c15322a3d'/>
<id>urn:sha1:d38dfb48cd2344eeff83c67e2f50d35c15322a3d</id>
<content type='text'>
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.

(From OE-Core rev: 284763fcf188a497f15a1c69a50ceeee99d546f8)

Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: Disable libunwind for ARC &amp; RISCV64</title>
<updated>2018-11-07T23:08:55+00:00</updated>
<author>
<name>Alexey Brodkin</name>
<email>alexey.brodkin@synopsys.com</email>
</author>
<published>2018-10-31T18:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f059696c6018bfa92c3f86107130c80bc413616d'/>
<id>urn:sha1:f059696c6018bfa92c3f86107130c80bc413616d</id>
<content type='text'>
libunwind is not yet ported for ARC &amp; 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.

(From OE-Core rev: bb06900a1f29fdd4066f6d7e7a961d230c2e9438)

Signed-off-by: Alexey Brodkin &lt;abrodkin@synopsys.com&gt;
Cc: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: fix do_compile failure with /tmp mounted with noexec</title>
<updated>2018-10-20T21:40:16+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2018-10-18T13:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d4bc9704a5bd5d11d937aae927aecc4cbb563342'/>
<id>urn:sha1:d4bc9704a5bd5d11d937aae927aecc4cbb563342</id>
<content type='text'>
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

(From OE-Core rev: d819e7fa76e2b732aa7c33ab0e9a834781090824)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Reviewed-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: make tools needed for API documentation respect the manpages PACKAGECONFIG</title>
<updated>2018-10-10T11:47:34+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2018-10-09T14:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2d2a113227b191b97e61aef7d8fca5001ab006da'/>
<id>urn:sha1:2d2a113227b191b97e61aef7d8fca5001ab006da</id>
<content type='text'>
(From OE-Core rev: 15d42f84b1fcffc17b21eba50e5d5ee06419a659)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: do not pull in any perl dependencies unless scripting is requested</title>
<updated>2018-09-13T16:38:07+00:00</updated>
<author>
<name>Dima Zavin</name>
<email>dmitriyz@waymo.com</email>
</author>
<published>2018-09-12T17:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c84266ec35e5e7b577bb4d6a254b31d9078f10ef'/>
<id>urn:sha1:c84266ec35e5e7b577bb4d6a254b31d9078f10ef</id>
<content type='text'>
(From OE-Core rev: 79a19811f4039c5d1861094abbbdaea0aedeee04)

Signed-off-by: Dima Zavin &lt;dmitriyz@waymo.com&gt;
Signed-off-by: Andrew Bresticker &lt;abrestic@waymo.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf: fail if src path does not exist</title>
<updated>2018-08-14T10:36:31+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@bmw.de</email>
</author>
<published>2018-08-13T09:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8d959ad31a3c8fa15ca692f5240d9565ecfec8bd'/>
<id>urn:sha1:8d959ad31a3c8fa15ca692f5240d9565ecfec8bd</id>
<content type='text'>
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.

(From OE-Core rev: c392dabefc431dbfb31d6a1465c75ba9cc765804)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@bmw.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
