1. 13 7月, 2016 2 次提交
    • A
      perf tools: Add feature detection for gelf_getnote() · 1c1a3a47
      Arnaldo Carvalho de Melo 提交于
      That is not present on some libelf implementations, such as the one used
      in Alpine Linux: libelf-0.8.13.
      
      This ends up disabling the SDT code, that relies on this function.
      
      One alternative would be to provide an weak fallback implementation or
      the open coded variant used by the buildid sysfs notes reading code.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-82lh22ybedy9b9lych8xj12g@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1c1a3a47
    • A
      tools: Introduce str_error_r() · c8b5f2c9
      Arnaldo Carvalho de Melo 提交于
      The tools so far have been using the strerror_r() GNU variant, that
      returns a string, be it the buffer passed or something else.
      
      But that, besides being tricky in cases where we expect that the
      function using strerror_r() returns the error formatted in a provided
      buffer (we have to check if it returned something else and copy that
      instead), breaks the build on systems not using glibc, like Alpine
      Linux, where musl libc is used.
      
      So, introduce yet another wrapper, str_error_r(), that has the GNU
      interface, but uses the portable XSI variant of strerror_r(), so that
      users rest asured that the provided buffer is used and it is what is
      returned.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c8b5f2c9
  2. 05 7月, 2016 1 次提交
    • M
      perf buildid-cache: Scan and import user SDT events to probe cache · 6430a94e
      Masami Hiramatsu 提交于
      perf buildid-cache --add <binary> scans given binary and add
      the SDT events to probe cache. "sdt_" prefix is appended for
      all SDT providers to avoid event-name clash with other pre-defined
      events. It is possible to use the cached SDT events as other cached
      events, via perf probe --add "sdt_<provider>:<event>=<event>".
      
      e.g.
        ----
        # perf buildid-cache --add /lib/libc-2.17.so
        # perf probe --cache --list | head -n 5
        /usr/lib/libc-2.17.so (a6fb821bdf53660eb2c29f778757aef294d3d392):
        sdt_libc:setjmp=setjmp
        sdt_libc:longjmp=longjmp
        sdt_libc:longjmp_target=longjmp_target
        sdt_libc:memory_heap_new=memory_heap_new
        # perf probe -x /usr/lib/libc-2.17.so \
          -a sdt_libc:memory_heap_new=memory_heap_new
        Added new event:
          sdt_libc:memory_heap_new (on memory_heap_new
         in /usr/lib/libc-2.17.so)
      
        You can now use it in all perf tools, such as:
      
                perf record -e sdt_libc:memory_heap_new -aR sleep 1
      
        # perf probe -l
          sdt_libc:memory_heap_new (on new_heap+183 in /usr/lib/libc-2.17.so)
        ----
      
      Note that SDT event entries in probe-cache file is somewhat different
      from normal cached events. Normal one starts with "#", but SDTs are
      starting with "%".
      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: Brendan Gregg <brendan.d.gregg@gmail.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/146736025058.27797.13043265488541434502.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6430a94e
  3. 01 7月, 2016 3 次提交
  4. 23 6月, 2016 1 次提交
  5. 16 6月, 2016 1 次提交
  6. 27 4月, 2016 1 次提交
  7. 12 11月, 2015 1 次提交
  8. 14 9月, 2015 2 次提交
  9. 04 9月, 2015 2 次提交
  10. 21 7月, 2015 1 次提交