1. 10 Mar, 2021 3 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc · 6a30bedf
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Fix opcode filtering for exceptions, and clean up defconfig"
      
      * git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc:
        sparc: sparc64_defconfig: remove duplicate CONFIGs
        sparc64: Fix opcode filtering in handling of no fault loads
      6a30bedf
    • Corentin Labbe's avatar
      sparc: sparc64_defconfig: remove duplicate CONFIGs · 69264b4a
      Corentin Labbe authored
      After my patch there is CONFIG_ATA defined twice.
      Remove the duplicate one.
      Same problem for CONFIG_HAPPYMEAL, except I added as builtin for boot
      test with NFS.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: a57cdeb3 ("sparc: sparc64_defconfig: add necessary configs for qemu")
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69264b4a
    • Rob Gardner's avatar
      sparc64: Fix opcode filtering in handling of no fault loads · e5e8b80d
      Rob Gardner authored
      is_no_fault_exception() has two bugs which were discovered via random
      opcode testing with stress-ng. Both are caused by improper filtering
      of opcodes.
      
      The first bug can be triggered by a floating point store with a no-fault
      ASI, for instance "sta %f0, [%g0] #ASI_PNF", opcode C1A01040.
      
      The code first tests op3[5] (0x1000000), which denotes a floating
      point instruction, and then tests op3[2] (0x200000), which denotes a
      store instruction. But these bits are not mutually exclusive, and the
      above mentioned opcode has both bits set. The intent is to filter out
      stores, so the test for stores must be done first in order to have
      any effect.
      
      The second bug can be triggered by a floating point load with one of
      the invalid ASI values 0x8e or 0x8f, which pass this check in
      is_no_fault_exception():
           if ((asi & 0xf2) == ASI_PNF)
      
      An example instruction is "ldqa [%l7 + %o7] #ASI 0x8f, %f38",
      opcode CF95D1EF. Asi values greater than 0x8b (ASI_SNFL) are fatal
      in handle_ldf_stq(), and is_no_fault_exception() must not allow these
      invalid asi values to make it that far.
      
      In both of these cases, handle_ldf_stq() reacts by calling
      sun4v_data_access_exception() or spitfire_data_access_exception(),
      which call is_no_fault_exception() and results in an infinite
      recursion.
      Signed-off-by: default avatarRob Gardner <rob.gardner@oracle.com>
      Tested-by: default avatarAnatoly Pugachev <matorola@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5e8b80d
  2. 09 Mar, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 4b3d9f9c
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "A bunch of fixes for the GPIO subsystem. We have two regressions in
        the core code spotted right after the merge window, a series of fixes
        for ACPI GPIO and a subsequent fix for a related regression in
        gpio-pca953x + a minor tweak in .gitignore and a rework of handling of
        the gpio-line-names to remedy a regression in stm32mp151.
      
        Summary:
      
         - fix two regressions in core GPIO subsystem code: one NULL-pointer
           dereference and one list corruption
      
         - read GPIO line names from fwnode instead of using the generic
           device properties to fix a regression on stm32mp151
      
         - fixes to ACPI GPIO and gpio-pca953x to handle a regression in IRQ
           handling on Intel Galileo
      
         - update .gitignore in GPIO selftests"
      
      * tag 'gpio-fixes-for-v5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: Read "gpio-line-names" from a firmware node
        gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2
        gpiolib: acpi: Allow to find GpioInt() resource by name and index
        gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk
        gpiolib: acpi: Add missing IRQF_ONESHOT
        gpio: fix gpio-device list corruption
        gpio: fix NULL-deref-on-deregistration regression
        selftests: gpio: update .gitignore
      4b3d9f9c
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_5.12_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 9c39198a
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fixes for boot breakage because of misaligned FDTs
      
       - fix for overwritten exception handlers
      
       - enable MIPS optimized crypto for all MIPS CPUs to improve wireguard
         performance
      
      * tag 'mips-fixes_5.12_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: kernel: Reserve exception base early to prevent corruption
        MIPS: vmlinux.lds.S: align raw appended dtb to 8 bytes
        crypto: mips/poly1305 - enable for all MIPS processors
        MIPS: boot/compressed: Copy DTB to aligned address
      9c39198a
    • Thomas Bogendoerfer's avatar
      MIPS: kernel: Reserve exception base early to prevent corruption · bd67b711
      Thomas Bogendoerfer authored
      BMIPS is one of the few platforms that do change the exception base.
      After commit 2dcb3964 ("memblock: do not start bottom-up allocations
      with kernel_end") we started seeing BMIPS boards fail to boot with the
      built-in FDT being corrupted.
      
      Before the cited commit, early allocations would be in the [kernel_end,
      RAM_END] range, but after commit they would be within [RAM_START +
      PAGE_SIZE, RAM_END].
      
      The custom exception base handler that is installed by
      bmips_ebase_setup() done for BMIPS5000 CPUs ends-up trampling on the
      memory region allocated by unflatten_and_copy_device_tree() thus
      corrupting the FDT used by the kernel.
      
      To fix this, we need to perform an early reservation of the custom
      exception space. Additional we reserve the first 4k (1k for R3k) for
      either normal exception vector space (legacy CPUs) or special vectors
      like cache exceptions.
      
      Huge thanks to Serge for analysing and proposing a solution to this
      issue.
      
      Fixes: 2dcb3964 ("memblock: do not start bottom-up allocations with kernel_end")
      Reported-by: default avatarKamal Dasu <kdasu.kdev@gmail.com>
      Debugged-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Tested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      bd67b711
    • Linus Torvalds's avatar
      Merge git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc · 987a0874
      Linus Torvalds authored
      Pull sparc updates from David Miller:
       "Just some more random bits from Al, including a conversion over to
        generic extables"
      
      * git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc:
        sparc32: take ->thread.flags out
        sparc32: get rid of fake_swapper_regs
        sparc64: get rid of fake_swapper_regs
        sparc32: switch to generic extables
        sparc32: switch copy_user.S away from range exception table entries
        sparc32: get rid of range exception table entries in checksum_32.S
        sparc32: switch __bzero() away from range exception table entries
        sparc32: kill lookup_fault()
        sparc32: don't bother with lookup_fault() in __bzero()
      987a0874
  3. 08 Mar, 2021 11 commits
  4. 07 Mar, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.12-2020-03-07' of... · 144c79ef
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.12-2020-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
       "Perf tool fixes:
      
         - Fix wrong skipping for per-die aggregation in 'perf stat'.
      
         - Fix race in signal handling on large core count machines, setting
           up signal handlers earlier.
      
         - Fix -F for branch & mem modes in 'perf report'.
      
         - Fix the condition checks for max number of NUMA nodes in 'perf
           bench numa'.
      
         - Fix crash in 'perf diff' error path.
      
         - Fix filtering of empty build-ids in 'perf archive'.
      
         - Ensure read cmdlines from libtraceevent are null terminated.
      
        Recent regressions:
      
         - Fix control fifo permissions in 'perf daemon'.
      
         - Fix 'perf daemon' compile error with ASAN.
      
         - Fix running 'perf daemon' test for non root user.
      
         - Fix PERF_SAMPLE_WEIGHT_STRUCT 'perf test' failure on non-x86
           arches.
      
         - Fix event's PMU name parsing related to new drm/i915/gt
           software-gt-awake-time event.
      
        Fixes from compiler instrumentation:
      
         - Fix leaks in 'perf test' entries, found using ASAN.
      
         - Fix use-after-free when 'perf stat -r' option is used.
      
        Arch specific:
      
         - Fix bitmap for option om ARM's CS-ETM.
      
        Documentation:
      
         - Fix documentation of verbose options.
      
        Build:
      
         - Clean 'generated' directory used for creating the syscall table on
           x86.
      
         - Fix ccache usage in $(CC) when generating arch errno table.
      
         - Cast (struct timeval).tv_sec when printing, fixing the build with
           MUSL libc.
      
         - Tighten snprintf() string precision to pass gcc check on some
           32-bit arches.
      
         - Update UAPI copies from the kernel sources.
      
         - Fix regression on feature detection 'make clean' target"
      
      * tag 'perf-tools-fixes-for-v5.12-2020-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (44 commits)
        perf cs-etm: Fix bitmap for option
        perf trace: Fix race in signal handling
        perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
        perf report: Fix -F for branch & mem modes
        perf tests x86: Move insn.h include to make sure it finds stddef.h
        perf test: Support the ins_lat check in the X86 specific test
        perf test: Fix sample-parsing failure on non-x86 platforms
        perf archive: Fix filtering of empty build-ids
        perf daemon: Fix compile error with Asan
        perf stat: Fix use-after-free when -r option is used
        libperf: Add perf_evlist__reset_id_hash()
        perf stat: Fix wrong skipping for per-die aggregation
        tools headers UAPI: Sync KVM's kvm.h and vmx.h headers with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Update tools' copy of linux/coresight-pmu.h
        tools headers: Update syscall.tbl files to support mount_setattr
        perf test: Fix cpu and thread map leaks in perf_time_to_tsc test
        perf test: Fix cpu map leaks in cpu_map_print test
        perf test: Fix a memory leak in thread_map_remove test
        perf test: Fix a thread map leak in thread_map_synthesize test
        ...
      144c79ef
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 3bb48a85
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "Two small parisc architecture fixes: fix a linking failure reported by
        the kernel test robot and remove a duplicate include"
      
      * 'parisc-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        arch/parisc/kernel: remove duplicate include in ptrace
        parisc: Enable -mlong-calls gcc option with CONFIG_COMPILE_TEST
      3bb48a85
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · fbda7904
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "One non-fix, the conversion of vio_driver->remove() to return void,
        which touches various powerpc specific drivers.
      
        Fix the privilege checks we do in our perf handling, which could cause
        soft/hard lockups in some configurations.
      
        Fix a bug with IRQ affinity seen on kdump kernels when CPU 0 is
        offline in the second kernel.
      
        Fix missed page faults after mprotect(..., PROT_NONE) on 603 (32-bit).
      
        Fix a bug in our VSX (vector) instruction emulation, which should only
        be seen when doing VSX ops to cache inhibited mappings.
      
        Three commits fixing various build issues with obscure configurations.
      
        Thanks to Athira Rajeev, Cédric Le Goater, Christophe Leroy, Christoph
        Plattner, Greg Kurz, Jordan Niethe, Laurent Vivier, Ravi Bangoria,
        Tyrel Datwyler, and Uwe Kleine-König"
      
      * tag 'powerpc-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/sstep: Fix VSX instruction emulation
        powerpc/perf: Fix handling of privilege level checks in perf interrupt context
        powerpc: Force inlining of mmu_has_feature to fix build failure
        vio: make remove callback return void
        powerpc/syscall: Force inlining of __prep_irq_for_enabled_exit()
        powerpc/603: Fix protection of user pages mapped with PROT_NONE
        powerpc/pseries: Don't enforce MSI affinity with kdump
        powerpc/4xx: Fix build errors from mfdcr()
      fbda7904
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v5.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · dac51870
      Linus Torvalds authored
      Pull m68k fix from Geert Uytterhoeven:
       "Fix virt_addr_valid() W=1 compiler warnings.
      
        This is a single non-critical fix. As the build bots are now testing
        all new code with W=1, these warnings are popping up everywhere,
        confusing people. Hence I think it makes sense to silence it as soon
        as possible"
      
      * tag 'm68k-for-v5.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Fix virt_addr_valid() W=1 compiler warnings
      dac51870
  5. 06 Mar, 2021 18 commits
    • Suzuki K Poulose's avatar
      perf cs-etm: Fix bitmap for option · 6fc5baf5
      Suzuki K Poulose authored
      When set option with macros ETM_OPT_CTXTID and ETM_OPT_TS, it wrongly
      takes these two values (14 and 28 prespectively) as bit masks, but
      actually both are the offset for bits.  But this doesn't lead to
      further failure due to the AND logic operation will be always true for
      ETM_OPT_CTXTID / ETM_OPT_TS.
      
      This patch defines new independent macros (rather than using the
      "config" bits) for requesting the "contextid" and "timestamp" for
      cs_etm_set_option().
      Signed-off-by: default avatarSuzuki Poulouse <suzuki.poulose@arm.com>
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Daniel Kiss <daniel.kiss@arm.com>
      Cc: Denis Nikitin <denik@chromium.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      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: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20210206150833.42120-5-leo.yan@linaro.org
      [ Extract the change as a separate patch for easier review ]
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6fc5baf5
    • Michael Petlan's avatar
      perf trace: Fix race in signal handling · 86a19008
      Michael Petlan authored
      Since a lot of stuff happens before the SIGINT signal handler is registered
      (scanning /proc/*, etc.), on bigger systems, such as Cavium Sabre CN99xx,
      it may happen that first interrupt signal is lost and perf isn't correctly
      terminated.
      
      The reproduction code might look like the following:
      
          perf trace -a &
          PERF_PID=$!
          sleep 4
          kill -INT $PERF_PID
      
      The issue has been found on a CN99xx machine with RHEL-8 and the patch fixes
      it by registering the signal handlers earlier in the init stage.
      Suggested-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Tested-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/lkml/YEJnaMzH2ctp3PPx@kernel.org/Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      86a19008
    • Arnaldo Carvalho de Melo's avatar
      perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches · 77d02bd0
      Arnaldo Carvalho de Melo authored
      Noticed on a debian:experimental mips and mipsel cross build build
      environment:
      
        perfbuilder@ec265a086e9b:~$ mips-linux-gnu-gcc --version | head -1
        mips-linux-gnu-gcc (Debian 10.2.1-3) 10.2.1 20201224
        perfbuilder@ec265a086e9b:~$
      
          CC       /tmp/build/perf/util/map.o
        util/map.c: In function 'map__new':
        util/map.c:109:5: error: '%s' directive output may be truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=format-truncation=]
          109 |    "%s/platforms/%s/arch-%s/usr/lib/%s",
              |     ^~
        In file included from /usr/mips-linux-gnu/include/stdio.h:867,
                         from util/symbol.h:11,
                         from util/map.c:2:
        /usr/mips-linux-gnu/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output 32 or more bytes (assuming 4294967321) into a destination of size 4096
           67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           68 |        __bos (__s), __fmt, __va_arg_pack ());
              |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        cc1: all warnings being treated as errors
      
      Since we have the lenghts for what lands in that place, use it to give
      the compiler more info and make it happy.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      77d02bd0
    • Ravi Bangoria's avatar
      perf report: Fix -F for branch & mem modes · 6740a4e7
      Ravi Bangoria authored
      perf report fails to add valid additional fields with -F when
      used with branch or mem modes. Fix it.
      
      Before patch:
      
        $ perf record -b
        $ perf report -b -F +srcline_from --stdio
        Error:
        Invalid --fields key: `srcline_from'
      
      After patch:
      
        $ perf report -b -F +srcline_from --stdio
        # Samples: 8K of event 'cycles'
        # Event count (approx.): 8784
        ...
      
      Committer notes:
      
      There was an inversion: when looking at branch stack dimensions (keys)
      it was checking if the sort mode was 'mem', not 'branch'.
      
      Fixes: aa6b3c99 ("perf report: Make -F more strict like -s")
      Reported-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
      Reviewed-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/20210304062958.85465-1-ravi.bangoria@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6740a4e7
    • Arnaldo Carvalho de Melo's avatar
      perf tests x86: Move insn.h include to make sure it finds stddef.h · c1f272df
      Arnaldo Carvalho de Melo authored
      In some versions of alpine Linux the perf build is broken since commit
      1d509f2a ("x86/insn: Support big endian cross-compiles"):
      
        In file included from /usr/include/linux/byteorder/little_endian.h:13,
                         from /usr/include/asm/byteorder.h:5,
                         from arch/x86/util/../../../../arch/x86/include/asm/insn.h:10,
                         from arch/x86/util/archinsn.c:2:
        /usr/include/linux/swab.h:161:8: error: unknown type name '__always_inline'
         static __always_inline __u16 __swab16p(const __u16 *p)
      
      So move the inclusion of arch/x86/include/asm/insn.h to later in the
      places where linux/stddef.h (that conditionally defines
      __always_inline) to workaround this problem on Alpine Linux 3.9 to 3.11,
      3.12 onwards works.
      
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c1f272df
    • Kan Liang's avatar
      perf test: Support the ins_lat check in the X86 specific test · 7d9d4c6e
      Kan Liang authored
      The ins_lat of PERF_SAMPLE_WEIGHT_STRUCT stands for the instruction
      latency, which is only available for X86. Add a X86 specific test for
      the ins_lat and PERF_SAMPLE_WEIGHT_STRUCT type.
      
      The test__x86_sample_parsing() uses the same way as the
      test__sample_parsing() to verify a sample type. Since the ins_lat and
      PERF_SAMPLE_WEIGHT_STRUCT are the only X86 specific sample type for now,
      the test__x86_sample_parsing() only verify the PERF_SAMPLE_WEIGHT_STRUCT
      type. Other sample types are still verified in the generic test.
      
        $ perf test 77 -v
        77: x86 Sample parsing                                              :
        --- start ---
        test child forked, pid 102370
        test child finished with 0
        ---- end ----
        x86 Sample parsing: Ok
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/1614787285-104151-2-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7d9d4c6e
    • Kan Liang's avatar
      perf test: Fix sample-parsing failure on non-x86 platforms · a8146d66
      Kan Liang authored
      Executing 'perf test 27' fails on s390:
      
        [root@t35lp46 perf]# ./perf test -Fv 27
        27: Sample parsing
        --- start ---
        ---- end ----
        Sample parsing: FAILED!
        [root@t35lp46 perf]#
      
      The commit fbefe9c2 ("perf tools: Support arch specific
      PERF_SAMPLE_WEIGHT_STRUCT processing") changes the ins_lat to a
      model-specific variable only for X86, but perf test still verify the
      variable in the generic test.
      
      Remove the ins_lat check in the generic test. The following patch will
      add it in the X86 specific test.
      
      Fixes: fbefe9c2 ("perf tools: Support arch specific PERF_SAMPLE_WEIGHT_STRUCT processing")
      Reported-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Tested-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/1614787285-104151-1-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a8146d66
    • Nicholas Fraser's avatar
      perf archive: Fix filtering of empty build-ids · ec4d0a76
      Nicholas Fraser authored
      A non-existent build-id used to be treated as all-zero SHA-1 hash.
      Build-ids are now variable width. A non-existent build-id is an empty
      string and "perf buildid-list" pads this with spaces. This is true even
      when using old perf.data files recorded from older versions of perf;
      "perf buildid-list" never reports an all-zero hash anymore.
      
      This fixes "perf-archive" to skip missing build-ids by skipping lines
      that start with a padding space rather than with zeroes.
      Signed-off-by: default avatarNicholas Fraser <nfraser@codeweavers.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Huw Davies <huw@codeweavers.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ulrich Czekalla <uczekalla@codeweavers.com>
      Link: https://lore.kernel.org/r/442bffc7-ac5c-0975-b876-a549efce2413@codeweavers.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ec4d0a76
    • Namhyung Kim's avatar
      perf daemon: Fix compile error with Asan · bd57a9f3
      Namhyung Kim authored
      I'm seeing a build failure when build with address sanitizer.  It seems
      we could write to the name[100] if the var is longer.
      
        $ make EXTRA_CFLAGS=-fsanitize=address
        ...
          CC       builtin-daemon.o
        In function ‘get_session_name’,
          inlined from ‘session_config’ at builtin-daemon.c:164:6,
          inlined from ‘server_config’ at builtin-daemon.c:223:10:
        builtin-daemon.c:155:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
          155 |  *session = 0;
              |  ~~~~~~~~~^~~
        builtin-daemon.c: In function ‘server_config’:
        builtin-daemon.c:162:7: note: at offset 100 to object ‘name’ with size 100 declared here
          162 |  char name[100];
              |       ^~~~
      
      Fixes: c0666261 ("perf daemon: Add config file support")
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20210224071438.686677-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bd57a9f3
    • Namhyung Kim's avatar
      perf stat: Fix use-after-free when -r option is used · 513068f2
      Namhyung Kim authored
      I got a segfault when using -r option with event groups.  The option
      makes it run the workload multiple times and it will reuse the evlist
      and evsel for each run.
      
      While most of resources are allocated and freed properly, the id hash
      in the evlist was not and it resulted in the bug.  You can see it with
      the address sanitizer like below:
      
        $ perf stat -r 100 -e '{cycles,instructions}' true
        =================================================================
        ==693052==ERROR: AddressSanitizer: heap-use-after-free on
            address 0x6080000003d0 at pc 0x558c57732835 bp 0x7fff1526adb0 sp 0x7fff1526ada8
        WRITE of size 8 at 0x6080000003d0 thread T0
          #0 0x558c57732834 in hlist_add_head /home/namhyung/project/linux/tools/include/linux/list.h:644
          #1 0x558c57732834 in perf_evlist__id_hash /home/namhyung/project/linux/tools/lib/perf/evlist.c:237
          #2 0x558c57732834 in perf_evlist__id_add /home/namhyung/project/linux/tools/lib/perf/evlist.c:244
          #3 0x558c57732834 in perf_evlist__id_add_fd /home/namhyung/project/linux/tools/lib/perf/evlist.c:285
          #4 0x558c5747733e in store_evsel_ids util/evsel.c:2765
          #5 0x558c5747733e in evsel__store_ids util/evsel.c:2782
          #6 0x558c5730b717 in __run_perf_stat /home/namhyung/project/linux/tools/perf/builtin-stat.c:895
          #7 0x558c5730b717 in run_perf_stat /home/namhyung/project/linux/tools/perf/builtin-stat.c:1014
          #8 0x558c5730b717 in cmd_stat /home/namhyung/project/linux/tools/perf/builtin-stat.c:2446
          #9 0x558c57427c24 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:313
          #10 0x558c572b1a48 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:365
          #11 0x558c572b1a48 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:409
          #12 0x558c572b1a48 in main /home/namhyung/project/linux/tools/perf/perf.c:539
          #13 0x7fcadb9f7d09 in __libc_start_main ../csu/libc-start.c:308
          #14 0x558c572b60f9 in _start (/home/namhyung/project/linux/tools/perf/perf+0x45d0f9)
      
      Actually the nodes in the hash table are struct perf_stream_id and
      they were freed in the previous run.  Fix it by resetting the hash.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20210225035148.778569-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      513068f2
    • Namhyung Kim's avatar
      libperf: Add perf_evlist__reset_id_hash() · e2a99c9a
      Namhyung Kim authored
      Add the perf_evlist__reset_id_hash() function as an internal function so
      that it can be called by perf to reset the hash table.  This is
      necessary for 'perf stat' to run the workload multiple times.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20210225035148.778569-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e2a99c9a
    • Jin Yao's avatar
      perf stat: Fix wrong skipping for per-die aggregation · 034f7ee1
      Jin Yao authored
      Uncore becomes die-scope on Xeon Cascade Lake-AP and perf has supported
      --per-die aggregation yet.
      
      One issue is found in check_per_pkg() for uncore events running on AP
      system. On cascade Lake-AP, we have:
      
      S0-D0
      S0-D1
      S1-D0
      S1-D1
      
      But in check_per_pkg(), S0-D1 and S1-D1 are skipped because the mask
      bits for S0 and S1 have been set for S0-D0 and S1-D0. It doesn't check
      die_id. So the counting for S0-D1 and S1-D1 are set to zero.  That's not
      correct.
      
        root@lkp-csl-2ap4 ~# ./perf stat -a -I 1000 -e llc_misses.mem_read --per-die -- sleep 5
           1.001460963 S0-D0           1            1317376 Bytes llc_misses.mem_read
           1.001460963 S0-D1           1             998016 Bytes llc_misses.mem_read
           1.001460963 S1-D0           1             970496 Bytes llc_misses.mem_read
           1.001460963 S1-D1           1            1291264 Bytes llc_misses.mem_read
           2.003488021 S0-D0           1            1082048 Bytes llc_misses.mem_read
           2.003488021 S0-D1           1            1919040 Bytes llc_misses.mem_read
           2.003488021 S1-D0           1             890752 Bytes llc_misses.mem_read
           2.003488021 S1-D1           1            2380800 Bytes llc_misses.mem_read
           3.005613270 S0-D0           1            1126080 Bytes llc_misses.mem_read
           3.005613270 S0-D1           1            2898176 Bytes llc_misses.mem_read
           3.005613270 S1-D0           1             870912 Bytes llc_misses.mem_read
           3.005613270 S1-D1           1            3388608 Bytes llc_misses.mem_read
           4.007627598 S0-D0           1            1124608 Bytes llc_misses.mem_read
           4.007627598 S0-D1           1            3884416 Bytes llc_misses.mem_read
           4.007627598 S1-D0           1             921088 Bytes llc_misses.mem_read
           4.007627598 S1-D1           1            4451840 Bytes llc_misses.mem_read
           5.001479927 S0-D0           1             963328 Bytes llc_misses.mem_read
           5.001479927 S0-D1           1            4831936 Bytes llc_misses.mem_read
           5.001479927 S1-D0           1             895104 Bytes llc_misses.mem_read
           5.001479927 S1-D1           1            5496640 Bytes llc_misses.mem_read
      
      From above output, we can see S0-D1 and S1-D1 don't report the interval
      values, they are continued to grow. That's because check_per_pkg()
      wrongly decides to use zero counts for S0-D1 and S1-D1.
      
      So in check_per_pkg(), we should use hashmap(socket,die) to decide if
      the cpu counts needs to skip. Only considering socket is not enough.
      
      Now with this patch,
      
        root@lkp-csl-2ap4 ~# ./perf stat -a -I 1000 -e llc_misses.mem_read --per-die -- sleep 5
           1.001586691 S0-D0           1            1229440 Bytes llc_misses.mem_read
           1.001586691 S0-D1           1             976832 Bytes llc_misses.mem_read
           1.001586691 S1-D0           1             938304 Bytes llc_misses.mem_read
           1.001586691 S1-D1           1            1227328 Bytes llc_misses.mem_read
           2.003776312 S0-D0           1            1586752 Bytes llc_misses.mem_read
           2.003776312 S0-D1           1             875392 Bytes llc_misses.mem_read
           2.003776312 S1-D0           1             855616 Bytes llc_misses.mem_read
           2.003776312 S1-D1           1             949376 Bytes llc_misses.mem_read
           3.006512788 S0-D0           1            1338880 Bytes llc_misses.mem_read
           3.006512788 S0-D1           1             920064 Bytes llc_misses.mem_read
           3.006512788 S1-D0           1             877184 Bytes llc_misses.mem_read
           3.006512788 S1-D1           1            1020736 Bytes llc_misses.mem_read
           4.008895291 S0-D0           1             926592 Bytes llc_misses.mem_read
           4.008895291 S0-D1           1             906368 Bytes llc_misses.mem_read
           4.008895291 S1-D0           1             892224 Bytes llc_misses.mem_read
           4.008895291 S1-D1           1             987712 Bytes llc_misses.mem_read
           5.001590993 S0-D0           1             962624 Bytes llc_misses.mem_read
           5.001590993 S0-D1           1             912512 Bytes llc_misses.mem_read
           5.001590993 S1-D0           1             891200 Bytes llc_misses.mem_read
           5.001590993 S1-D1           1             978432 Bytes llc_misses.mem_read
      
      On no-die system, die_id is 0, actually it's hashmap(socket,0), original behavior
      is not changed.
      Reported-by: default avatarYing Huang <ying.huang@intel.com>
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ying Huang <ying.huang@intel.com>
      Link: http://lore.kernel.org/lkml/20210128013417.25597-1-yao.jin@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      034f7ee1
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync KVM's kvm.h and vmx.h headers with the kernel sources · 33dc525f
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        fe6b6bc8 ("KVM: VMX: Enable bus lock VM exit")
      
      That makes 'perf kvm-stat' aware of this new BUS_LOCK exit reason, thus
      addressing the following perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
        diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
      
      Cc: Chenyi Qiang <chenyi.qiang@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      33dc525f
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · 1a9bcadd
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        3b9c723e ("KVM: SVM: Add support for SVM instruction address check change")
        b85a0425 ("Enumerate AVX Vector Neural Network instructions")
        fb35d30f ("x86/cpufeatures: Assign dedicated feature word for CPUID_0x8000001F[EAX]")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
      
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Kyung Min Park <kyung.min.park@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: Wei Huang <wei.huang2@amd.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1a9bcadd
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Update tools' copy of linux/coresight-pmu.h · 6c0afc57
      Arnaldo Carvalho de Melo authored
      To get the changes in these commits:
      
        88f11864 ("coresight: etm-perf: Support PID tracing for kernel at EL2")
        53abf3fe ("coresight: etm-perf: Clarify comment on perf options")
      
      This will possibly be used in patches lined up for v5.13.
      
      And silence this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/linux/coresight-pmu.h' differs from latest version at 'include/linux/coresight-pmu.h'
        diff -u tools/include/linux/coresight-pmu.h include/linux/coresight-pmu.h
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6c0afc57
    • Arnaldo Carvalho de Melo's avatar
      tools headers: Update syscall.tbl files to support mount_setattr · 743108e1
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        9caccd41 ("fs: introduce MOUNT_ATTR_IDMAP")
      
      This adds this new syscall to the tables used by tools such as 'perf
      trace', so that one can specify it by name and have it filtered, etc.
      
      Addressing these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
        Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl'
        diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
        Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl'
        diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/YD6Wsxr9ByUbab/a@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      743108e1
    • Namhyung Kim's avatar
      perf test: Fix cpu and thread map leaks in perf_time_to_tsc test · 846580c2
      Namhyung Kim authored
      It should release the maps at the end.
      
        $ perf test -v 71
        71: Convert perf time to TSC                   :
        --- start ---
        test child forked, pid 178744
        mmap size 528384B
        1st event perf time 59207256505278 tsc 13187166645142
        rdtsc          time 59207256542151 tsc 13187166723020
        2nd event perf time 59207256543749 tsc 13187166726393
      
        =================================================================
        ==178744==ERROR: LeakSanitizer: detected memory leaks
      
        Direct leak of 40 byte(s) in 1 object(s) allocated from:
          #0 0x7faf601f9e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x55b620cfc00a in cpu_map__trim_new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:79
          #2 0x55b620cfca2f in perf_cpu_map__read /home/namhyung/project/linux/tools/lib/perf/cpumap.c:149
          #3 0x55b620cfd1ef in cpu_map__read_all_cpu_map /home/namhyung/project/linux/tools/lib/perf/cpumap.c:166
          #4 0x55b620cfd1ef in perf_cpu_map__new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:181
          #5 0x55b6209ef1b2 in test__perf_time_to_tsc tests/perf-time-to-tsc.c:73
          #6 0x55b6209828fb in run_test tests/builtin-test.c:428
          #7 0x55b6209828fb in test_and_print tests/builtin-test.c:458
          #8 0x55b620984a53 in __cmd_test tests/builtin-test.c:679
          #9 0x55b620984a53 in cmd_test tests/builtin-test.c:825
          #10 0x55b6209f0cd4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:313
          #11 0x55b62087aa88 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:365
          #12 0x55b62087aa88 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:409
          #13 0x55b62087aa88 in main /home/namhyung/project/linux/tools/perf/perf.c:539
          #14 0x7faf5fd2fd09 in __libc_start_main ../csu/libc-start.c:308
      
        SUMMARY: AddressSanitizer: 72 byte(s) leaked in 2 allocation(s).
        test child finished with 1
        ---- end ----
        Convert perf time to TSC: FAILED!
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@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: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20210301140409.184570-12-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      846580c2
    • Namhyung Kim's avatar
      perf test: Fix cpu map leaks in cpu_map_print test · 690d91f5
      Namhyung Kim authored
      It should be released after printing the map.
      
        $ perf test -v 52
        52: Print cpu map                              :
        --- start ---
        test child forked, pid 172233
      
        =================================================================
        ==172233==ERROR: LeakSanitizer: detected memory leaks
      
        Direct leak of 156 byte(s) in 1 object(s) allocated from:
          #0 0x7fc472518e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x55e63b378f7a in cpu_map__trim_new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:79
          #2 0x55e63b37a05c in perf_cpu_map__new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:237
          #3 0x55e63b056d16 in cpu_map_print tests/cpumap.c:102
          #4 0x55e63b056d16 in test__cpu_map_print tests/cpumap.c:120
          #5 0x55e63afff8fb in run_test tests/builtin-test.c:428
          #6 0x55e63afff8fb in test_and_print tests/builtin-test.c:458
          #7 0x55e63b001a53 in __cmd_test tests/builtin-test.c:679
          #8 0x55e63b001a53 in cmd_test tests/builtin-test.c:825
          #9 0x55e63b06dc44 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:313
          #10 0x55e63aef7a88 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:365
          #11 0x55e63aef7a88 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:409
          #12 0x55e63aef7a88 in main /home/namhyung/project/linux/tools/perf/perf.c:539
          #13 0x7fc47204ed09 in __libc_start_main ../csu/libc-start.c:308
        ...
      
        SUMMARY: AddressSanitizer: 448 byte(s) leaked in 7 allocation(s).
        test child finished with 1
        ---- end ----
        Print cpu map: FAILED!
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@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: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20210301140409.184570-11-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      690d91f5