<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/recipes-kernel/perf/perf.bb, branch master-next2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=master-next2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=master-next2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-09-16T22:02:45+00:00</updated>
<entry>
<title>perf: fix build on kernels which don't have ${S}/tools/include/linux/bits.h</title>
<updated>2019-09-16T22:02:45+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2019-09-13T08:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=92469aad50b623afa423c19d82ed2e3c667c5e6a'/>
<id>urn:sha1:92469aad50b623afa423c19d82ed2e3c667c5e6a</id>
<content type='text'>
* tools/include/linux/bits.h was added in v4.20-rc1 with this commit:
  commit ba4aa02b417f08a0bee5e7b8ed70cac788a7c854
  Author: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
  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 &lt;bruce.ashfield@gmail.com&gt;
  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 &lt;jskarvad@redhat.com&gt;
  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.

(From OE-Core rev: d6ee3d3bdf183a9060b5b0c25b97688a4b9d40dc)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@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: v5.3+ build fixes</title>
<updated>2019-08-30T16:10:28+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2019-08-28T19:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d7a0fdf133b82289633187400619feec1d0a305e'/>
<id>urn:sha1:d7a0fdf133b82289633187400619feec1d0a305e</id>
<content type='text'>
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.

(From OE-Core rev: b850ee597e7116cc2a7546853f2b976c891196ef)

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: change dependencies on python to python3</title>
<updated>2019-08-30T16:10:28+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2019-08-29T02:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e66d183b9e2cea67813b43bcb23622870102e9a3'/>
<id>urn:sha1:e66d183b9e2cea67813b43bcb23622870102e9a3</id>
<content type='text'>
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]

(From OE-Core rev: 584af667e0000129bcb5c9e8108485f2f6590eaf)

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: 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>
</feed>
