linux/tools
He Kuang 7c31bb8c95 perf probe: Fix failure to probe events on arm
Fix failure to probe events on arm, the problem was introduced by commit
5a51fcd1f3 ("perf probe: Skip kernel symbols which is out of .text").

For some architectures, the '_etext' label is not in the .text section
(in the .notes section for arm/arm64).  Labels out of the .text section
are not loaded as symbols and we get a zero value when looking up its
addresses, which causes all events to be wrongly skipped.

This patch skips checking the text address range when failing to get the
address of '_etext' and thus fixes the problem.

The problem can be reproduced on arm as follows:

  # perf probe --add='generic_perform_write'
  generic_perform_write+0 is out of .text, skip it.
  Probe point 'generic_perform_write' not found.
    Error: Failed to add events.

After this patch:

  # perf probe --add='generic_perform_write'
  Added new event:
    probe:generic_perform_write (on generic_perform_write)

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

    perf record -e probe:generic_perform_write -aR sleep 1

Signed-off-by: He Kuang <hekuang@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1434595750-129791-1-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-06-23 18:21:44 -03:00
..
arch tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
build perf build: Do not fail on missing Build file 2015-05-29 12:44:25 -03:00
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv hv: hypervvssd: call endmntent before call setmntent again 2015-03-25 11:53:54 +01:00
iio tools: iio: generic_buffer: Fix generic scale extraction 2015-03-28 11:01:49 +00:00
include tools: Move tools/perf/util/include/linux/{list.h,poison.h} to tools/include 2015-06-02 19:07:29 -03:00
lguest tools/lguest: don't use legacy definitions for net device in example launcher. 2015-02-13 17:15:55 +10:30
lib tools lib traceevent: Ignore libtrace-dynamic-list file 2015-06-08 10:30:32 -03:00
net tools: bpf_asm: cleanup vlan extension related token 2015-03-24 21:21:41 -04:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf perf probe: Fix failure to probe events on arm 2015-06-23 18:21:44 -03:00
power More power management and ACPI updates for v4.1-rc1 2015-04-26 13:56:35 -07:00
scripts tools lib traceevent: Add global QUIET_CC_FPIC build output 2013-12-19 16:18:10 -03:00
testing linux-kselftest-4.1-rc4 2015-05-16 15:03:52 -07:00
thermal/tmon tools/thermal: tmon: fixed the 'make install' command 2015-05-09 13:36:58 +08:00
time tools: add script to test udelay 2014-07-23 10:16:38 -07:00
usb tools: ffs-aio-example: use endpoint addresses from descriptors 2015-01-15 09:41:49 -06:00
virtio tools/virtio: add virtio 1.0 in vringh_test 2014-12-15 23:49:22 +02:00
vm tools: Fix tools/vm build 2015-05-12 18:11:06 -03:00
Makefile tools build: Fix Makefile(s) to properly invoke tools build 2015-04-29 10:37:46 -03:00