1. 29 9月, 2017 2 次提交
  2. 28 8月, 2017 1 次提交
  3. 12 8月, 2017 1 次提交
    • T
      perf report: Fix module symbol adjustment for s390x · 4a084ecf
      Thomas Richter 提交于
      The 'perf report' tool does not display the addresses of kernel module
      symbols correctly.
      
      For example symbol qeth_send_ipa_cmd in kernel module qeth.ko has this
      relative address for function qeth_send_ipa_cmd():
      
        [root@s8360047 linux]# nm -g drivers/s390/net/qeth.ko | fgrep send_ipa_cmd
        0000000000013088 T qeth_send_ipa_cmd
      
      The module is loaded at address:
      
        [root@s8360047 linux]# cat /sys/module/qeth/sections/.text
        0x000003ff80296d20
        [root@s8360047 linux]#
      
      This should result in a start address of:
      
        0x13088 + 0x3ff80296d20 = 0x3ff802a9da8
      
      Using crash to verify the address on a live system:
      
        [root@s8360046 linux]# crash vmlinux
      
        crash 7.1.9++
        Copyright (C) 2002-2016  Red Hat, Inc.
        Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
      
        [...]
      
        crash> mod -s qeth drivers/s390/net/qeth.ko
             MODULE       NAME        SIZE  OBJECT FILE
             3ff8028d700  qeth      151552  drivers/s390/net/qeth.ko
        crash> sym qeth_send_ipa_cmd
        3ff802a9da8 (T) qeth_send_ipa_cmd [qeth] /root/linux/drivers/s390/net/qeth_core_main.c: 2944
        crash>
      
      Now perf report displays the address of symbol qeth_send_ipa_cmd:
      symbol__new:
      
        qeth_send_ipa_cmd 0x130f0-0x132ce
      
      There is a difference of 0x68 between the entry in the symbol table (see
      nm command above) and perf. The difference is from the offset the .text
      segment of qeth.ko:
      
        [root@s8360047 perf]# readelf -a drivers/s390/net/qeth.ko
        Section Headers:
        [Nr] Name              Type             Address           Offset
             Size              EntSize          Flags  Link  Info  Align
        [ 0]                   NULL             0000000000000000  00000000
             0000000000000000  0000000000000000           0     0     0
        [ 1] .note.gnu.build-i NOTE             0000000000000000  00000040
             0000000000000024  0000000000000000   A       0     0     4
        [ 2] .text             PROGBITS         0000000000000000  00000068
             000000000001c8a0  0000000000000000  AX       0     0     8
      
      As seen the .text segment has an offset of 0x68 with start address 0x0.
      Therefore 0x68 is added to the address of qeth_send_ipa_cmd and thus
      0x13088 + 0x68 = 0x130f0 is displayed.
      
      This is wrong, perf report needs to display the start address of symbol
      qeth_send_ipa_cmd at 0x13088 + qeth.ko.text section start address.
      
      The qeth.ko module .text start address is available in the qeth.ko DSO
      map. Just identify the kernel module symbols and correct the addresses.
      
      With the fix I see this correct address for symbol: symbol__new:
      qeth_send_ipa_cmd 0x3ff802a9da8-0x3ff802a9f86
      Signed-off-by: NThomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      Reviewed-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      Cc: Zvonko Kosic <zvonko.kosic@de.ibm.com>
      LPU-Reference: 20170803134902.47207-1-tmricht@linux.vnet.ibm.com
      Link: http://lkml.kernel.org/n/tip-q8lktlpoxb5e3dj52u1s1rw4@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4a084ecf
  4. 11 8月, 2017 1 次提交
  5. 31 7月, 2017 1 次提交
    • I
      perf build: Clarify open-coded header version warning message · 8255e1ef
      Ingo Molnar 提交于
      In this patch we changed the header checks:
      
        perf build: Clarify header version warning message
      
      Unfortunately the header checks were copied to various places and thus the message got
      out of sync. Fix some of them here.
      
      Note that there's still old, misleading messages remaining in:
      
        tools/objtool/Makefile: || echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
        tools/objtool/Makefile: || echo "warning: objtool: orc_types.h differs from kernel" >&2 )) || true
      
      here objtool copied the perf message, plus:
      
       tools/perf/util/intel-pt-decoder/Build: || echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true
      
      here the PT code regressed over the original message and only emits a vague warning
      instead of specific file names...
      
      All of this should be consolidated into tools/Build/ and used in a consistent
      manner.
      Signed-off-by: NIngo Molnar <mingo@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: David Carrillo-Cisneros <davidcc@google.com>
      Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
      Cc: Geneviève Bastien <gbastien@versatic.net>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Julien Desfossez <jdesfossez@efficios.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Turner <pjt@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Simon Que <sque@chromium.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20170730095130.bblldwxjz5hamybb@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8255e1ef
  6. 25 7月, 2017 1 次提交
    • T
      perf report: Fix kernel symbol adjustment for s390x · cf6383f7
      Thomas Richter 提交于
      On s390x the kernel text segment starts at address 0x0.  When perf
      report reads kernel symbols from vmlinux file it adds an offset of
      0x1000.
      
      For example see symbol set_reset_devices:
      
        [root@s8360047 linux-devel]# nm -A vmlinux| fgrep set_reset_devices
        vmlinux:0000000001379000 t set_reset_devices
        [root@s8360047 linux-devel]#
      
        [root@s8360047 linux-devel]# fgrep set_reset_devices /proc/kallsyms
        0000000001379000 t set_reset_devices
        [root@s8360047 linux-devel]#
      
      The kernel symbol table and the vmlinux file have the same address for
      symbol set_reset_devices namely 1379000.
      
      When perf report reads this symbols it displays it with address
      symbol__new: set_reset_devices 0x137a000-0x137a018
      
      There is a difference between perf report and vmlinux of 0x1000.
      
      The reason for the difference is at kernel symbol load time in function
      dso__load_sym(). The vmlinux file is investigated with its ELF header.
      Command readelf shows this:
      
        Section Headers:
        [Nr] Name              Type             Address           Offset
             Size              EntSize          Flags  Link  Info  Align
        [ 0]                   NULL             0000000000000000  00000000
             0000000000000000  0000000000000000           0     0     0
        [ 1] .text             PROGBITS         0000000000000000  00001000
             0000000000b0e0c2  0000000000000000  AX       0     0     128
      
      This leads to an invalid calculation of the symbol start address, see
      file utit/symbol-elf.c line 974:
      
              /* Adjust symbol to map to file offset */
              if (adjust_kernel_syms)
                      sym.st_value -= shdr.sh_addr - shdr.sh_offset;
      
      With shdr.sh_addr set to 0x0 and shdr.sh_offset set to 0x1000 as read
      from the ELF .text section 0x1000 is added to the symbol address.
      
      I would like to fix this by introducing an archticture specific function
      named elf__needs_adjust_symbols(). This is the same approach as done by
      PowerPC.  The function currently does not exist for s390x and the
      default weak one is used.  The s390x specific one returns false when
      symsrc_init() is invoked for kernel symbols and results in variable
      adjust_kernel_syms being false.  This omits the adjustment and the
      correct address is displayed (when symbol resolvement does not work).
      
      The s390x specific function returns false for kernel symbol adjustment
      and returns true for kernel modules, processes and shared libraries.
      Signed-off-by: NThomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      LPU-Reference: 20170713130252.6167-1-tmricht@linux.vnet.ibm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cf6383f7
  7. 20 7月, 2017 2 次提交
  8. 19 7月, 2017 2 次提交
    • K
      perf probe: Allow placing uprobes in alternate namespaces. · 544abd44
      Krister Johansen 提交于
      Teaches perf how to place a uprobe on a file that's in a different mount
      namespace.  The user must add the probe using the --target-ns argument
      to perf probe.  Once it has been placed, it may be recorded against
      without further namespace-specific commands.
      Signed-off-by: NKrister Johansen <kjlx@templeofstupid.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      [ PPC build fixed by Ravi: ]
      Link: http://lkml.kernel.org/r/1500287542-6219-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
      Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      [ Fix !HAVE_DWARF_SUPPORT build ]
      Link: http://lkml.kernel.org/r/1499305693-1599-4-git-send-email-kjlx@templeofstupid.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      544abd44
    • J
      perf annotate: Check for fused instructions · 69fb09f6
      Jin Yao 提交于
      Macro fusion merges two instructions to a single micro-op. Intel core
      platform performs this hardware optimization under limited
      circumstances.
      
      For example, CMP + JCC can be "fused" and executed /retired together.
      While with sampling this can result in the sample sometimes being on the
      JCC and sometimes on the CMP.  So for the fused instruction pair, they
      could be considered together.
      
      On Nehalem, fused instruction pairs:
      
        cmp/test + jcc.
      
      On other new CPU:
      
        cmp/test/add/sub/and/inc/dec + jcc.
      
      This patch adds an x86-specific function which checks if 2 instructions
      are in a "fused" pair. For non-x86 arch, the function is just NULL.
      
      Changelog:
      
      v4: Move the CPU model checking to symbol__disassemble and save the CPU
          family/model in arch structure.
      
          It avoids checking every time when jump arrow printed.
      
      v3: Add checking for Nehalem (CMP, TEST). For other newer Intel CPUs
          just check it by default (CMP, TEST, ADD, SUB, AND, INC, DEC).
      
      v2: Remove the original weak function. Arnaldo points out that doing it
          as a weak function that will be overridden by the host arch doesn't
          work. So now it's implemented as an arch-specific function.
      
      Committer fix:
      
      Do not access evsel->evlist->env->cpuid, ->env can be null, introduce
      perf_evsel__env_cpuid(), just like perf_evsel__env_arch(), also used in
      this function call.
      
      The original patch was segfaulting 'perf top' + annotation.
      
      But this essentially disables this fused instructions augmentation in
      'perf top', the right thing is to get the cpuid from the running kernel,
      left for a later patch tho.
      Signed-off-by: NYao Jin <yao.jin@linux.intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1499403995-19857-2-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      69fb09f6
  9. 27 6月, 2017 1 次提交
  10. 21 6月, 2017 2 次提交
  11. 20 6月, 2017 3 次提交
  12. 15 6月, 2017 1 次提交
    • J
      perf tools: Fix build with ARCH=x86_64 · 7a759cd8
      Jiada Wang 提交于
      With commit: 0a943cb1 (tools build: Add HOSTARCH Makefile variable)
      when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of
      ARCH=x86, so the perf build process searchs header files from
      tools/arch/x86_64/include, which doesn't exist.
      
      The following build failure is seen:
      
        In file included from util/event.c:2:0:
          tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory
          compilation terminated.
      
      Fix this issue by using SRCARCH instead of ARCH in perf, just like the
      main kernel Makefile and tools/objtool's.
      Signed-off-by: NJiada Wang <jiada_wang@mentor.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Eugeniu Rosca <erosca@de.adit-jv.com>
      Cc: Jan Stancek <jstancek@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Rui Teng <rui.teng@linux.vnet.ibm.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 0a943cb1 ("tools build: Add HOSTARCH Makefile variable")
      Link: http://lkml.kernel.org/r/1491793357-14977-2-git-send-email-jiada_wang@mentor.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7a759cd8
  13. 06 6月, 2017 1 次提交
  14. 04 5月, 2017 1 次提交
  15. 03 5月, 2017 1 次提交
    • P
      perf symbols: Allow user probes on versioned symbols · d8040645
      Paul Clarke 提交于
      Symbol versioning, as in glibc, results in symbols being defined as:
      
        <real symbol>@[@]<version>
      
      (Note that "@@" identifies a default symbol, if the symbol name is
      repeated.)
      
      perf is currently unable to deal with this, and is unable to create user
      probes at such symbols:
      
        --
        $ nm /lib/powerpc64le-linux-gnu/libpthread.so.0 | grep pthread_create
        0000000000008d30 t __pthread_create_2_1
        0000000000008d30 T pthread_create@@GLIBC_2.17
        $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create
        probe-definition(0): pthread_create
        symbol:pthread_create file:(null) line:0 offset:0 return:0 lazy:(null)
        0 arguments
        Open Debuginfo file: /usr/lib/debug/lib/powerpc64le-linux-gnu/libpthread-2.19.so
        Try to find probe point from debuginfo.
        Probe point 'pthread_create' not found.
           Error: Failed to add events. Reason: No such file or directory (Code: -2)
        --
      
      One is not able to specify the fully versioned symbol, either, due to
      syntactic conflicts with other uses of "@" by perf:
      
        --
        $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create@@GLIBC_2.17
        probe-definition(0): pthread_create@@GLIBC_2.17
        Semantic error :SRC@SRC is not allowed.
        0 arguments
           Error: Command Parse Error. Reason: Invalid argument (Code: -22)
        --
      
      This patch ignores versioning for default symbols, thus allowing probes to be
      created for these symbols:
      
        --
        $ /usr/bin/sudo ./perf probe -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create
        Added new event:
           probe_libpthread:pthread_create (on pthread_create in /lib/powerpc64le-linux-gnu/libpthread-2.19.so)
      
        You can now use it in all perf tools, such as:
      
                 perf record -e probe_libpthread:pthread_create -aR sleep 1
      
        $ /usr/bin/sudo ./perf record -e probe_libpthread:pthread_create -aR ./test 2
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.052 MB perf.data (2 samples) ]
        $ /usr/bin/sudo ./perf script
                     test  2915 [000] 19124.260729: probe_libpthread:pthread_create: (3fff99248d38)
                     test  2916 [000] 19124.260962: probe_libpthread:pthread_create: (3fff99248d38)
        $ /usr/bin/sudo ./perf probe --del=probe_libpthread:pthread_create
        Removed event: probe_libpthread:pthread_create
        --
      
      Committer note:
      
      Change the variable storing the result of strlen() to 'int', to fix the build
      on debian:experimental-x-mipsel, fedora:24-x-ARC-uClibc, ubuntu:16.04-x-arm,
      etc:
      
        util/symbol.c: In function 'symbol__match_symbol_name':
        util/symbol.c:422:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
           if (len < versioning - name)
                   ^
      Signed-off-by: NPaul A. Clarke <pc@us.ibm.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/c2b18d9c-17f8-9285-4868-f58b6359ccac@us.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d8040645
  16. 25 4月, 2017 3 次提交
  17. 21 4月, 2017 1 次提交
  18. 20 4月, 2017 5 次提交
  19. 12 4月, 2017 1 次提交
  20. 04 4月, 2017 1 次提交
  21. 01 4月, 2017 1 次提交
    • A
      perf trace: Beautify statx syscall 'flag' and 'mask' arguments · fd5cead2
      Arnaldo Carvalho de Melo 提交于
      To test it, build samples/statx/test_statx, which I did as:
      
        $ make headers_install
        $ cc -I ~/git/linux/usr/include samples/statx/test-statx.c -o /tmp/statx
      
      And then use perf trace on it:
      
        # perf trace -e statx /tmp/statx /etc/passwd
        statx(/etc/passwd) = 0
        results=7ff
          Size: 3496            Blocks: 8          IO Block: 4096    regular file
        Device: fd:00           Inode: 280156      Links: 1
        Access: (0644/-rw-r--r--)  Uid:     0   Gid:     0
        Access: 2017-03-29 16:01:01.650073438-0300
        Modify: 2017-03-10 16:25:14.156479354-0300
        Change: 2017-03-10 16:25:14.171479328-0300
           0.000 ( 0.007 ms): statx/30648 statx(dfd: CWD, filename: 0x7ef503f4, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff7ef4eb10) = 0
        #
      
      Using the test-stat.c options to change the mask:
      
        # perf trace -e statx /tmp/statx -O /etc/passwd > /dev/null
           0.000 ( 0.008 ms): statx/30745 statx(dfd: CWD, filename: 0x3a0753f4, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffd3a0735c0) = 0
        #
        # perf trace -e statx /tmp/statx -A /etc/passwd > /dev/null
           0.000 ( 0.010 ms): statx/30757 statx(dfd: CWD, filename: 0xa94e63f4, flags: SYMLINK_NOFOLLOW|NO_AUTOMOUNT, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffea94e49d0) = 0
        #
        # trace --no-inherit -e statx /tmp/statx -F /etc/passwd > /dev/null
           0.000 ( 0.011 ms): statx(dfd: CWD, filename: 0x3b02d3f3, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffd3b02c850) = 0
        #
        # trace --no-inherit -e statx /tmp/statx -F -L /etc/passwd > /dev/null
           0.000 ( 0.008 ms): statx(dfd: CWD, filename: 0x15cff3f3, flags: STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff15cfdda0) = 0
        #
        # trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null
           0.000 ( 0.009 ms): statx(dfd: CWD, filename: 0xfa37f3f3, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffffa37da20) = 0
        #
      
      Adding a probe to get the filename collected as well:
      
        # perf probe 'vfs_getname=getname_flags:72 pathname=result->name:string'
        Added new event:
          probe:vfs_getname    (on getname_flags:72 with pathname=result->name:string)
      
        You can now use it in all perf tools, such as:
      
      	  perf record -e probe:vfs_getname -aR sleep 1
      
        # trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null
           0.169 ( 0.007 ms): statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
        #
      
      Same technique could be used to collect and beautify the result put in
      the 'buffer' argument.
      
      Finally do a system wide 'perf trace' session looking for any use of statx,
      then run the test proggie with various flags:
      
        # trace -e statx
         16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
         33064.447 ( 0.011 ms): statx/4569 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffc5484c790) = 0
         36050.891 ( 0.023 ms): statx/4576 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffeb18b66e0) = 0
         38039.889 ( 0.023 ms): statx/4584 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff1db0ea90) = 0
        ^C#
      
      This one also starts moving the beautifiers from files directly included
      in builtin-trace.c to separate objects + a beauty.h header with
      prototypes, so that we can add test cases in tools/perf/tests/ to fire
      syscalls with various arguments and then get them intercepted as
      syscalls:sys_enter_foo or raw_syscalls:sys_enter + sys_exit to then
      format and check that the formatted output is the one we expect.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: David Howells <dhowells@redhat.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-xvzw8eynffvez5czyzidhrno@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fd5cead2
  22. 28 3月, 2017 2 次提交
  23. 21 3月, 2017 2 次提交
  24. 15 3月, 2017 1 次提交
  25. 08 2月, 2017 1 次提交
  26. 26 1月, 2017 1 次提交
    • H
      perf probe: Fix wrong register name for arm64 · 1b29dfbb
      He Kuang 提交于
      The register name of arm64 architecture is x0-x31 not r0-r31, this patch
      changes this typo.
      
      Before this patch:
      
        # perf probe --definition 'sys_write count'
        p:probe/sys_write _text+1502872 count=%r2:s64
      
        # echo 'p:probe/sys_write _text+1502872 count=%r2:s64' > \
          /sys/kernel/debug/tracing/kprobe_events
        Parse error at argument[0]. (-22)
      
      After this patch:
      
        # perf probe --definition 'sys_write count'
        p:probe/sys_write _text+1502872 count=%x2:s64
      
        # echo 'p:probe/sys_write _text+1502872 count=%x2:s64' > \
          /sys/kernel/debug/tracing/kprobe_events
        # echo 1 >/sys/kernel/debug/tracing/events/probe/enable
        # cat /sys/kernel/debug/tracing/trace
        ...
        sh-422   [000] d... 650.495930: sys_write: (SyS_write+0x0/0xc8) count=22
        sh-422   [000] d... 651.102389: sys_write: (SyS_write+0x0/0xc8) count=26
        sh-422   [000] d... 651.358653: sys_write: (SyS_write+0x0/0xc8) count=86
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bintian Wang <bintian.wang@huawei.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20170124103015.1936-2-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b29dfbb