Open danielzgtg opened 3 years ago
Yeah, the problem with that is that the official Debian/Ubuntu build system for the kernel was a bit too much maintenance work for us (seeing as none of us actually uses a Debian-based distro), so we decided to go with the kernel bindeb-pkg
target and some wrapper packages. And the kernel makefile doesn't have a target for the tools package.
So to implement this we'll need to write a package from scratch I think. I don't have much time for experiments right now, so do you maybe want to have a look at implementing that?
I think this should be implemented in the linux-surface
repo, so that the tools package gets built with/after the kernel package, i.e. integrated into the debian.yml
and debian_lts.yml
workflows. The wrapper packages are generated in this script, so maybe we need something like that for the tools package. Packaging should essentially call the appropriate targets in tools/Makefile (whatever they are) and then package that as linux-tools-surface-kernelversion
as well as generating a wrapper for that.
I really dont know anything about perf and not a lot about debian packaging, but is there any issue with the perf program from linux-tools-generic
? Is it bound to the kernel it was compiled from?
We support installing the surface kernel without removing the default one, and in fact even recommend it, so it should be possible to just use the perf that comes with linux-tools-generic
(unless it is bound to the kernel somehow, again, I dont know).
perf
depends on being matched to the precise kernel version it came from:
$ perf
WARNING: perf not found for kernel 5.11.2
You may need to install the following packages for this specific kernel:
linux-tools-5.11.2-surface
linux-cloud-tools-5.11.2-surface
You may also want to install one of the following packages to keep up to date:
linux-tools-surface
linux-cloud-tools-surface
perf depends on being matched to the precise kernel version it came from:
if I not wrong, the linux tools binary supports <= the version of src that it compiled (idk about this however there may some very lower version that also not able to run); and seem linux-tools-generic of Ubuntu/debians seem to overwrite the file for every update of kernel and its tools.
however I have compile it myself there is something not work on Ubuntu 22.04 LTS. (I have not less and not much building knowledge)
but thats doesn't end well as there are something wrong such as cpupower
which goto /usr/lib64 but the Ubuntu seem not read lib file from that and got libcpupower.so.0: cannot open shared object file: No such file or directory
and after that I just notice that I have break much of system packaging, so recommended to not using make install from that, if you have done maybe reinstall linux tools package from repo, every single package that already in your system (excluded residue config pkg)
I mainly wanted this perf so that I can more easily profile iptsd. But now there is iptsd-perf an iptsd-dump so I think I'll try debugging it on my desktop instead.
It would be nice if a
linux-tools-surface
package was built and published.I am trying to profile one of my programs. On a standard kernel, I can
apt install linux-tools-generic
, but with this kernel, there is nolinux-tools-surface
. That preventsperf
from working and me from profiling my program