1. 04 9月, 2015 2 次提交
  2. 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
  3. 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
  4. 21 7月, 2015 2 次提交
  5. 20 7月, 2015 1 次提交
  6. 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
  7. 18 6月, 2015 2 次提交
    • M
      perf probe: Speed up perf probe --list by caching debuginfo · 7737af01
      Masami Hiramatsu 提交于
      Speed up the "perf probe --list" by caching the last used debuginfo.
      perf probe --list always open and load debuginfo for each entry of probe
      list. This takes very a long time.
      
      E.g. with vfs_* events (total 96 probes)
      
        [root@localhost perf]# time  ./perf probe -l &> /dev/null
      
        real    0m25.376s
        user    0m24.381s
        sys     0m1.012s
      
      To solve this issue, this adds debuginfo_cache to cache the
      last used debuginfo on memory.
      
      With this fix, the perf-probe --list significantly improves
      its speed.
      
        [root@localhost perf]#  time  ./perf probe -l &> /dev/null
      
        real    0m0.161s
        user    0m0.136s
        sys     0m0.025s
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150617145854.19715.15314.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7737af01
    • M
      perf probe: Show usage even if the last event is skipped · d350bd57
      Masami Hiramatsu 提交于
      When the last part of converted events are blacklisted or out-of-text,
      those are skipped and perf probe doesn't show usage examples.  This
      fixes it to show the example even if the last part of event list is
      skipped.
      
      E.g. without this patch, events are added, but suddenly end:
      
        # perf probe vfs_*
        vfs_caches_init_early is out of .text, skip it.
        vfs_caches_init is out of .text, skip it.
        Added new events:
          probe:vfs_fallocate  (on vfs_*)
          probe:vfs_open       (on vfs_*)
        ...
          probe:vfs_dentry_acceptable (on vfs_*)
          probe:vfs_load_quota_inode (on vfs_*)
        #
      
      With this fix:
      
        # perf probe vfs_*
        vfs_caches_init_early is out of .text, skip it.
        vfs_caches_init is out of .text, skip it.
        Added new events:
          probe:vfs_fallocate  (on vfs_*)
        ...
          probe:vfs_load_quota_inode (on vfs_*)
      
        You can now use it in all perf tools, such as:
      
      	perf record -e probe:vfs_load_quota_inode -aR sleep 1
      
      Note that this can be reproduced ONLY IF the vfs_caches_init* is the
      last part of matched symbol list. I've checked this happens on
      "3.19.0-generic #18-Ubuntu" kernel binary.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150616115057.19906.5502.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d350bd57
  8. 16 6月, 2015 2 次提交
  9. 13 6月, 2015 1 次提交
    • M
      perf probe: Cut off the gcc optimization postfixes from function name · 35a23ff9
      Masami Hiramatsu 提交于
      Cut off the postfixes which gcc added for optimized routines from the
      event name automatically generated from symbol name, since *probe-events
      doesn't accept it.  Those symbols will be used if we don't use debuginfo
      to find target functions.
      
      E.g. without this fix;
        -----
        # perf probe -va alloc_buf.isra.23
        probe-definition(0): alloc_buf.isra.23
        symbol:alloc_buf.isra.23 file:(null) line:0 offset:0 return:0 lazy:(null)
        [...]
        Opening /sys/kernel/debug/tracing/kprobe_events write=1
        Added new event:
        Writing event: p:probe/alloc_buf.isra.23 _text+4869328
        Failed to write event: Invalid argument
          Error: Failed to add events. Reason: Invalid argument (Code: -22)
        -----
      With this fix;
        -----
        perf probe -va alloc_buf.isra.23
        probe-definition(0): alloc_buf.isra.23
        symbol:alloc_buf.isra.23 file:(null) line:0 offset:0 return:0 lazy:(null)
        [...]
        Opening /sys/kernel/debug/tracing/kprobe_events write=1
        Added new event:
        Writing event: p:probe/alloc_buf _text+4869328
          probe:alloc_buf      (on alloc_buf.isra.23)
      
        You can now use it in all perf tools, such as:
      
        	perf record -e probe:alloc_buf -aR sleep 1
      
        -----
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150612050820.20548.41625.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      35a23ff9
  10. 08 6月, 2015 1 次提交
    • A
      perf machine: Fix up some more method names · 9f2de315
      Arnaldo Carvalho de Melo 提交于
      Calling the function 'machine__new_module' implies a new 'module' will
      be allocated, when in fact what is returned is a 'struct map' instance,
      that not necessarily will be instantiated, as if one already exists with
      the given module name, it will be returned instead.
      
      So be consistent with other "find and if not there, create" like
      functions, like machine__findnew_thread, machine__findnew_dso, etc, and
      rename it to machine__findnew_module_map(), that in turn will call
      machine__findnew_module_dso().
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/tip-acv830vd3hwww2ih5vjtbmu3@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9f2de315
  11. 30 5月, 2015 1 次提交
    • W
      perf probe: Fix segfault when glob matching function without debuginfo · 6bb536cc
      Wang Nan 提交于
      Commit 4c859351 ("perf probe: Support
      glob wildcards for function name") introduces segfault problems when
      debuginfo is not available:
      
       # perf probe 'sys_w*'
        Added new events:
        Segmentation fault
      
      The first problem resides in find_probe_trace_events_from_map(). In
      that function, find_probe_functions() is called to match each symbol
      against glob to find the number of matching functions, but still use
      map__for_each_symbol_by_name() to find 'struct symbol' for matching
      functions. Unfortunately, map__for_each_symbol_by_name() does
      exact matching by searching in an rbtree.
      
      It doesn't know glob matching, and not easy for it to support it because
      it use rbtree based binary search, but we are unable to ensure all names
      matched by the glob (any glob passed by user) reside in one subtree.
      
      This patch drops map__for_each_symbol_by_name(). Since there is no
      rbtree again, re-matching all symbols costs a lot. This patch avoid it
      by saving all matching results into an array (syms).
      
      The second problem is the lost of tp->realname. In
      __add_probe_trace_events(), if pev->point.function is glob, the event
      name should be set to tev->point.realname. This patch ensures its
      existence by strdup sym->name instead of leaving a NULL pointer there.
      
      After this patch:
      
       # perf probe 'sys_w*'
       Added new events:
         probe:sys_waitid     (on sys_w*)
         probe:sys_wait4      (on sys_w*)
         probe:sys_waitpid    (on sys_w*)
         probe:sys_write      (on sys_w*)
         probe:sys_writev     (on sys_w*)
      
       You can now use it in all perf tools, such as:
      
               perf record -e probe:sys_writev -aR sleep 1
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Link: http://lkml.kernel.org/r/1432892747-232506-1-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6bb536cc
  12. 29 5月, 2015 2 次提交
  13. 28 5月, 2015 2 次提交
    • A
      perf tools: Reference count struct map · 84c2cafa
      Arnaldo Carvalho de Melo 提交于
      We have pointers to struct map instances in several places, like in the
      hist_entry instances, so we need a way to know when we can destroy them,
      otherwise we may either keep leaking them or end up referencing deleted
      instances.
      
      Start fixing it by reference counting them.
      
      This patch puts the reference count for struct map in place, replacing
      direct map__delete() calls with map__put() ones and then grabbing a
      reference count when adding it to the maps struct where maps for a
      struct thread are kept.
      
      Next we'll grab reference counts when setting pointers to struct map
      instances, in places like in the hist_entry code.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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>
      Link: http://lkml.kernel.org/n/tip-wi19xczk0t2a41r1i2chuio5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      84c2cafa
    • A
      perf tools: Introduce struct maps · 1eee78ae
      Arnaldo Carvalho de Melo 提交于
      That for now has the maps rbtree and the list for the dead maps, that
      may be still referenced from some hist_entry, etc.
      
      This paves the way for protecting the rbtree with a lock, then refcount
      the maps and finally remove the removed_maps list, as it'll not ne
      anymore needed.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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>
      Link: http://lkml.kernel.org/n/tip-fl0fa6142pj8khj97fow3uw0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1eee78ae
  14. 27 5月, 2015 4 次提交
  15. 18 5月, 2015 1 次提交
    • W
      perf probe: Load map before glob matching · 75e4a2a6
      Wang Nan 提交于
      Commit 4c859351 ("perf probe: Support
      glob wildcards for function name") introduces a problem:
      
        # /root/perf probe kmem_cache_free
       Failed to find symbol kmem_cache_free in kernel
         Error: Failed to add events.
      
      The reason is the replacement of map__for_each_symbol_by_name() (by
      map__for_each_symbol()). Although their names are similar,
      map__for_each_symbol doesn't call map__load() and dso__sort_by_name()
      before searching. The missing of map__load() causes this problem because
      it search symbol before load dso map.
      
      This patch ensures map__load() is called before using
      map__for_each_symbol().
      
      After this patch:
      
       # /root/perf probe kmem_cache_free
        Added new event:
          probe:kmem_cache_free (on kmem_cache_free%return)
      
      You can now use it in all perf tools, such as:
      
              perf record -e probe:kmem_cache_free -aR sleep 1
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.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/1431692084-46287-1-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      75e4a2a6
  16. 09 5月, 2015 7 次提交
  17. 06 5月, 2015 1 次提交
  18. 05 5月, 2015 1 次提交
  19. 04 5月, 2015 3 次提交