I was just reading Ubuntu 24.04 LTS To Enable Frame Pointers By Default For Better Profiling/Debugging - Phoronix today. Is similar functionality possible with NixOS? If so, how? Any pointers?
Yeah this would be a nice thing to have. I recently got hit by this problem when I was trying to debug something with eBPF. eBPF programs can only do frame pointer based unwinding.
We discussed in stdenv nixpkgs channel to enable it, I think there’s no strong opposition.
Note that currently we don’t have debug symbols for a large part of nixpkgs anyway. You would have to rebuild to get them.
At least for the linux kernel, it seems we need to build a custom linux kernel for NixOS as per the manual NixOS 23.11 manual | Nix & NixOS
I am not really familiar with stdenv yet, does the stdenv have similar parameters that we can default to?
Just a note that you need frame pointers but not debug symbols for bpftrace profiling (i.e., having frame pointers even without debug symbols is still very useful).