1. 11 Aug, 2021 6 commits
    • 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
  2. 10 Aug, 2021 20 commits
    • 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
    • John Garry's avatar
      perf jevents: Relocate test events to cpu folder · 35267cea
      John Garry authored
      In future to add support for sys events, relocate the core and uncore
      events to a cpu folder.
      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-3-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      35267cea
    • John Garry's avatar
      perf test: Factor out pmu-events event comparison · 19ac3df3
      John Garry authored
      Factor out event comparison which will be used in multiple places.
      
      Also test "pmu" and "compat" 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-2-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      19ac3df3
    • John Garry's avatar
      perf jevents: Make build dependency on test JSONs · 517db3b5
      John Garry authored
      Currently all JSONs and the mapfile for an arch are dependencies for
      building pmu-events.c
      
      The test JSONs are missing as a dependency, so add them.
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.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: http://lore.kernel.org/lkml/90094733-741c-50e5-ac7d-f5640b5f0bdd@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      517db3b5
    • Riccardo Mancini's avatar
      perf bench: Add benchmark for evlist open/close operations · 4241eabf
      Riccardo Mancini authored
      This new benchmark finds the total time that is taken to open, mmap,
      enable, disable, munmap, close an evlist (time taken for new,
      create_maps, config, delete is not counted in).
      
      The evlist can be configured as in perf-record using the
      -a,-C,-e,-u,--per-thread,-t,-p options.
      
      The events can be duplicated in the evlist to quickly test performance
      with many events using the -n options.
      
      Furthermore, also the number of iterations used to calculate the
      statistics is customizable.
      
      Examples:
      - Open one dummy event system-wide:
      
        $ sudo ./perf bench internals evlist-open-close
          Number of cpus:       4
          Number of threads:    1
          Number of events:     1 (4 fds)
          Number of iterations: 100
          Average open-close took: 613.870 usec (+- 32.852 usec)
      
      - Open the group '{cs,cycles}' on CPU 0
      
        $ sudo ./perf bench internals evlist-open-close -e '{cs,cycles}' -C 0
          Number of cpus:       1
          Number of threads:    1
          Number of events:     2 (2 fds)
          Number of iterations: 100
          Average open-close took: 8503.220 usec (+- 252.652 usec)
      
      - Open 10 'cycles' events for user 0, calculate average over 100 runs
      
        $ sudo ./perf bench internals evlist-open-close -e cycles -n 10 -u 0 -i 100
          Number of cpus:       4
          Number of threads:    328
          Number of events:     10 (13120 fds)
          Number of iterations: 100
          Average open-close took: 180043.140 usec (+- 2295.889 usec)
      
      Committer notes:
      
      Replaced a deprecated bzero() call with designated initialized zeroing.
      
      Added some missing evlist allocation checks, one noted by Riccardo on
      the mailing list.
      
      Minor cosmetic changes (sent in private).
      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/20210809201101.277594-1-rickyman7@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4241eabf
    • Alyssa Ross's avatar
      perf docs: Fix accidental em-dashes · f2c24eba
      Alyssa Ross authored
      " -- " is an em dash (—) in asciidoc, so all these examples that were
      supposed to be producing a literal two dashes were being misrendered.
      Signed-off-by: default avatarAlyssa Ross <hi@alyssa.is>
      Cc: Alexander Shishkin <alexander.shishkin@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>
      Link: http://lore.kernel.org/lkml/20210809153226.332545-1-hi@alyssa.isSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f2c24eba
  3. 09 Aug, 2021 14 commits