1. 29 4月, 2021 2 次提交
  2. 25 4月, 2021 1 次提交
  3. 24 4月, 2021 4 次提交
  4. 23 4月, 2021 1 次提交
  5. 21 4月, 2021 1 次提交
  6. 20 4月, 2021 11 次提交
    • A
      perf tools: Add a build-test variant to use in builds from a tarball · bb7db869
      Arnaldo Carvalho de Melo 提交于
      To use in automated tests inside containers from a tarball generated
      by 'make perf-tar-src-pkg*', where testing building from a tarball
      is obviously not needed, so add a 'build-test-tarball' for that case.
      
      And don't build with gtk2 as this complicates things for cross builds
      where we don't always have all the libraries a full perf build requires
      available for the target arch, ditto for static builds.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bb7db869
    • Z
      perf data: Fix error return code in perf_data__create_dir() · 59a1a843
      Zhen Lei 提交于
      Although 'ret' has been initialized to -1, but it will be reassigned by
      the "ret = open(...)" statement in the for loop. So that, the value of
      'ret' is unknown when asprintf() failed.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210415083417.3740-1-thunder.leizhen@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      59a1a843
    • I
      perf arm64: Fix off-by-one directory paths. · b96da02b
      Ian Rogers 提交于
      Relative path include works in the regular build due to -I paths but may
      break in other situations.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20210416214113.552252-1-irogers@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b96da02b
    • M
      perf annotate: Add line number like in TUI and source location at EOL · f89a82a8
      Martin Liška 提交于
      The patch changes the output format in 2 ways:
      - line number is displayed for all source lines (matching TUI mode)
      - source locations for the hottest lines are printed
         at the line end in order to preserve layout
      
      Before:
      
           0.00 :   405ef1: inc    %r15
                :            tmpsd * (TD + tmpsd * TDD)));
           0.01 :   405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3        # 4318b0 <_IO_stdin_used+0x8b0>
                :            tmpsd * (TC +
        eff.c:1811    0.67 :   405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3        # 4318b8 <_IO_stdin_used+0x8b8>
                :            TA + tmpsd * (TB +
           0.35 :   405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3        # 4318c0 <_IO_stdin_used+0x8c0>
                :            dumbo =
        eff.c:1809    1.41 :   405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3        # 4318c8 <_IO_stdin_used+0x8c8>
                :            sumi -= sj * tmpsd * dij2i * dumbo;
        eff.c:1813    2.58 :   405f18: vmulsd %xmm3,%xmm0,%xmm0
           2.81 :   405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0
           3.78 :   405f23: vmovsd %xmm0,0x30(%rsp)
                :            for (k = 0; k < lpears[i] + upears[i]; k++) {
        eff.c:1761    0.90 :   405f29: cmp    %r15d,%r12d
      
      After:
      
           0.00 :   405ef1: inc    %r15
                : 1812   tmpsd * (TD + tmpsd * TDD)));
           0.01 :   405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3        # 4318b0 <_IO_stdin_used+0x8b0>
                : 1811   tmpsd * (TC +
           0.67 :   405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3        # 4318b8 <_IO_stdin_used+0x8b8> // eff.c:1811
                : 1810   TA + tmpsd * (TB +
           0.35 :   405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3        # 4318c0 <_IO_stdin_used+0x8c0>
                : 1809   dumbo =
           1.41 :   405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3        # 4318c8 <_IO_stdin_used+0x8c8> // eff.c:1809
                : 1813   sumi -= sj * tmpsd * dij2i * dumbo;
           2.58 :   405f18: vmulsd %xmm3,%xmm0,%xmm0 // eff.c:1813
           2.81 :   405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0
           3.78 :   405f23: vmovsd %xmm0,0x30(%rsp)
                : 1761   for (k = 0; k < lpears[i] + upears[i]; k++) {
      
      Where e.g. '// eff.c:1811' shares the same color as the percentantage
      at the line beginning.
      Signed-off-by: NMartin Liška <mliska@suse.cz>
      Link: http://lore.kernel.org/lkml/a0d53f31-f633-5013-c386-a4452391b081@suse.czSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f89a82a8
    • A
      perf: Update .gitignore file · 537f1e38
      Alexander Antonov 提交于
      After a "make -C tools/perf", git reports the following untracked file:
      perf-iostat
      
      Add this generated file to perf's .gitignore file.
      Signed-off-by: NAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-5-alexander.antonov@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      537f1e38
    • A
      perf stat: Enable iostat mode for x86 platforms · f9ed693e
      Alexander Antonov 提交于
      This functionality is based on recently introduced sysfs attributes for
      Intel® Xeon® Scalable processor family (code name Skylake-SP):
      
      Commit bb42b3d3 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping")
      
      Mode is intended to provide four I/O performance metrics in MB per each
      PCIe root port:
      
       - Inbound Read: I/O devices below root port read from the host memory
       - Inbound Write: I/O devices below root port write to the host memory
       - Outbound Read: CPU reads from I/O devices below root port
       - Outbound Write: CPU writes to I/O devices below root port
      
      Each metric requiries only one uncore event which increments at every 4B
      transfer in corresponding direction. The formulas to compute metrics
      are generic:
          #EventCount * 4B / (1024 * 1024)
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NAlexander Antonov <alexander.antonov@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-4-alexander.antonov@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f9ed693e
    • A
      perf stat: Helper functions for PCIe root ports list in iostat mode · 19776d3c
      Alexander Antonov 提交于
      Introduce helper functions to control PCIe root ports list.
      These helpers will be used in the follow-up patch.
      Signed-off-by: NAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-3-alexander.antonov@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      19776d3c
    • A
      perf stat: Basic support for iostat in perf · f07952b1
      Alexander Antonov 提交于
      Add basic flow for a new iostat mode in perf. Mode is intended to
      provide four I/O performance metrics per each PCIe root port: Inbound Read,
      Inbound Write, Outbound Read, Outbound Write.
      
      The actual code to compute the metrics and attribute it to
      root port is in follow-on patches.
      Signed-off-by: NAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-2-alexander.antonov@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f07952b1
    • K
      perf vendor events: Initial JSON/events list for power10 platform · 32daa5d7
      Kajol Jain 提交于
      Patch adds initial JSON/events for POWER10.
      Signed-off-by: NKajol Jain <kjain@linux.ibm.com>
      Reviewed-by: NPaul Clarke <pc@us.ibm.com>
      Tested-by: NPaul Clarke <pc@us.ibm.com>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lore.kernel.org/lkml/20210419112001.71466-1-kjain@linux.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      32daa5d7
    • R
      libperf xyarray: Add bounds checks to xyarray__entry() · 81886948
      Rob Herring 提交于
      xyarray__entry() is missing any bounds checking yet often the x and y
      parameters come from external callers. Add bounds checks and an
      unchecked __xyarray__entry().
      
      Committer notes:
      
      Make the 'x' and 'y' arguments to the new xyarray__entry() that does
      bounds check to be of type 'size_t', so that we cover also the case
      where 'x' and 'y' could be negative, which is needed anyway as having
      them as 'int' breaks the build with:
      
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h: In function ‘xyarray__entry’:
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:8: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
           28 |  if (x >= xy->max_x || y >= xy->max_y)
              |        ^~
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:26: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
           28 |  if (x >= xy->max_x || y >= xy->max_y)
              |                          ^~
        cc1: all warnings being treated as errors
      Signed-off-by: NRob Herring <robh@kernel.org>
      Suggested-by: NArnaldo Carvalho de Melo <acme@kernel.org>
      Suggested-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210414195758.4078803-1-robh@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      81886948
    • R
      libperf: Add support for user space counter access · 47d01e7b
      Rob Herring 提交于
      x86 and arm64 can both support direct access of event counters in
      userspace. The access sequence is less than trivial and currently exists
      in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in
      projects such as PAPI and libpfm4.
      
      In order to support userspace access, an event must be mmapped first
      with perf_evsel__mmap(). Then subsequent calls to perf_evsel__read()
      will use the fast path (assuming the arch supports it).
      
      Committer notes:
      
      Added a '__maybe_unused' attribute to the read_perf_counter() argument
      to fix the build on arches other than x86_64 and arm.
      
      Committer testing:
      
        Building and running the libperf tests in verbose mode (V=1) now shows
        those "loop = N, count = N" extra lines, testing user space counter
        access.
      
        # make V=1 -C tools/lib/perf tests
        make: Entering directory '/home/acme/git/perf/tools/lib/perf'
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=libperf
        make -C /home/acme/git/perf/tools/lib/api/ O= libapi.a
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fd obj=libapi
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fs obj=libapi
        make -C tests
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-cpumap-a test-cpumap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-threadmap-a test-threadmap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evlist-a test-evlist.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evsel-a test-evsel.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-cpumap-so test-cpumap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-threadmap-so test-threadmap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evlist-so test-evlist.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evsel-so test-evsel.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        make -C tests run
        running static:
        - running test-cpumap.c...OK
        - running test-threadmap.c...OK
        - running test-evlist.c...OK
        - running test-evsel.c...
        	loop = 65536, count = 333926
        	loop = 131072, count = 655781
        	loop = 262144, count = 1311141
        	loop = 524288, count = 2630126
        	loop = 1048576, count = 5256955
        	loop = 65536, count = 524594
        	loop = 131072, count = 1058916
        	loop = 262144, count = 2097458
        	loop = 524288, count = 4205429
        	loop = 1048576, count = 8406606
        OK
        running dynamic:
        - running test-cpumap.c...OK
        - running test-threadmap.c...OK
        - running test-evlist.c...OK
        - running test-evsel.c...
        	loop = 65536, count = 328102
        	loop = 131072, count = 655782
        	loop = 262144, count = 1317494
        	loop = 524288, count = 2627851
        	loop = 1048576, count = 5255187
        	loop = 65536, count = 524601
        	loop = 131072, count = 1048923
        	loop = 262144, count = 2107917
        	loop = 524288, count = 4194606
        	loop = 1048576, count = 8409322
        OK
        make: Leaving directory '/home/acme/git/perf/tools/lib/perf'
        #
      Signed-off-by: NRob Herring <robh@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Itaru Kitayama <itaru.kitayama@gmail.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Link: http://lore.kernel.org/lkml/20210414155412.3697605-4-robh@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      47d01e7b
  7. 17 4月, 2021 3 次提交
    • J
      ia64: tools: remove duplicate definition of ia64_mf() on ia64 · f4bf09dc
      John Paul Adrian Glaubitz 提交于
      The ia64_mf() macro defined in tools/arch/ia64/include/asm/barrier.h is
      already defined in <asm/gcc_intrin.h> on ia64 which causes libbpf
      failing to build:
      
          CC       /usr/src/linux/tools/bpf/bpftool//libbpf/staticobjs/libbpf.o
        In file included from /usr/src/linux/tools/include/asm/barrier.h:24,
                         from /usr/src/linux/tools/include/linux/ring_buffer.h:4,
                         from libbpf.c:37:
        /usr/src/linux/tools/include/asm/../../arch/ia64/include/asm/barrier.h:43: error: "ia64_mf" redefined [-Werror]
           43 | #define ia64_mf()       asm volatile ("mf" ::: "memory")
              |
        In file included from /usr/include/ia64-linux-gnu/asm/intrinsics.h:20,
                         from /usr/include/ia64-linux-gnu/asm/swab.h:11,
                         from /usr/include/linux/swab.h:8,
                         from /usr/include/linux/byteorder/little_endian.h:13,
                         from /usr/include/ia64-linux-gnu/asm/byteorder.h:5,
                         from /usr/src/linux/tools/include/uapi/linux/perf_event.h:20,
                         from libbpf.c:36:
        /usr/include/ia64-linux-gnu/asm/gcc_intrin.h:382: note: this is the location of the previous definition
          382 | #define ia64_mf() __asm__ volatile ("mf" ::: "memory")
              |
        cc1: all warnings being treated as errors
      
      Thus, remove the definition from tools/arch/ia64/include/asm/barrier.h.
      Signed-off-by: NJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f4bf09dc
    • J
      ia64: tools: remove inclusion of ia64-specific version of errno.h header · 17786fea
      John Paul Adrian Glaubitz 提交于
      There is no longer an ia64-specific version of the errno.h header below
      arch/ia64/include/uapi/asm/, so trying to build tools/bpf fails with:
      
          CC       /usr/src/linux/tools/bpf/bpftool/btf_dumper.o
        In file included from /usr/src/linux/tools/include/linux/err.h:8,
                         from btf_dumper.c:11:
        /usr/src/linux/tools/include/uapi/asm/errno.h:13:10: fatal error: ../../../arch/ia64/include/uapi/asm/errno.h: No such file or directory
           13 | #include "../../../arch/ia64/include/uapi/asm/errno.h"
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        compilation terminated.
      
      Thus, just remove the inclusion of the ia64-specific errno.h so that the
      build will use the generic errno.h header on this target which was used
      there anyway as the ia64-specific errno.h was just a wrapper for the
      generic header.
      
      Fixes: c25f867d ("ia64: remove unneeded uapi asm-generic wrappers")
      Signed-off-by: NJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      17786fea
    • D
      bpf: Update selftests to reflect new error states · d7a50913
      Daniel Borkmann 提交于
      Update various selftest error messages:
      
       * The 'Rx tried to sub from different maps, paths, or prohibited types'
         is reworked into more specific/differentiated error messages for better
         guidance.
      
       * The change into 'value -4294967168 makes map_value pointer be out of
         bounds' is due to moving the mixed bounds check into the speculation
         handling and thus occuring slightly later than above mentioned sanity
         check.
      
       * The change into 'math between map_value pointer and register with
         unbounded min value' is similarly due to register sanity check coming
         before the mixed bounds check.
      
       * The case of 'map access: known scalar += value_ptr from different maps'
         now loads fine given masks are the same from the different paths (despite
         max map value size being different).
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: NJohn Fastabend <john.fastabend@gmail.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      d7a50913
  8. 16 4月, 2021 6 次提交
  9. 14 4月, 2021 1 次提交
    • Y
      perf annotate: Fix sample events lost in stdio mode · 5676dba7
      Yang Jihong 提交于
      In hist__find_annotations(), since different 'struct hist_entry' entries
      may point to same symbol, we free notes->src to signal already processed
      this symbol in stdio mode; when annotate, entry will skipped if
      notes->src is NULL to avoid repeated output.
      
      However, there is a problem, for example, run the following command:
      
       # perf record -e branch-misses -e branch-instructions -a sleep 1
      
      perf.data file contains different types of sample event.
      
      If the same IP sample event exists in branch-misses and branch-instructions,
      this event uses the same symbol. When annotate branch-misses events, notes->src
      corresponding to this event is set to null, as a result, when annotate
      branch-instructions events, this event is skipped and no annotate is output.
      
      Solution of this patch is to remove zfree in hists__find_annotations and
      change sort order to "dso,symbol" to avoid duplicate output when different
      processes correspond to the same symbol.
      Signed-off-by: NYang Jihong <yangjihong1@huawei.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: zhangjinhao2@huawei.com
      Link: http://lore.kernel.org/lkml/20210319123527.173883-1-yangjihong1@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5676dba7
  10. 09 4月, 2021 10 次提交