Skip to content
  1. Aug 12, 2021
    • Jin Yao's avatar
      perf tools: Enable on a list of CPUs for hybrid · 1d3351e6
      Jin Yao authored
      
      
      The 'perf record' and 'perf stat' commands have supported the option
      '-C/--cpus' to count or collect only on the list of CPUs provided. This
      option needs to be supported for hybrid as well.
      
      For hybrid support, it needs to check that the cpu list are available
      on hybrid PMU. One example for AlderLake, cpu0-7 is 'cpu_core', cpu8-11
      is 'cpu_atom'.
      
      Before:
      
        # perf stat -e cpu_core/cycles/ -C11 -- sleep 1
      
         Performance counter stats for 'CPU(s) 11':
      
           <not supported>      cpu_core/cycles/
      
               1.006179431 seconds time elapsed
      
      The 'perf stat' command silently returned "<not supported>" without any
      helpful information. It should error out pointing out that that cpu11
      was not 'cpu_core'.
      
      After:
      
        # perf stat -e cpu_core/cycles/ -C11 -- sleep 1
        WARNING: 11 isn't a 'cpu_core', please use a CPU list in the 'cpu_core' range (0-7)
        failed to use cpu list 11
      
      We also need to support the events without pmu prefix specified.
      
        # perf stat -e cycles -C11 -- sleep 1
        WARNING: 11 isn't a 'cpu_core', please use a CPU list in the 'cpu_core' range (0-7)
      
         Performance counter stats for 'CPU(s) 11':
      
                 1,067,373      cpu_atom/cycles/
      
               1.005544738 seconds time elapsed
      
      The perf tool creates two cycles events automatically, cpu_core/cycles/ and
      cpu_atom/cycles/. It checks that cpu11 is not 'cpu_core', then shows a warning
      for cpu_core/cycles/ and only count the cpu_atom/cycles/.
      
      If part of cpus are 'cpu_core' and part of cpus are 'cpu_atom', for example,
      
        # perf stat -e cycles -C0,11 -- sleep 1
        WARNING: use 0 in 'cpu_core' for 'cycles', skip other cpus in list.
        WARNING: use 11 in 'cpu_atom' for 'cycles', skip other cpus in list.
      
         Performance counter stats for 'CPU(s) 0,11':
      
                 1,914,704      cpu_core/cycles/
                 2,036,983      cpu_atom/cycles/
      
               1.005815641 seconds time elapsed
      
      It now automatically selects cpu0 for cpu_core/cycles/, selects cpu11 for
      cpu_atom/cycles/, and output with some warnings.
      
      Some more complex examples,
      
        # perf stat -e cycles,instructions -C0,11 -- sleep 1
        WARNING: use 0 in 'cpu_core' for 'cycles', skip other cpus in list.
        WARNING: use 11 in 'cpu_atom' for 'cycles', skip other cpus in list.
        WARNING: use 0 in 'cpu_core' for 'instructions', skip other cpus in list.
        WARNING: use 11 in 'cpu_atom' for 'instructions', skip other cpus in list.
      
         Performance counter stats for 'CPU(s) 0,11':
      
                 2,780,387      cpu_core/cycles/
                 1,583,432      cpu_atom/cycles/
                 3,957,277      cpu_core/instructions/
                 1,167,089      cpu_atom/instructions/
      
               1.006005124 seconds time elapsed
      
        # perf stat -e cycles,cpu_atom/instructions/ -C0,11 -- sleep 1
        WARNING: use 0 in 'cpu_core' for 'cycles', skip other cpus in list.
        WARNING: use 11 in 'cpu_atom' for 'cycles', skip other cpus in list.
        WARNING: use 11 in 'cpu_atom' for 'cpu_atom/instructions/', skip other cpus in list.
      
         Performance counter stats for 'CPU(s) 0,11':
      
                 3,290,301      cpu_core/cycles/
                 1,953,073      cpu_atom/cycles/
                 1,407,869      cpu_atom/instructions/
      
               1.006260912 seconds time elapsed
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210723063433.7318-4-yao.jin@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1d3351e6
    • Jin Yao's avatar
      perf tools: Create hybrid flag in target · b726e363
      Jin Yao authored
      
      
      The user may count or collect only on a cpu list via '-C/--cpus' option.
      
      Previously cpus for an evsel were retrieved from PMU's sysfs. But if the
      target cpu list is defined, the retrieved cpus are not kept and the
      target cpu list is used instead.
      
      But for hybrid system, we can't directly use target cpu list. The cpu
      list may not be available on hybrid pmu (e.g. cpu_core or cpu_atom).  So
      we should not set the 'has_user_cpus' flag for hybrid system.
      
      The difficulity is that we can't call perf_pmu__has_hybrid() in evlist.c
      to check hybrid system otherwise 'perf test python' would be failed
      (undefined symbol for perf_pmu__has_hybrid). If we add pmu.c to
      python-ext-sources, too many symbol dependencies are hard to resolve.
      
      We use an alternative method by using a new 'hybrid' flag in target
      for hybrid system checking.
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210723063433.7318-3-yao.jin@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b726e363
    • Jin Yao's avatar
      libperf: Add perf_cpu_map__default_new() · 2696d6e5
      Jin Yao authored
      
      
      libperf already has a static function called 'cpu_map__default_new()'.
      
      Add a new API perf_cpu_map__default_new() to export the function.
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210723063433.7318-2-yao.jin@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2696d6e5
    • Riccardo Mancini's avatar
      perf test: Make --skip work on shell tests · ebdf90a4
      Riccardo Mancini authored
      
      
      perf-test has the option --skip to provide a list of tests to skip.
      However, this option does not work with shell scripts.
      
      This patch passes the skiplist to run_shell_tests, so that also shell
      scripts could be skipped using --skip.
      
      Committer tests:
      
      Tests 79 onwards are shell tests:
      
      Before:
      
        # perf test --skip 1,2,81,82,84,88,90
         1: vmlinux symtab matches kallsyms                                 : Skip (user override)
         2: Detect openat syscall event                                     : Skip (user override)
         3: Detect openat syscall event on all cpus                         : Ok
         4: Read samples using the mmap interface                           : Ok
         5: Test data source output                                         : Ok
        <SNIP>
        78: x86 Sample parsing                                              : Ok
        79: build id cache operations                                       : Ok
        80: daemon operations                                               : Ok
        81: perf pipe recording and injection test                          : Ok
        82: Add vfs_getname probe to get syscall args filenames             : FAILED!
        83: probe libc's inet_pton & backtrace it with ping                 : Ok
        84: Use vfs_getname probe to get syscall args filenames             : FAILED!
        85: Zstd perf.data compression/decompression                        : Ok
        86: perf stat csv summary test                                      : Ok
        87: perf stat metrics (shadow stat) test                            : Ok
        88: perf stat --bpf-counters test                                   : Ok
        89: Check Arm CoreSight trace data recording and synthesized samples: Skip
        90: Check open filename arg using perf trace + vfs_getname          : FAILED!
        #
      
      After:
      
        # perf test --skip 1,2,81,82,84,88,90
         1: vmlinux symtab matches kallsyms                                 : Skip (user override)
         2: Detect openat syscall event                                     : Skip (user override)
         3: Detect openat syscall event on all cpus                         : Ok
         4: Read samples using the mmap interface                           : Ok
         5: Test data source output                                         : Ok
        <SNIP>
        78: x86 Sample parsing                                              : Ok
        79: build id cache operations                                       : Ok
        80: daemon operations                                               : Ok
        81: perf pipe recording and injection test                          : Skip (user override)
        82: Add vfs_getname probe to get syscall args filenames             : Skip (user override)
        83: probe libc's inet_pton & backtrace it with ping                 : Ok
        84: Use vfs_getname probe to get syscall args filenames             : Skip (user override)
        85: Zstd perf.data compression/decompression                        : Ok
        86: perf stat csv summary test                                      : Ok
        87: perf stat metrics (shadow stat) test                            : Ok
        88: perf stat --bpf-counters test                                   : Skip (user override)
        89: Check Arm CoreSight trace data recording and synthesized samples: Skip
        90: Check open filename arg using perf trace + vfs_getname          : Skip (user override)
        #
      
      Signed-off-by: default avatarRiccardo Mancini <rickyman7@gmail.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.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/20210811180625.160944-1-rickyman7@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ebdf90a4
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/core · 5e9cfa71
      Arnaldo Carvalho de Melo authored
      
      
      To get in sync with upstream to help people developing in this branch.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5e9cfa71
  2. Aug 11, 2021
    • Adrian Hunter's avatar
      perf tests: Add dlfilter test · 9f9c9a8d
      Adrian Hunter authored
      
      
      Add a perf test to test the dlfilter C API.
      
      A perf.data file is synthesized and then processed by perf script with a
      dlfilter named dlfilter-test-api-v0.so. Also a C file is compiled to
      provide a dso to match the synthesized perf.data file.
      
      Committer testing:
      
        [root@five ~]# perf test dlfilter
        72: dlfilter C API                                                  : Ok
        [root@five ~]# perf test -v dlfilter
        72: dlfilter C API                                                  :
        --- start ---
        test child forked, pid 3387712
        Checking for gcc
        Command: gcc --version
        gcc (GCC) 11.1.1 20210531 (Red Hat 11.1.1-3)
        Copyright (C) 2021 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions.  There is NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      
        dlfilters path: /var/home/acme/libexec/perf-core/dlfilters
        Command: gcc -g -o /tmp/dlfilter-test-3387712-prog /tmp/dlfilter-test-3387712-prog.c
        Creating new host machine structure
        Command: /var/home/acme/bin/perf script -i /tmp/dlfilter-test-3387712-perf-data --dlfilter /var/home/acme/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so --dlarg first --dlarg 1 --dlarg 4198669 --dlarg 4198662 --dlarg 0 --dlarg last
        start API
        filter_event_early API
        filter_event API
        stop API
        Command: /var/home/acme/bin/perf script -i /tmp/dlfilter-test-3387712-perf-data --dlfilter /var/home/acme/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so --dlarg first --dlarg 1 --dlarg 4198669 --dlarg 4198662 --dlarg 1 --dlarg last
        start API
        filter_event_early API
        filter_event API
        stop API
        Command: /var/home/acme/bin/perf script -i /tmp/dlfilter-test-3387712-perf-data --dlfilter /var/home/acme/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so --dlarg first --dlarg 1 --dlarg 4198669 --dlarg 4198662 --dlarg 2 --dlarg last
        start API
        filter_event_early API
        stop API
        test child finished with 0
        ---- end ----
        dlfilter C API: Ok
        [root@five ~]#
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https //lore.kernel.org/r/20210811101036.17986-7-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9f9c9a8d
    • Adrian Hunter's avatar
      perf build: Move perf_dlfilters.h in the source tree · 3af1dfdd
      Adrian Hunter authored
      
      
      Move perf_dlfilters.h in the source tree so that it will be found when
      building dlfilters as part of the perf build.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https //lore.kernel.org/r/20210811101036.17986-6-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3af1dfdd
    • Adrian Hunter's avatar
      perf dlfilter: Amend documentation wrt library dependencies · b29edf35
      Adrian Hunter authored
      
      
      Like all locally-built programs, dlfilters may need to be re-built if
      shared libraries they use change. Also there may be unexpected results
      if the dfilter uses different versions of the shared libraries that perf
      uses.
      
      Note those things in the documentation.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https //lore.kernel.org/r/20210811101036.17986-5-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b29edf35
    • Adrian Hunter's avatar
      perf script: Fix --list-dlfilters documentation · 3e8e2263
      Adrian Hunter authored
      
      
      The option --list-dlfilters does use a string value.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Fixes: 638e2b99
      
       ("perf script Add option to list dlfilters")
      Link: https //lore.kernel.org/r/20210811101036.17986-4-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3e8e2263
    • Adrian Hunter's avatar
      perf script: Fix unnecessary machine_resolve() · 29159727
      Adrian Hunter authored
      
      
      machine_resolve() may have already been called. Test for that to avoid
      calling it again unnecessarily.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https //lore.kernel.org/r/20210811101036.17986-3-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      29159727
    • Adrian Hunter's avatar
      perf script: Fix documented const'ness of perf_dlfilter_fns · 988db179
      Adrian Hunter authored
      
      
      perf_dlfilter_fns must not be const, because it is not.
      
      Declaring it const can result in it being mapped read-only, causing a
      segfaullt when it is written. Update documentation accordingly.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Fixes: 8defa7147d5572 ("perf script Add API for filtering via dynamically loaded shared object")
      Link: https //lore.kernel.org/r/20210811101036.17986-2-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      988db179
    • Linus Torvalds's avatar
      Merge tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 761c6d7e
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
      
       - Fix FPU_STATUS update
      
       - Update my email address
      
       - Other spellos and fixes
      
      * tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        MAINTAINERS: update Vineet's email address
        ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch
        ARC: Fix CONFIG_STACKDEPOT
        arc: Fix spelling mistake and grammar in Kconfig
        arc: Prefer unsigned int to bare use of unsigned
      761c6d7e
    • Jin Yao's avatar
      perf vendor events: Update metrics for SkyLake Server · c4ad8fab
      Jin Yao authored
      Update JSON metrics for SkyLake Server.
      
      Based on TMA metrics 4.21 at 01.org.
      https://download.01.org/perfmon/
      
      
      
      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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-7-yao.jin@linux.intel.com
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      c4ad8fab
    • Jin Yao's avatar
      perf vendor events intel: Update uncore event list for SkyLake Server · d5c0a8d5
      Jin Yao authored
      Update JSON uncore events for SkyLake Server.
      
      Based on JSON list v1.24:
      
      https://download.01.org/perfmon/SKX/
      
      
      
      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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-6-yao.jin@linux.intel.com
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      d5c0a8d5
    • Jin Yao's avatar
      perf vendor events intel: Update core event list for SkyLake Server · 2c72404e
      Jin Yao authored
      Update JSON core events for SkyLake Server.
      
      Based on JSON list v1.24:
      
      https://download.01.org/perfmon/SKX/
      
      
      
      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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-5-yao.jin@linux.intel.com
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      2c72404e
    • Jin Yao's avatar
      perf vendor events: Update metrics for CascadeLake Server · ed97cc6c
      Jin Yao authored
      Update JSON metrics for CascadeLake Server.
      
      Based on TMA metrics 4.21 at 01.org.
      https://download.01.org/perfmon/
      
      
      
      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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-4-yao.jin@linux.intel.com
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      ed97cc6c
    • Jin Yao's avatar
      perf vendor events intel: Update uncore event list for CascadeLake Server · 96fe584f
      Jin Yao authored
      Update JSON uncore events for CascadeLake Server.
      
      Based on JSON list v1.11:
      
      https://download.01.org/perfmon/CLX/
      
      
      
      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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-3-yao.jin@linux.intel.com
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      96fe584f
    • Jin Yao's avatar
      perf vendor events intel: Update core event list for CascadeLake Server · e0ddfd8d
      Jin Yao authored
      Update JSON core events for CascadeLake Server.
      
      Based on JSON list v1.11:
      
      https://download.01.org/perfmon/CLX/
      
      
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.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@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https //lore.kernel.org/r/20210810020508.31261-2-yao.jin@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e0ddfd8d
    • John Garry's avatar
      perf test: Add pmu-events sys event support · 8ee465a1
      John Garry authored
      
      
      Add support for system events, along with core and uncore events.
      
      Support for a sample PMU is also added.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-12-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8ee465a1
    • John Garry's avatar
      perf jevents: Print SoC name per system event table · 5abd3988
      John Garry authored
      
      
      Print the SoC name per system event table, which will allow the test SoC be
      identified by the pmu-events test.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-11-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5abd3988
    • John Garry's avatar
      perf pmu: Make pmu_add_sys_aliases() public · e199f47f
      John Garry authored
      
      
      Function pmu_add_sys_aliases() will be required for the PMU events test
      for system events aliases, so make it public.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-10-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e199f47f
    • John Garry's avatar
      perf test: Add more pmu-events uncore aliases · 6a86657f
      John Garry authored
      Add more events to cover the scenarios fixed and also inadvertently
      broken by commit c47a5599
      
       ("perf tools: Fix pattern matching for
      same substring in different PMU type")
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-9-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6a86657f
    • John Garry's avatar
      perf test: Re-add pmu-event uncore PMU alias test · 5a65c0c8
      John Garry authored
      Add support to match aliases for uncore PMUs.
      
      Since we cannot rely on the PMUs being present on the host system, use
      fake PMUs.
      
      The following conditions in the test are ensures:
      
      - Expected count of aliases created
      
      - All aliases can be matched to an expected alias in
        perf_pmu_test_pmu.aliases
      
      This will catch the condition fixed in commit c47a5599
      
       ("perf tools:
      Fix pattern matching for same substring in different PMU type"), where
      excess events were created for a PMU. It will also fix the scenario
      inadvertently broken there, where no aliases were created for aliases
      with multiple tokens.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-8-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5a65c0c8
    • John Garry's avatar
      perf pmu: Check .is_uncore field in pmu_add_cpu_aliases_map() · 5806099a
      John Garry authored
      
      
      Calling pmu_is_uncore() for fake PMUs does not work, as it checks sysfs
      for the PMU details (which won't exist).
      
      Check .is_uncore field instead, which makes sense anyway.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-7-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5806099a
    • John Garry's avatar
      perf test: Test pmu-events core aliases separately · 3bc4526b
      John Garry authored
      
      
      The current method to test uncore event aliasing is limited, as it
      relies on the uncore PMU being present in the host system to test.
      
      As such, breakages of uncore PMU aliases goes unnoticed. To make this
      more robust, a new method of testing uncore PMUs with fake PMUs will be
      used in future. This will be separate to testing core PMU aliases.
      
      So make the current test function core PMU only. Uncore PMU alias
      support will be re-added later.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-6-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3bc4526b
    • John Garry's avatar
      perf test: Factor out pmu-events alias comparison · e386acd7
      John Garry authored
      
      
      Factor out alias test which will be used in multiple places.
      
      Also test missing fields.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-5-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e386acd7
    • John Garry's avatar
      perf test: Declare pmu-events test events separately · c81e823f
      John Garry authored
      
      
      Currently all test events are put into arrays of test events.
      
      Create pointer arrays of test events instead, so the test events may be
      referenced later for tighter alias verification.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxarm@huawei.com
      Link: https //lore.kernel.org/r/1627566986-30605-4-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c81e823f
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.14-3' of... · 9e723c53
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
       "Small set of pdx86 fixes for 5.14"
      
      * tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables
        platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust
        platform/x86: Add and use a dual_accel_detect() helper
      9e723c53
    • Linus Torvalds's avatar
      Merge tag 'ovl-fixes-5.14-rc6-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · b3f0ccc5
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "Fix several bugs in overlayfs"
      
      * tag 'ovl-fixes-5.14-rc6-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: prevent private clone if bind mount is not allowed
        ovl: fix uninitialized pointer read in ovl_lookup_real_one()
        ovl: fix deadlock in splice write
        ovl: skip stale entries in merge dir cache iteration
      b3f0ccc5
  3. Aug 10, 2021