1. 22 6月, 2016 1 次提交
  2. 16 6月, 2016 1 次提交
  3. 14 6月, 2016 3 次提交
  4. 10 5月, 2016 1 次提交
  5. 06 5月, 2016 1 次提交
  6. 28 4月, 2016 1 次提交
  7. 27 4月, 2016 3 次提交
    • R
      perf probe: Fix module probe issue if no dwarf support · c61fb959
      Ravi Bangoria 提交于
      Perf is not able to register probe in kernel module when dwarf supprt
      is not there(and so it goes for symtab). Perf passes full path of
      module where only module name is required which is causing the problem.
      This patch fixes this issue.
      
      Before applying patch:
      
        $ dpkg -s libdw-dev
        dpkg-query: package 'libdw-dev' is not installed and no information is...
      
        $ sudo ./perf probe -m /linux/samples/kprobes/kprobe_example.ko kprobe_init
        Added new event:
          probe:kprobe_init (on kprobe_init in /linux/samples/kprobes/kprobe_example.ko)
      
        You can now use it in all perf tools, such as:
      
        perf record -e probe:kprobe_init -aR sleep 1
      
        $ sudo cat /sys/kernel/debug/tracing/kprobe_events
        p:probe/kprobe_init /linux/samples/kprobes/kprobe_example.ko:kprobe_init
      
        $ sudo ./perf record -a -e probe:kprobe_init
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.105 MB perf.data ]
      
        $ sudo ./perf script 	# No output here
      
      After applying patch:
      
        $ sudo ./perf probe -m /linux/samples/kprobes/kprobe_example.ko kprobe_init
        Added new event:
          probe:kprobe_init    (on kprobe_init in kprobe_example)
      
        You can now use it in all perf tools, such as:
      
        perf record -e probe:kprobe_init -aR sleep 1
      
        $ sudo cat /sys/kernel/debug/tracing/kprobe_events
        p:probe/kprobe_init kprobe_example:kprobe_init
      
        $ sudo ./perf record -a -e probe:kprobe_init
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.105 MB perf.data (2 samples) ]
      
        $ sudo ./perf script
        insmod 13990 [002]  5961.216833: probe:kprobe_init: ...
        insmod 13995 [002]  5962.889384: probe:kprobe_init: ...
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1461680741-12517-1-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c61fb959
    • R
      perf probe: Fix offline module name missmatch issue · 63a29613
      Ravi Bangoria 提交于
      Perf can add a probe on kernel module which has not been loaded yet.
      
      The current implementation finds the module name from path. But if the
      filename is different from the actual module name then perf fails to
      register a probe while loading module because of mismatch in the names.
      
      For example, samples/kobject/kobject-example.ko is loaded as
      kobject_example.
      
      Before applying patch:
      
        $ sudo ./perf probe -m /linux/samples/kobject/kobject-example.ko foo_show
          Added new event:
            probe:foo_show       (on foo_show in kobject-example)
      
          You can now use it in all perf tools, such as:
      
          perf record -e probe:foo_show -aR sleep 1
      
        $ cat /sys/kernel/debug/tracing/kprobe_events
          p:probe/foo_show kobject-example:foo_show
      
        $ insmod kobject-example.ko
      
        $ lsmod
          Module                  Size  Used by
          kobject_example        16384  0
      
        Generate read to /sys/kernel/kobject_example/foo while recording data
        with below command
        $ sudo ./perf record -e probe:foo_show -a
          [ perf record: Woken up 1 times to write data ]
          [ perf record: Captured and wrote 0.093 MB perf.data ]
      
        $./perf report --stdio -F overhead,comm,dso,sym
          Error:
          The perf.data.old file has no samples!
      
      After applying patch:
      
        $ sudo ./perf probe -m /linux/samples/kobject/kobject-example.ko foo_show
          Added new event:
            probe:foo_show       (on foo_show in kobject_example)
      
          You can now use it in all perf tools, such as:
      
          perf record -e probe:foo_show -aR sleep 1
      
        $ sudo cat /sys/kernel/debug/tracing/kprobe_events
          p:probe/foo_show kobject_example:foo_show
      
        $ insmod kobject-example.ko
      
        $ lsmod
          Module                  Size  Used by
          kobject_example        16384  0
      
        Generate read to /sys/kernel/kobject_example/foo while recording data
        with below command
        $ sudo ./perf record -e probe:foo_show -a
          [ perf record: Woken up 1 times to write data ]
          [ perf record: Captured and wrote 0.097 MB perf.data (8 samples) ]
      
        $ sudo ./perf report  --stdio -F overhead,comm,dso,sym
          ...
          # Samples: 8  of event 'probe:foo_show'
          # Event count (approx.): 8
          #
          # Overhead  Command  Shared Object      Symbol
          # ........  .......  .................  ............
          #
             100.00%  cat      [kobject_example]  [k] foo_show
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1461680741-12517-2-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      63a29613
    • M
      perf probe: Set default kprobe group name if it is not given · 2a12ec13
      Masami Hiramatsu 提交于
      Set kprobe group name as "probe" if it is not given.
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20160426090413.11891.95640.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2a12ec13
  8. 26 4月, 2016 1 次提交
  9. 24 3月, 2016 1 次提交
  10. 19 11月, 2015 1 次提交
    • W
      perf bpf: Allow BPF program config probing options · 03e01f56
      Wang Nan 提交于
      By extending the syntax of BPF object section names, this patch allows users to
      config probing options like what they can do in 'perf probe'.
      
      The error message in 'perf probe' is also updated.
      
      Test result:
      
      For following BPF file test_probe_glob.c:
      
        # cat test_probe_glob.c
        __attribute__((section("inlines=no;func=SyS_dup?"), used))
      
        int func(void *ctx)
        {
      	  return 1;
        }
      
        char _license[] __attribute__((section("license"), used)) = "GPL";
        int _version __attribute__((section("version"), used)) = 0x40300;
        #
        # ./perf record  -e ./test_probe_glob.c ls /
        ...
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.013 MB perf.data ]
        # ./perf evlist
        perf_bpf_probe:func_1
        perf_bpf_probe:func
      
      After changing "inlines=no" to "inlines=yes":
      
        # ./perf record  -e ./test_probe_glob.c ls /
        ...
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 0.013 MB perf.data ]
        # ./perf evlist
        perf_bpf_probe:func_3
        perf_bpf_probe:func_2
        perf_bpf_probe:func_1
        perf_bpf_probe:func
      
      Then test 'force':
      
      Use following program:
      
        # cat test_probe_force.c
        __attribute__((section("func=sys_write"), used))
      
        int funca(void *ctx)
        {
      	  return 1;
        }
      
        __attribute__((section("force=yes;func=sys_write"), used))
      
        int funcb(void *ctx)
        {
        	return 1;
        }
      
        char _license[] __attribute__((section("license"), used)) = "GPL";
        int _version __attribute__((section("version"), used)) = 0x40300;
        #
      
        # perf record -e ./test_probe_force.c usleep 1
        Error: event "func" already exists.
         Hint: Remove existing event by 'perf probe -d'
             or force duplicates by 'perf probe -f'
             or set 'force=yes' in BPF source.
        event syntax error: './test_probe_force.c'
                             \___ Probe point exist. Try 'perf probe -d "*"' and set 'force=yes'
      
        (add -v to see detail)
        ...
      
      Then replace 'force=no' to 'force=yes':
      
        # vim test_probe_force.c
        # perf record -e ./test_probe_force.c usleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.017 MB perf.data ]
        # perf evlist
        perf_bpf_probe:func_1
        perf_bpf_probe:func
        #
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1447675815-166222-7-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      03e01f56
  11. 06 11月, 2015 1 次提交
  12. 05 11月, 2015 1 次提交
  13. 03 10月, 2015 1 次提交
  14. 01 10月, 2015 5 次提交
  15. 25 9月, 2015 1 次提交
    • A
      perf probe: Use existing routine to look for a kernel module by dso->short_name · 266fa2b2
      Arnaldo Carvalho de Melo 提交于
      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: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami 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: 3d39ac53 ("perf machine: No need to have two DSOs lists")
      Link: http://lkml.kernel.org/r/20150924015008.GE1897@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      266fa2b2
  16. 15 9月, 2015 2 次提交
  17. 14 9月, 2015 1 次提交
  18. 04 9月, 2015 4 次提交
  19. 26 8月, 2015 5 次提交
    • W
      perf probe: Support probing at absolute address · da15bd9d
      Wang Nan 提交于
      It should be useful to allow 'perf probe' probe at absolute offset of a
      target. For example, when (u)probing at a instruction of a shared object
      in a embedded system where debuginfo is not avaliable but we know the
      offset of that instruction by manually digging.
      
      This patch enables following perf probe command syntax:
      
        # perf probe 0xffffffff811e6615
      
      And
      
        # perf probe /lib/x86_64-linux-gnu/libc-2.19.so 0xeb860
      
      In the above example, we don't need a anchor symbol, so it is possible
      to compute absolute addresses using other methods and then use 'perf
      probe' to create the probing points.
      
      v1 -> v2:
        Drop the leading '+' in cmdline;
        Allow uprobing at offset 0x0;
        Improve 'perf probe -l' result when uprobe at area without debuginfo.
      
      v2 -> v3:
        Split bugfix to a separated patch.
      
      Test result:
      
        # perf probe 0xffffffff8119d175 %ax
        # perf probe sys_write %ax
        # perf probe /lib64/libc-2.18.so 0x0 %ax
        # perf probe /lib64/libc-2.18.so 0x5 %ax
        # perf probe /lib64/libc-2.18.so 0xd8e40 %ax
        # perf probe /lib64/libc-2.18.so __write %ax
        # perf probe /lib64/libc-2.18.so 0xd8e49 %ax
        # cat /sys/kernel/debug/tracing/uprobe_events
      
        p:probe_libc/abs_0 /lib64/libc-2.18.so:0x          (null) arg1=%ax
        p:probe_libc/abs_5 /lib64/libc-2.18.so:0x0000000000000005 arg1=%ax
        p:probe_libc/abs_d8e40 /lib64/libc-2.18.so:0x00000000000d8e40 arg1=%ax
        p:probe_libc/__write /lib64/libc-2.18.so:0x00000000000d8e40 arg1=%ax
        p:probe_libc/abs_d8e49 /lib64/libc-2.18.so:0x00000000000d8e49 arg1=%ax
      
        # cat /sys/kernel/debug/tracing/kprobe_events
      
        p:probe/abs_ffffffff8119d175 0xffffffff8119d175 arg1=%ax
        p:probe/sys_write _text+1692016 arg1=%ax
      
        # perf probe -l
      
        Failed to find debug information for address 5
          probe:abs_ffffffff8119d175 (on sys_write+5 with arg1)
          probe:sys_write      (on sys_write with arg1)
          probe_libc:__write   (on @unix/syscall-template.S:81 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_0     (on 0x0 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_5     (on 0x5 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_d8e40 (on @unix/syscall-template.S:81 in /lib64/libc-2.18.so with arg1)
          probe_libc:abs_d8e49 (on __GI___libc_write+9 in /lib64/libc-2.18.so with arg1)
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-7-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      da15bd9d
    • W
      perf probe: Fix error reported when offset without function · 6c6e024f
      Wang Nan 提交于
      This patch fixes a bug that, when offset is provided but function is
      lost, parse_perf_probe_point() will give a "" string as function name,
      so the checking code at the end of parse_perf_probe_point() become
      useless.  For example:
      
        # perf probe +0x1234
        Failed to find symbol  in kernel
          Error: Failed to add events.
      
      After this patch:
      
        # perf probe +0x1234
        Semantic error :Offset requires an entry function.
          Error: Command Parse Error.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-6-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6c6e024f
    • W
      perf probe: Fix list result when address is zero · be07afe9
      Wang Nan 提交于
      When manually added uprobe point with zero address, 'perf probe -l'
      reports error. For example:
      
        # echo p:probe_libc/abs_0 /path/to/lib.bin:0x0 arg1=%ax > \
                 /sys/kernel/debug/tracing/uprobe_events
      
        # perf probe -l
        Error: Failed to show event list.
      
      Probing at 0x0 is possible and useful when lib.bin is not a normal
      shared object but is manually mapped. However, in this case kernel
      report:
      
        # cat /sys/kernel/debug/tracing/uprobe_events
        p:probe_libc/abs_0 /path/to/lib.bin:0x          (null) arg1=%ax
      
      This patch supports the above kernel output.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-5-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      be07afe9
    • W
      perf probe: Fix list result when symbol can't be found · 614e2fdb
      Wang Nan 提交于
      'perf probe -l' reports error if it is unable find symbol through
      address. Here is an example.
      
        # echo 'p:probe_libc/abs_5 /lib64/libc.so.6:0x5' >
                /sys/kernel/debug/tracing/uprobe_events
        # cat /sys/kernel/debug/tracing/uprobe_events
         p:probe_libc/abs_5 /lib64/libc.so.6:0x0000000000000005
        # perf probe -l
          Error: Failed to show event list
      
      Also, this situation triggers a logical inconsistency in
      convert_to_perf_probe_point() that, it returns ENOMEM but actually it
      never try strdup().
      
      This patch removes !tp->module && !is_kprobe condition, so it always
      uses address to build function name if symbol not found.
      
      Test result:
      
        # perf probe -l
          probe_libc:abs_5     (on 0x5 in /lib64/libc.so.6)
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440586666-235233-4-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      614e2fdb
    • W
      perf probe: Prevent segfault when reading probe point with absolute address · e486367f
      Wang Nan 提交于
      'perf probe -l' panic if there is a manually inserted probing point with
      absolute address. For example:
      
        # echo 'p:probe/abs_ffffffff811e6615 0xffffffff811e6615' > /sys/kernel/debug/tracing/kprobe_events
        # perf probe -l
        Segmentation fault (core dumped)
      
      This patch fix this problem by considering the situation that
      "tp->symbol == NULL" in find_perf_probe_point_from_dwarf() and
      find_perf_probe_point_from_map().
      
      After this patch:
      
        # perf probe -l
        probe:abs_ffffffff811e6615 (on SyS_write+5@fs/read_write.c)
      
      And when debug info is missing:
      
        # rm -rf ~/.debug
        # mv /lib/modules/4.2.0-rc1+/build/vmlinux /lib/modules/4.2.0-rc1+/build/vmlinux.bak
        # perf probe -l
        probe:abs_ffffffff811e6615 (on sys_write+5)
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440509256-193590-1-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e486367f
  20. 21 8月, 2015 1 次提交
    • W
      perf probe: Try to use symbol table if searching debug info failed · 1c0bd0e8
      Wang Nan 提交于
      A problem can occur in a statically linked perf when vmlinux can be found:
      
       # perf probe --add sys_epoll_pwait
       probe-definition(0): sys_epoll_pwait
       symbol:sys_epoll_pwait file:(null) line:0 offset:0 return:0 lazy:(null)
       0 arguments
       Looking at the vmlinux_path (7 entries long)
       Using /lib/modules/4.2.0-rc1+/build/vmlinux for symbols
       Open Debuginfo file: /lib/modules/4.2.0-rc1+/build/vmlinux
       Try to find probe point from debuginfo.
       Symbol sys_epoll_pwait address found : ffffffff8122bd40
       Matched function: SyS_epoll_pwait
       Failed to get call frame on 0xffffffff8122bd40
       An error occurred in debuginfo analysis (-2).
         Error: Failed to add events. Reason: No such file or directory (Code: -2)
      
      The reason is caused by libdw that, if libdw is statically linked, it
      can't load libebl_{arch}.so reliable.
      
      In this case it is still possible to get the address from
      /proc/kalksyms.  However, perf tries that only when libdw returns
      -EBADF.
      
      This patch gives it another chance to utilize symbol table, even if
      libdw returns an error code other than -EBADF.
      
      After applying this patch:
      
       # perf probe -nv --add sys_epoll_pwait
       probe-definition(0): sys_epoll_pwait
       symbol:sys_epoll_pwait file:(null) line:0 offset:0 return:0 lazy:(null)
       0 arguments
       Looking at the vmlinux_path (7 entries long)
       Using /lib/modules/4.2.0-rc1+/build/vmlinux for symbols
       Open Debuginfo file: /lib/modules/4.2.0-rc1+/build/vmlinux
       Try to find probe point from debuginfo.
       Symbol sys_epoll_pwait address found : ffffffff8122bd40
       Matched function: SyS_epoll_pwait
       Failed to get call frame on 0xffffffff8122bd40
       An error occurred in debuginfo analysis (-2).
       Trying to use symbols.
       Opening /sys/kernel/debug/tracing/kprobe_events write=1
       Added new event:
       Writing event: p:probe/sys_epoll_pwait _text+2276672
         probe:sys_epoll_pwait (on sys_epoll_pwait)
      
       You can now use it in all perf tools, such as:
      
       	perf record -e probe:sys_epoll_pwait -aR sleep 1
      
      Although libdw returns an error (Failed to get call frame), perf tries
      symbol table and finally gets correct address.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kaixu Xia <xiakaixu@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440151770-129878-2-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1c0bd0e8
  21. 21 7月, 2015 2 次提交
  22. 20 7月, 2015 1 次提交
  23. 24 6月, 2015 1 次提交
    • H
      perf probe: Fix failure to probe events on arm · 7c31bb8c
      He Kuang 提交于
      Fix failure to probe events on arm, the problem was introduced by commit
      5a51fcd1 ("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: NHe Kuang <hekuang@huawei.com>
      Acked-by: NMasami 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7c31bb8c