[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d71d994-9fa1-9d99-b045-751f8a48c51a@mageia.org>
Date: Sun, 29 Dec 2019 20:32:16 +0200
From: Thomas Backlund <tmb@...eia.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>
CC: <stable@...r.kernel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.4 248/434] perf probe: Fix to probe an inline function
which has no entry pc
Den 29-12-2019 kl. 19:25, skrev Greg Kroah-Hartman:
> From: Masami Hiramatsu <mhiramat@...nel.org>
>
> [ Upstream commit eb6933b29d20bf2c3053883d409a53f462c1a3ac ]
>
> Fix perf probe to probe an inlne function which has no entry pc
> or low pc but only has ranges attribute.
>
> This seems very rare case, but I could find a few examples, as
> same as probe_point_search_cb(), use die_entrypc() to get the
> entry address in probe_point_inline_cb() too.
>
> Without this patch:
>
> # perf probe -D __amd_put_nb_event_constraints
> Failed to get entry address of __amd_put_nb_event_constraints.
> Probe point '__amd_put_nb_event_constraints' not found.
> Error: Failed to add events.
>
> With this patch:
>
> # perf probe -D __amd_put_nb_event_constraints
> p:probe/__amd_put_nb_event_constraints amd_put_event_constraints+43
>
> Committer testing:
>
> Before:
>
> [root@...co ~]# perf probe -D __amd_put_nb_event_constraints
> Failed to get entry address of __amd_put_nb_event_constraints.
> Probe point '__amd_put_nb_event_constraints' not found.
> Error: Failed to add events.
> [root@...co ~]#
>
> After:
>
> [root@...co ~]# perf probe -D __amd_put_nb_event_constraints
> p:probe/__amd_put_nb_event_constraints _text+33789
> [root@...co ~]#
>
> Fixes: 4ea42b181434 ("perf: Add perf probe subcommand, a kprobe-event setup helper")
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Link: http://lore.kernel.org/lkml/157199320336.8075.16189530425277588587.stgit@devnote2
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> tools/perf/util/probe-finder.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 7c8d30fb2b99..7857ae7a10b7 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -942,7 +942,7 @@ static int probe_point_inline_cb(Dwarf_Die *in_die, void *data)
> ret = find_probe_point_lazy(in_die, pf);
> else {
> /* Get probe address */
> - if (dwarf_entrypc(in_die, &addr) != 0) {
> + if (die_entrypc(in_die, &addr) != 0) {
> pr_warning("Failed to get entry address of %s.\n",
> dwarf_diename(in_die));
> return -ENOENT;
>
Still broken...
/usr/bin/ld: perf-in.o: in function `probe_point_inline_cb':
/work/rpmbuild/BUILD/kernel-x86_64/linux-5.4/tools/perf/util/probe-finder.c:960:
undefined reference to `die_entrypc'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile.perf:609: perf] Error 1
--
Thomas
Powered by blists - more mailing lists