[Unstable][PATCH 0/2] python perf module missing in realtime kernel (LP: #2089411)

Juerg Haefliger juerg.haefliger at canonical.com
Thu Nov 28 09:42:59 UTC 2024


BugLink: https://bugs.launchpad.net/bugs/2089411

[Impact]

ubuntu at ubuntu-plucky:~$ python3 -c 'import perf; [print(c) for c in perf.cpu_map()]'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/perf/__init__.py", line 24, in <module>
    raise KernelNotFoundError()
perf.KernelNotFoundError: WARNING: python perf module not found for kernel 6.12.0-4-generic

You may need to install the following packages for this specific kernel:
  linux-tools-6.12.0-4-generic-generic
You may also want to install of the following package to keep up to date:
  linux-tools-generic

This works only with the main generic kernel but not with any of the derivatives.
Packaging is broken and the perf python modules is looking in the wrong place for the library.

[Test Plan]

Run:
$ python3 -c 'import perf; [print(c) for c in perf.cpu_map()]'
$ perf

The above must not result in errors.

[Where Problems Could Occur]

Potential issues when using the perf python module or any scripts/binaries provided by the linux-tools packages.


Juerg Haefliger (2):
  UBUNTU: [Packaging] linux-tools: Link directories rather than
    individual files
  UBUNTU: [Packaging] linux-tools: Fix python perf library packaging

 debian/rules.d/2-binary-arch.mk  | 46 ++++++--------------------------
 debian/rules.d/3-binary-indep.mk |  2 +-
 debian/tools/python-perf.py      | 27 +++++++++----------
 3 files changed, 22 insertions(+), 53 deletions(-)

-- 
2.43.0




More information about the kernel-team mailing list