]> git.baikalelectronics.ru Git - kernel.git/commit
perf probe: Clarify error message about not finding kernel modules debuginfo
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 Feb 2019 14:22:45 +0000 (11:22 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 Feb 2019 17:20:35 +0000 (14:20 -0300)
commitc0bcc47c1db5424697d4021c0a4b25838f6e1011
tree999d0cb635f80e843534683a324e172d358a24d7
parentd3ffffb9c7050a9bc3b30bd4afa84dda7ad49a51
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@/home/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@/home/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@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Marcelo Ricardo Leitner <mleitner@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-q4njvk9mshra00jacqjbzfn5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c