Arnaldo Carvalho de Melo 266fa2b222 perf probe: Use existing routine to look for a kernel module by dso->short_name
We have map_groups__find_by_name() to look at the list of modules that
are in place for a given machine, so use it instead of traversing the
machine dso list, which also includes DSOs for userspace.

When merging the user and kernel DSO lists a bug was introduced where
'perf probe' stopped being able to add probes to modules using its short
name:

  # perf probe -m usbnet --add usbnet_start_xmit
  usbnet_start_xmit is out of .text, skip it.
    Error: Failed to add events.
  #

With this fix it works again:

  # perf probe -m usbnet --add usbnet_start_xmit
  Added new event:
    probe:usbnet_start_xmit (on usbnet_start_xmit in usbnet)

  You can now use it in all perf tools, such as:

  	perf record -e probe:usbnet_start_xmit -aR sleep 1
  #

Reported-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Fixes: 3d39ac538629 ("perf machine: No need to have two DSOs lists")
Link: http://lkml.kernel.org/r/20150924015008.GE1897@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-25 10:41:31 -03:00
..
2013-12-27 15:17:00 -03:00
2015-08-21 11:34:10 -03:00
2015-08-21 11:34:10 -03:00
2015-05-27 12:21:43 -03:00
2015-08-06 15:30:38 -03:00
2015-08-06 15:30:38 -03:00
2015-06-08 10:31:40 -03:00
2015-09-15 10:41:13 -03:00
2015-09-15 10:41:13 -03:00
2015-08-21 11:34:10 -03:00
2015-09-15 10:41:13 -03:00
2015-08-21 11:34:10 -03:00
2015-08-06 16:49:01 -03:00
2015-05-05 18:13:22 -03:00
2015-05-05 18:13:22 -03:00
2014-07-10 00:22:54 +02:00
2015-07-21 07:58:06 +02:00
2014-05-01 21:22:39 +02:00
2014-07-23 11:48:11 -03:00
2014-07-23 11:48:11 -03:00
2014-05-01 21:22:39 +02:00
2015-05-29 12:43:44 -03:00