[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-q4njvk9mshra00jacqjbzfn5@git.kernel.org>
Date: Sat, 9 Mar 2019 11:47:06 -0800
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, mleitner@...hat.com, mingo@...nel.org,
linux-kernel@...r.kernel.org, adrian.hunter@...el.com,
mhiramat@...nel.org, tglx@...utronix.de, jolsa@...nel.org,
hpa@...or.com, namhyung@...nel.org
Subject: [tip:perf/urgent] perf probe: Clarify error message about not
finding kernel modules debuginfo
Commit-ID: 4d6101f5fd5d996060eb59f7a01d3d1f842407c1
Gitweb: https://git.kernel.org/tip/4d6101f5fd5d996060eb59f7a01d3d1f842407c1
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 28 Feb 2019 11:22:45 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 28 Feb 2019 14:20:35 -0300
perf probe: Clarify error message about not finding kernel modules debuginfo
'perf probe' supports using just the kernel module name, but that will
work only when the module is loaded, or using the full pathname to the
file with the DWARF debug info, but the warning was cryptic:
Before:
# perf probe -m cls_flower -L fl_change
Failed to find the path for cls_flower: No such file or directory
Error: Failed to show lines.
#
After:
# perf probe -m cls_flower -L fl_change
Module cls_flower is not loaded, please specify its full path name.
Error: Failed to show lines.
# perf probe -m /lib/modules/5.0.0-rc7+/kernel/net/sched/cls_flower.ko -L fl_change | head -7
<fl_change@...me/acme/git/linux/net/sched/cls_flower.c:0>
0 static int fl_change(struct net *net, struct sk_buff *in_skb,
struct tcf_proto *tp, unsigned long base,
u32 handle, struct nlattr **tca,
void **arg, bool ovr, struct netlink_ext_ack *extack)
4 {
5 struct cls_fl_head *head = rtnl_dereference(tp->root);
#
The behaviour doesn't change when the module is loaded:
# modprobe cls_flower
# perf probe -m cls_flower -L fl_change | head -7
<fl_change@...me/acme/git/linux/net/sched/cls_flower.c:0>
0 static int fl_change(struct net *net, struct sk_buff *in_skb,
struct tcf_proto *tp, unsigned long base,
u32 handle, struct nlattr **tca,
void **arg, bool ovr, struct netlink_ext_ack *extack)
4 {
5 struct cls_fl_head *head = rtnl_dereference(tp->root);
#
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Marcelo Ricardo Leitner <mleitner@...hat.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-q4njvk9mshra00jacqjbzfn5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/probe-event.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 0030f9b9bf7e..a1b8d9649ca7 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -472,9 +472,12 @@ static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
strcpy(reason, "(unknown)");
} else
dso__strerror_load(dso, reason, STRERR_BUFSIZE);
- if (!silent)
- pr_err("Failed to find the path for %s: %s\n",
- module ?: "kernel", reason);
+ if (!silent) {
+ if (module)
+ pr_err("Module %s is not loaded, please specify its full path name.\n", module);
+ else
+ pr_err("Failed to find the path for the kernel: %s\n", reason);
+ }
return NULL;
}
path = dso->long_name;
Powered by blists - more mailing lists