]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
perf probe: Fix to show function entry line as probe-able
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 24 Oct 2019 09:12:54 +0000 (18:12 +0900)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:00:31 +0000 (00:00 -0500)
commit59117f7e6d0f470df95ff51e87df3775044f3a83
treed796f298576d129dbe78c82b5b126fb2a57d309b
parent35db8b395cc8bed8182f0dc17d773055ac129afa
perf probe: Fix to show function entry line as probe-able

BugLink: https://bugs.launchpad.net/bugs/1860490
commit 91e2f539eeda26ab00bd03fae8dc434c128c85ed upstream.

Fix die_walk_lines() to list the function entry line correctly.  Since
the dwarf_entrypc() does not return the entry pc if the DIE has only
range attribute, __die_walk_funclines() fails to list the declaration
line (entry line) in that case.

To solve this issue, this introduces die_entrypc() which correctly
returns the entry PC (the first address range) even if the DIE has only
range attribute. With this fix die_walk_lines() shows the function entry
line is able to probe correctly.

Fixes: 4cc9cec636e7 ("perf probe: Introduce lines walker interface")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/157190837419.1859.4619125803596816752.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Backlund <tmb@mageia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/perf/util/dwarf-aux.c
tools/perf/util/dwarf-aux.h