When trying to add a probe point for systemd (with systemd-debuginfo installed), perf returns an error: A function DIE doesn't have decl_line. Maybe broken DWARF? The problem comes down to kernel commit dc9a5d2ccd5c ("perf probe: Fix to get declared file name from clang DWARF5") I tried to report and patch the issue directly on LKML, but I got no response so far: https://lore.kernel.org/all/5a00d5a5-7be7-ef8a-4044-9a16249fff25@gmx.net/ Reproducible: Always Steps to Reproduce: 1. install systemd and systemd-debuginfo 2. run 'sudo perf probe -x /usr/lib/systemd/systemd-logind match_unit_removed' Actual Results: perf probe returns an error with the following output: A function DIE doesn't have decl_line. Maybe broken DWARF? A function DIE doesn't have decl_line. Maybe broken DWARF? Probe point 'match_unit_removed' not found. Error: Failed to add events. Expected Results: With the patch applied, perf probe returns the following output: Added new event: probe_systemd:match_unit_removed (on match_unit_removed in /usr/lib/systemd/systemd-logind) You can now use it in all perf tools, such as: perf record -e probe_systemd:match_unit_removed -aR sleep 1 The patch is inspired by a patch to elfutils: https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=e1db5cdc9f230f8de4df1a0f38dca69b283ee57a Full information is available in the upstream email: https://lore.kernel.org/lkml/20230628084551.1860532-3-georgmueller@gmx.net/