Files
nixpkgs/pkgs/os-specific/linux/kernel/perf
Sergei Trofimovich 410d15e156 linuxPackages_latest.perf: add -O1 workaround for gcc-13
Without the change `perf top` just crashes early as:

    $ perf top
    perf: Segmentation fault
    -------- backtrace --------
    /<<NIX>>/perf-linux-6.7.4/bin/perf[0x627382]
    /<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x3deb0)[0x7f423a054eb0]
    /<<NIX>>/perf-linux-6.7.4/bin/perf(__dsos__findnew_link_by_longname_id+0x34b)[0x53655b]
    /<<NIX>>/perf-linux-6.7.4/bin/perf(map__new+0x35f)[0x55884f]
    /<<NIX>>/perf-linux-6.7.4/bin/perf(machine__process_mmap2_event+0xb7)[0x557b27]
    /<<NIX>>/perf-linux-6.7.4/bin/perf(perf_tool__process_synth_event+0x7e)[0x59e86e]
    /<<NIX>>/perf-linux-6.7.4/bin/perf(perf_event__synthesize_mmap_events+0x370)[0x59f0e0]
    /<<NIX>>/perf-linux-6.7.4/bin/perf[0x59fd5c]
    /<<NIX>>/perf-linux-6.7.4/bin/perf[0x59ffcc]
    /<<NIX>>/perf-linux-6.7.4/bin/perf[0x5a0093]
    /<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x8b333)[0x7f423a0a2333]
    /<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x10defc)[0x7f423a124efc]

It's a known `gcc-12+` bug not yet fixed in `gcc-13`: https://gcc.gnu.org/PR111009

Let's demote optimizations from `-O2` down to `-O1` to disable any
VRP-related effects for affected `gcc-13`.
2024-02-08 20:52:44 +00:00
..