I have recently moved to NixOS and I am unable to get perf probe -L ...
to work.
Eg.
janmejay@jdell:~ » perf --debug verbose probe -k /run/booted-system/kernel -s /home/janmejay/projects/linux -L 'syscall_user_dispatch' 1 ↵
Use vmlinux: /run/booted-system/kernel
Problems creating module maps, continuing anyway...
symsrc__init: cannot get elf header.
Failed to find debuginfo in debuginfod.
Failed to find the path for the kernel: Invalid ELF file
Error: Failed to show lines. Reason: No such file or directory (Code: -2)
janmejay@jdell:~ » 254 ↵
I have the debug-info enabled
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelPatches = [{
name = "dev-config";
patch = null;
extraConfig = ''
DEBUG_INFO y
GDB_SCRIPTS y
FUNCTION_ERROR_INJECTION y
FAULT_INJECTION y
FAULT_INJECTION_DEBUG_FS y
FAIL_FUNCTION y
'';
}];
};
I guess the kernel-binary is the same size it was before I enabled debug symbols, so it seems something stripped them away.
What is the right way of setting up the kernel with debug-symbols?