Re: [PATCH v2 3/3] tools/perf: Fix to get declared file name from clang DWARF5

From: Linux regression tracking #adding (Thorsten Leemhuis)
Date: Thu Jun 15 2023 - 08:05:40 EST


[CCing the regression list, as it should be in the loop for regressions:
https://docs.kernel.org/admin-guide/reporting-regressions.html]

[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]

On 09.06.23 14:21, Georg Müller wrote:
>
> Am 01.11.22 um 14:48 schrieb Masami Hiramatsu (Google):
>> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>>
>> Fix to get the declared file name even if it uses file index 0
>> in DWARF5, using custom die_get_decl_file() function.
>>
>
> this patch breaks perf probe on fedora 38.
>
> I was trying to a add a probe to systemd-logind using
> kernel-6.3.6-200.fc38.x86_64 with kernel-tools-6.3.3-200.fc38.x86_64.
>
> When trying to add a probe, I get the following message:
>
> # perf probe -x /usr/lib/systemd/systemd-logind
> --funcs="match_unit_removed"
> match_unit_removed
>
> Function exists and was found:
>
> # perf probe -x /usr/lib/systemd/systemd-logind match_unit_removed
> 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.
>
> When reverting dc9a5d2ccd5c823cc05cafe75fcf19b682d8152c, I was able to
> add the probe point:
>
> # ./perf probe -x /usr/lib/systemd/systemd-logind match_unit_removed
> 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
>
>
> Probe point is then visible with and without this commit:
>
> # perf probe -l
>   probe_systemd:match_unit_removed (on match_unit_removed in
> /usr/lib/systemd/systemd-logind)
> # ./perf probe -l
>   probe_systemd:match_unit_removed (on
> match_unit_removed@../src/login/logind-dbus.c in
> /usr/lib/systemd/systemd-logind)

Thanks for the report. To be sure the issue doesn't fall through the
cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression
tracking bot:

#regzbot ^introduced dc9a5d2ccd5c823cc05cafe75fcf19b682d8152c
#regzbot title tools/perf: adding a specific probe suddenly fails
#regzbot ignore-activity

This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.