]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
perf probe: Walk function lines in lexical blocks
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 24 Oct 2019 09:12:45 +0000 (18:12 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 14:16:13 +0000 (08:16 -0600)
commit2df72ce3ac17ae00aae9ae1d3d5e4b8710122d06
treeb9f83005d41b28105f806e0ada8b1625420592c6
parent5b4d83e50b6a4ace27a7748ad913d3ff1f82a345
perf probe: Walk function lines in lexical blocks

BugLink: https://bugs.launchpad.net/bugs/1858428
[ Upstream commit acb6a7047ac2146b723fef69ee1ab6b7143546bf ]

Since some inlined functions are in lexical blocks of given function, we
have to recursively walk through the DIE tree.  Without this fix,
perf-probe -L can miss the inlined functions which is in a lexical block
(like if (..) { func() } case.)

However, even though, to walk the lines in a given function, we don't
need to follow the children DIE of inlined functions because those do
not have any lines in the specified function.

We need to walk though whole trees only if we walk all lines in a given
file, because an inlined function can include another inlined function
in the same file.

Fixes: b0e9cb2802d4 ("perf probe: Fix to search nested inlined functions in CU")
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/157190836514.1859.15996864849678136353.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
tools/perf/util/dwarf-aux.c