mbox series

[0/1] RFC: Package perf from linux kernel tools

Message ID 20210119124157.12662-1-felix.moessbauer@siemens.com
Headers show
Series RFC: Package perf from linux kernel tools | expand

Message

MOESSBAUER, Felix Jan. 19, 2021, 2:41 a.m. UTC
Hi all,

this patch adds support to build the linux-perf<version> package
that includes the kernel specific perf tooling.

During implementation I tried two different approaches:
1. package as part of the kernel receipt (as Debian does)
2. package as a regular package (similar to how the kselftest is packaged)

This RFC implements approach 2 but tries to be as close as possible
to the Debian upstream packaging.
By that, we use the same patches from Debian upstream to build our package.
Note, that these are dependent on the exact kernel version.
Here, I used the latest available bugfix version from upstream (4.19.160).
Perf should then be compatible with 4.19 kernels (only partially tested).

A major obstacle in implementing approach 1 was that the patches for linux-tools
are not trivial and have to match with the corresponding kernel version.
Writing that in a way that works for various kernel versions was something I
was not able to accomplish.
Hence, I decided that it might be better to avoid that much complexity in the
kernel receipt. Most users might not need the tools anyways, but probably a
custom kernel.

Finally, this patch also builds the kernel specific python bindings of perf.
This patch has already been sent upstream, but is not yet integrated in Debian.
For reference, see here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860957

Best regards,
Felix Mößbauer

Felix Moessbauer (1):
  RFC: Package perf from linux kernel tools

 .../recipes-kernel/linux-perf/files/rules     |  53 ++++++++
 .../linux-perf/files/tools-perf-install.patch |  58 +++++++++
 .../linux-perf/files/tools-perf-python.patch  |  55 ++++++++
 .../linux-perf/files/tools-perf-version.patch | 119 ++++++++++++++++++
 .../linux-perf/linux-perf-4.19_4.19.160.bb    |  11 ++
 .../recipes-kernel/linux-perf/linux-perf.inc  |  46 +++++++
 6 files changed, 342 insertions(+)
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/rules
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-install.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-python.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-version.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf-4.19_4.19.160.bb
 create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf.inc

Comments

Henning Schild Jan. 20, 2021, 1:12 a.m. UTC | #1
Hi,

i think perf support in general is something we clearly want to have.
As far as i remember Cedric might be interested as well, adding him to
CC.

Maybe a split into the basic support and the python bindings is useful.
Because those python bindings are pretty different from upstream, and
they probably deserve a test-package if we agree that we want to
support them in isar.

Henning

Am Tue, 19 Jan 2021 13:41:57 +0100
schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:

> Hi all,
> 
> this patch adds support to build the linux-perf<version> package
> that includes the kernel specific perf tooling.
> 
> During implementation I tried two different approaches:
> 1. package as part of the kernel receipt (as Debian does)
> 2. package as a regular package (similar to how the kselftest is
> packaged)
> 
> This RFC implements approach 2 but tries to be as close as possible
> to the Debian upstream packaging.
> By that, we use the same patches from Debian upstream to build our
> package. Note, that these are dependent on the exact kernel version.
> Here, I used the latest available bugfix version from upstream
> (4.19.160). Perf should then be compatible with 4.19 kernels (only
> partially tested).
> 
> A major obstacle in implementing approach 1 was that the patches for
> linux-tools are not trivial and have to match with the corresponding
> kernel version. Writing that in a way that works for various kernel
> versions was something I was not able to accomplish.
> Hence, I decided that it might be better to avoid that much
> complexity in the kernel receipt. Most users might not need the tools
> anyways, but probably a custom kernel.
> 
> Finally, this patch also builds the kernel specific python bindings
> of perf. This patch has already been sent upstream, but is not yet
> integrated in Debian. For reference, see here:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860957
> 
> Best regards,
> Felix Mößbauer
> 
> Felix Moessbauer (1):
>   RFC: Package perf from linux kernel tools
> 
>  .../recipes-kernel/linux-perf/files/rules     |  53 ++++++++
>  .../linux-perf/files/tools-perf-install.patch |  58 +++++++++
>  .../linux-perf/files/tools-perf-python.patch  |  55 ++++++++
>  .../linux-perf/files/tools-perf-version.patch | 119
> ++++++++++++++++++ .../linux-perf/linux-perf-4.19_4.19.160.bb    |
> 11 ++ .../recipes-kernel/linux-perf/linux-perf.inc  |  46 +++++++
>  6 files changed, 342 insertions(+)
>  create mode 100644 meta-isar/recipes-kernel/linux-perf/files/rules
>  create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-install.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-python.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-version.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/linux-perf-4.19_4.19.160.bb
> create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf.inc
>
Henning Schild Jan. 20, 2021, 1:21 a.m. UTC | #2
For a v2 perf should be added to scripts/ci_build or the local.conf
used by it which will probably reveal problems with bullseye and
stretch, maybe != x86 as well

You will get access to a Siemens internal CI for that and other future
contributions.

Henning

Am Tue, 19 Jan 2021 13:41:57 +0100
schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:

> Hi all,
> 
> this patch adds support to build the linux-perf<version> package
> that includes the kernel specific perf tooling.
> 
> During implementation I tried two different approaches:
> 1. package as part of the kernel receipt (as Debian does)
> 2. package as a regular package (similar to how the kselftest is
> packaged)
> 
> This RFC implements approach 2 but tries to be as close as possible
> to the Debian upstream packaging.
> By that, we use the same patches from Debian upstream to build our
> package. Note, that these are dependent on the exact kernel version.
> Here, I used the latest available bugfix version from upstream
> (4.19.160). Perf should then be compatible with 4.19 kernels (only
> partially tested).
> 
> A major obstacle in implementing approach 1 was that the patches for
> linux-tools are not trivial and have to match with the corresponding
> kernel version. Writing that in a way that works for various kernel
> versions was something I was not able to accomplish.
> Hence, I decided that it might be better to avoid that much
> complexity in the kernel receipt. Most users might not need the tools
> anyways, but probably a custom kernel.
> 
> Finally, this patch also builds the kernel specific python bindings
> of perf. This patch has already been sent upstream, but is not yet
> integrated in Debian. For reference, see here:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860957
> 
> Best regards,
> Felix Mößbauer
> 
> Felix Moessbauer (1):
>   RFC: Package perf from linux kernel tools
> 
>  .../recipes-kernel/linux-perf/files/rules     |  53 ++++++++
>  .../linux-perf/files/tools-perf-install.patch |  58 +++++++++
>  .../linux-perf/files/tools-perf-python.patch  |  55 ++++++++
>  .../linux-perf/files/tools-perf-version.patch | 119
> ++++++++++++++++++ .../linux-perf/linux-perf-4.19_4.19.160.bb    |
> 11 ++ .../recipes-kernel/linux-perf/linux-perf.inc  |  46 +++++++
>  6 files changed, 342 insertions(+)
>  create mode 100644 meta-isar/recipes-kernel/linux-perf/files/rules
>  create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-install.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-python.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/files/tools-perf-version.patch
> create mode 100644
> meta-isar/recipes-kernel/linux-perf/linux-perf-4.19_4.19.160.bb
> create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf.inc
>