1. 15 6月, 2016 2 次提交
    • J
      perf mem: Add --ldlat option · b0d745b3
      Jiri Olsa 提交于
      Adding --ldlat option to specify desired latency for loads event.
      
      Specify 50 as loads event latency:
      
        $ perf mem record -e ldlat-loads -v --ldlat 50 true
        calling: record -W -d -e cpu/mem-loads,ldlat=50/P true
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1465928361-2442-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b0d745b3
    • H
      perf unwind: Fix compile error for static cross build · 906a8276
      He Kuang 提交于
      Build failure for static cross-compiling on aarch64, with libunwind-x86
      provided:
      
        $ file ./libunwind_for_x86_on_aarch64/lib/libunwind-x86.so.8.0.1
      
        libunwind-x86.so.8.0.1: ELF 64-bit LSB shared object, ARM aarch64,
        version 1 (SYSV), dynamically linked, not stripped
      
        $ make LDFLAGS=-static LIBUNWIND_DIR=./libunwind_for_x86_on_aarch64
        ARCH=aarch64 CROSS_COMPILE=aarch64-buildroot-linux-gnu-
      
        ~/libperf.a(libperf-in.o): In function `find_proc_info':
        :(.text+0xae4ac): undefined reference to `_Ux86_dwarf_search_unwind_table'
        ~/libperf.a(libperf-in.o): In function `_unwind__prepare_access':
        :(.text+0xaedd0): undefined reference to `_Ux86_create_addr_space'
        :(.text+0xaee24): undefined reference to `_Ux86_set_caching_policy'
        ~/libperf.a(libperf-in.o): In function `_unwind__flush_access':
        :(.text+0xaee98): undefined reference to `_Ux86_flush_cache'
        ~/libperf.a(libperf-in.o): In function `_unwind__finish_access':
        :(.text+0xaef08): undefined reference to `_Ux86_destroy_addr_space'
        ~/libperf.a(libperf-in.o): In function `get_entries':
        :(.text+0xaf148): undefined reference to `_Ux86_init_remote'
        :(.text+0xaf184): undefined reference to `_Ux86_get_reg'
        :(.text+0xaf1a4): undefined reference to `_Ux86_step'
        collect2: error: ld returned 1 exit status
        Makefile.perf:350: recipe for target '~/perf' failed
        make[1]: *** [~/perf] Error 1
        Makefile:68: recipe for target 'all' failed
        make: *** [all] Error 2
      
      This is because the remote libunwind library detected is not appended to
      EXTLIBS variable, which will be included between 'start-group' and
      'end-group' when linking.
      
      The existing variable LIBUNWIND_LIBS is assigned to libs for local
      unwind, this patch introduces a new variable EXTLIBS_LIBUNWIND for
      storing remote libunwind libraries instead.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@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/r/1465988636-81502-1-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      906a8276
  2. 14 6月, 2016 6 次提交
  3. 08 6月, 2016 5 次提交
    • H
      perf callchain: Support aarch64 cross-platform · 057fbfb2
      He Kuang 提交于
      Support aarch64 cross platform callchain unwind.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1464924803-22214-15-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      057fbfb2
    • H
      perf callchain: Support x86 target platform · 52ffe0ff
      He Kuang 提交于
      Support x86(32-bit) cross platform callchain unwind.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1464924803-22214-14-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      52ffe0ff
    • H
      perf unwind: Introduce flag to separate local/remote unwind compilation · 19473e7b
      He Kuang 提交于
      This is a preparation for including unwind-libunwind-local.c in other
      files for remote libunwind.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1464924803-22214-13-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      19473e7b
    • H
      perf unwind: Change fixed name of libunwind__arch_reg_id to macro · eeb118c5
      He Kuang 提交于
      For local libunwind, it uses the fixed methods to convert register id
      according to the host platform, but in remote libunwind, this convert
      function should be the one for remote architecture. This patch changes
      the fixed name to macro and code for each remote platform can be
      compiled indivadually.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1464924803-22214-12-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eeb118c5
    • H
      perf unwind: Check the target platform before assigning unwind methods · d64ec10e
      He Kuang 提交于
      Currently, 'perf script' uses host unwind methods to parse perf.data
      callchain info without taking the target architecture into account, i.e.
      assuming the perf.data file was generated on the same machine where the
      analysis is being performed. So we get wrong result without any warnings
      when unwinding callchains of x86(32-bit) on x86(64-bit) machine.
      
      This patch adds an extra step that checks the target platform before
      assigning unwind methods. In later patches in this series, we can use
      this info to assign the right unwind methods for supported platforms.
      
      Committer note:
      
      After fixing it to register the local unwinder for live mode tools
      ('perf trace', 'perf top'), i.e. tools that don't use a perf.data file,
      it works as intended and passes the 'perf test unwind' test:
      
        # perf trace -e nanosleep --call dwarf usleep 1
           0.328 ( 0.058 ms): usleep/11115 nanosleep(rqtp: 0x7fff083fa480) = 0
                                             __nanosleep_nocancel+0x7 (/usr/lib64/libc-2.22.so)
                                             usleep+0x34 (/usr/lib64/libc-2.22.so)
                                             main+0x1eb (/usr/bin/usleep)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             _start+0x29 (/usr/bin/usleep)
        # perf test 48
        48: Test dwarf unwind         : Ok
        #
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1464924803-22214-11-git-send-email-hekuang@huawei.com
      [ Fixed exit path for 'live' mode tools, where we need to default to local unwinding ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d64ec10e
  4. 07 6月, 2016 26 次提交
  5. 06 6月, 2016 1 次提交