1. 03 6月, 2015 1 次提交
  2. 01 6月, 2015 1 次提交
  3. 30 5月, 2015 2 次提交
    • 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
    • I
      Merge tag 'perf-core-for-mingo' of... · 5c9b9bc6
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        - Make Ctrl-C stop processing on TUI, allowing interrupting the load of big
          perf.data files (Namhyung Kim)
      
        - Fix 'perf annotate' -i option, which is currently ignored (Martin Liška)
      
        - Add ARM64 perf_regs_load to support libunwind and enable testing (Wang Nan)
      
      Infrastructure changes:
      
        - Fix thread ref-counting in db-export (Adrian Hunter)
      
        - Fix compiler warning about may be accessing uninitialized (Arnaldo Carvalho de Melo)
      
        - No need to have two lists for user and kernel DSOs, unify them (Arnaldo Carvalho de Melo)
      
        - Function namespace consistency fixups (Arnaldo Carvalho de Melo)
      
        - Do not fail on missing Build file, fixing the build on MIPS (Jiri Olsa)
      
        - Fix up syscall tests, making those tests pass on ARM64 (Riku Voipio)
      
        - Fix 'function unused' warning in 'perf probe' (Wang Nan)
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5c9b9bc6
  4. 29 5月, 2015 14 次提交
  5. 28 5月, 2015 10 次提交
  6. 27 5月, 2015 12 次提交