Skip to content
  1. May 28, 2021
    • Riccardo Mancini's avatar
      perf test: Iterate over shell tests in alphabetical order · da963834
      Riccardo Mancini authored
      
      
      The for_each_shell_test macro iterated over all shell tests in the
      directory using readdir, which does not guarantee any ordering, causing
      problems on certain fs. However, the order in which they are visited
      determines the id of the test, in case one wants to run a single test.
      
      This patch replaces readdir with scandir using alphabetical sorting.
      This guarantees that, given the same set of tests, all machines will
      see the tests in the same order, and, thus, that test ids are
      consistent.
      
      Signed-off-by: default avatarRiccardo Mancini <rickyman7@gmail.com>
      Reported-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Fabian Hemmer <copy@copy.sh>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
      Link: http://lore.kernel.org/lkml/20210525230521.244553-1-rickyman7@gmail.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      da963834
    • Ravi Bangoria's avatar
      perf probe: Provide more detail with relocation warning · 41ca1d1e
      Ravi Bangoria authored
      
      
      When run as normal user with default sysctl kernel.kptr_restrict=0
      and kernel.perf_event_paranoid=2, perf probe fails with:
      
        $ ./perf probe move_page_tables
        Relocated base symbol is not found!
      
      The warning message is not much informative. The reason perf fails
      is because /proc/kallsyms is restricted by perf_event_paranoid=2
      for normal user and thus perf fails to read relocated address of
      the base symbol.
      
      Tweaking kptr_restrict and perf_event_paranoid can change the
      behavior of perf probe. Also, running as root or privileged user
      works too. Add these details in the warning message.
      
      Plus, kmap->ref_reloc_sym might not be always set even if
      host_machine is initialized. Above is the example of the same.
      Remove that comment.
      
      Reported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20210525043744.193297-1-ravi.bangoria@linux.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      41ca1d1e
    • Denys Zagorui's avatar
      perf parse-events: Add bison --file-prefix-map option · 6793672a
      Denys Zagorui authored
      
      
      During a perf build with O= bison stores full paths in generated files
      and those paths are stored in resulting perf binary.
      
      Starting from bison v3.7.1 those paths can be remapped by using the
      --file-prefix-map option.  Use this option if possible to make perf
      binary more reproducible.
      
      Signed-off-by: default avatarDenys Zagorui <dzagorui@cisco.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210524111514.65713-3-dzagorui@cisco.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6793672a
  2. May 26, 2021
  3. May 25, 2021
    • Adrian Hunter's avatar
      perf scripts python: intel-pt-events.py: Add branches to script · a92bf335
      Adrian Hunter authored
      
      
      As an example, add branch information to intel-pt-events.py script.
      This shows how a simple python script can be used to customize
      perf script output for Intel PT branch traces or power event traces.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-11-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a92bf335
    • Adrian Hunter's avatar
      perf scripting python: Add auxtrace error · 2ede9217
      Adrian Hunter authored
      
      
      Add auxtrace_error to general python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-10-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2ede9217
    • Adrian Hunter's avatar
      perf scripting python: Add context switch · 0db21340
      Adrian Hunter authored
      
      
      Add context_switch to general python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-9-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0db21340
    • Adrian Hunter's avatar
      perf scripting python: Add cpumode · 22cc2f74
      Adrian Hunter authored
      
      
      Add cpumode to python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-8-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      22cc2f74
    • Adrian Hunter's avatar
      perf scripting python: Add IPC · 142b0518
      Adrian Hunter authored
      
      
      Add IPC to python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-7-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      142b0518
    • Adrian Hunter's avatar
      perf scripting python: Add sample flags · bee272af
      Adrian Hunter authored
      
      
      Add sample flags to python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-6-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bee272af
    • Adrian Hunter's avatar
      perf script: Factor out perf_sample__sprintf_flags() · 54cd8b03
      Adrian Hunter authored
      
      
      Factor out perf_sample__sprintf_flags() so it can be reused.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-5-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      54cd8b03
    • Adrian Hunter's avatar
      perf scripting python: Add 'addr_location' for 'addr' · 3f8e009e
      Adrian Hunter authored
      
      
      If sample addr correlates to a symbol, add  "addr_dso", "addr_symbol", and
      "addr_symoff" to python scripting.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-4-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3f8e009e
    • Adrian Hunter's avatar
      perf scripting python: Factor out set_sym_in_dict() · 8271b509
      Adrian Hunter authored
      
      
      Factor out set_sym_in_dict() so it can be reused.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-3-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8271b509
    • Adrian Hunter's avatar
      perf scripting python: Fix tuple_set_u64() · d04c1ff0
      Adrian Hunter authored
      tuple_set_u64() produces a signed value instead of an unsigned value.
      That works for database export but not other cases. Rename to
      tuple_set_d64() for database export and fix tuple_set_u64().
      
      Fixes: df919b40
      
       ("perf scripting python: Extend interface to export data in a database-friendly way")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20210525095112.1399-2-adrian.hunter@intel.com
      d04c1ff0
    • Arnaldo Carvalho de Melo's avatar
      perf auxtrace: Make perf_event__process_auxtrace*() callable · 04612968
      Arnaldo Carvalho de Melo authored
      
      
      As we'll use it in the upcoming python interfaces and when built with:
      
                      make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
        +NO_LIBZSTD=1 NO_LIBCAP=1 NO_SYSCALL_TABLE=1
        make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1 NO_LIBCAP=1
        +NO_SYSCALL_TABLE=1
          BUILD:   Doing 'make -j24' parallel build
        <SNIP>
          CC      /tmp/tmp.rGrdpQlTCr/builtin-daemon.o
        In file included from util/events_stats.h:8,
                         from util/evlist.h:12,
                         from builtin-script.c:18:
        builtin-script.c: In function ‘process_auxtrace_error’:
        util/auxtrace.h:708:57: error: called object is not a function or function pointer
          708 | #define perf_event__process_auxtrace_error              0
              |                                                         ^
        builtin-script.c:2443:16: note: in expansion of macro ‘perf_event__process_auxtrace_error’
         2443 |         return perf_event__process_auxtrace_error(session, event);
              |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          MKDIR   /tmp/tmp.rGrdpQlTCr/tests/
          MKDIR   /tmp/tmp.rGrdpQlTCr/bench/
          CC      /tmp/tmp.rGrdpQlTCr/tests/builtin-test.o
          CC      /tmp/tmp.rGrdpQlTCr/bench/sched-messaging.o
        builtin-script.c:2444:1: error: control reaches end of non-void function [-Werror=return-type]
         2444 | }
              | ^
      
      To: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      04612968
    • Adrian Hunter's avatar
      perf script: Find script file relative to exec path · 6ea4b5db
      Adrian Hunter authored
      
      
      Allow perf script to find a script in the exec path.
      
      Example:
      
      Before:
      
       $ perf record -a -e intel_pt/branch=0/ sleep 0.1
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.954 MB perf.data ]
       $ perf script intel-pt-events.py 2>&1 | head -3
         Error: Couldn't find script `intel-pt-events.py'
         See perf script -l for available scripts.
       $ perf script -s intel-pt-events.py 2>&1 | head -3
       Can't open python script "intel-pt-events.py": No such file or directory
       $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3
         Error: Couldn't find script `/home/ahunter/libexec/perf-core/scripts/python/intel-pt-events.py'
         See perf script -l for available scripts.
       $
      
      After:
      
       $ perf script intel-pt-events.py 2>&1 | head -3
       Intel PT Power Events and PTWRITE
                  perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
                  perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
       $ perf script -s intel-pt-events.py 2>&1 | head -3
       Intel PT Power Events and PTWRITE
                  perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
                  perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
       $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3
       Intel PT Power Events and PTWRITE
                  perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
                  perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
       $
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20210524065718.11421-1-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6ea4b5db
    • Leo Yan's avatar
      perf arm-spe: Remove redundant checking for "full_auxtrace" · afe360a8
      Leo Yan authored
      
      
      The option "opts->full_auxtrace" is checked at the earlier place, if it
      is false the function will directly bail out.  So remove the redundant
      checking for "opts->full_auxtrace".
      
      Suggested-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <Al.Grant@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20210519041546.1574961-5-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      afe360a8
    • Leo Yan's avatar
      perf arm-spe: Enable timestamp for per-cpu mode · f99237e4
      Leo Yan authored
      
      
      For per-cpu mmap, it should enable timestamp tracing for Arm SPE; this
      is helpful for samples correlation.
      
      To automatically enable the timestamp, a helper arm_spe_set_timestamp()
      is introduced for setting "ts_enable" format bit.
      
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <Al.Grant@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.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: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20210519041546.1574961-4-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f99237e4
    • Leo Yan's avatar
      perf arm-spe: Correct sample flags for dummy event · e582badf
      Leo Yan authored
      
      
      The dummy event is mainly used for mmap, the TIME sample is only needed
      for per-cpu case so that the perf tool can rely on the correct timing
      for parsing symbols.  And the CPU sample is useless for mmap.
      
      The BRANCH_STACK sample bit will be always reset for the dummy event in
      the function evsel__config(), so don't need to repeatedly reset it for
      Arm SPE specific.
      
      So this patch only enables TIME sample for per-cpu mmap.
      
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <Al.Grant@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20210519041546.1574961-3-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e582badf
    • Leo Yan's avatar
      perf arm-spe: Correct sample flags for SPE event · 2f021954
      Leo Yan authored
      
      
      Now it's hard code to set sample flags for CPU, TIME and TID for SPE
      event, which is pointless.
      
      The CPU is useful for sampling only for per-mmap case, it is used to
      indicate the AUX trace is associated to which CPU.
      
      The TIME sample is not needed for AUX event, since the time for AUX
      event is not really used and this time is a different thing from the
      timestamp in Arm SPE trace, the timestamp tracing which is controlled
      by Arm SPE's config bit.
      
      The TID sample is not useful for AUX event.
      
      This patch corrects the sample flags for SPE event, it only set CPU
      sample bit for per-cpu mmap case.
      
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Al Grant <Al.Grant@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      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: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20210519041546.1574961-2-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2f021954
    • Jin Yao's avatar
      perf vendor events intel: Update event list for Icelake Client · 71fbc431
      Jin Yao authored
      
      
      - Update core and uncore events for Icelake client to perf.
      - Add ICL metrics.
      
      Based on ICL event list v1.10:
      
        https://download.01.org/perfmon/ICL/
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      71fbc431
    • Jin Yao's avatar
      perf vendor events intel: Add metrics for Icelake Server · d89bf9ca
      Jin Yao authored
      
      
      Add JSON metrics for Icelake Server to perf.
      
      Based on TMA metrics 4.21 at 01.org.:
      
        https://download.01.org/perfmon/
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d89bf9ca
    • Jin Yao's avatar
      perf vendor events intel: Add uncore event list for Icelake Server · c58972ef
      Jin Yao authored
      
      
      Add JSON uncore events for Icelake Server to perf.
      
      Based on JSON list v1.04:
      
        https://download.01.org/perfmon/ICX/
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c58972ef
    • Jin Yao's avatar
      perf vendor events intel: Add core event list for Icelake Server · cdb29a8f
      Jin Yao authored
      
      
      Add JSON core events for Icelake Server to perf.
      
      Based on JSON list v1.04:
      
        https://download.01.org/perfmon/ICX/
      
      Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cdb29a8f
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/core · 100475f8
      Arnaldo Carvalho de Melo authored
      
      
      To pick up fixes from perf/urgent.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      100475f8
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24' of... · a050a6d2
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool fixes from Arnaldo Carvalho de Melo:
      
       - Fix 'perf script' decoding of Intel PT traces for abort handling and
         sample instruction bytes.
      
       - Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit to Intel PT
         'perf script' decoder.
      
       - Fixes for the python based Intel PT trace viewer GUI.
      
       - Sync UAPI copies (unwire quotactl_path, some comment fixes).
      
       - Fix handling of missing kernel software events, such as the recently
         added 'cgroup-switches', and add the trivial glue for it in the
         tooling side, since it was added in this merge window.
      
       - Add missing initialization of zstd_data in 'perf buildid-list',
         detected with valgrind's memcheck.
      
       - Remove needless event enable/disable when all events uses BPF.
      
       - Fix libpfm4 support (63) test error for nested event groups.
      
      * tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf stat: Skip evlist__[enable|disable] when all events uses BPF
        perf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit
        perf scripts python: exported-sql-viewer.py: Fix warning display
        perf scripts python: exported-sql-viewer.py: Fix Array TypeError
        perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report
        tools headers UAPI: Sync files changed by the quotactl_path unwiring
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        tools headers UAPI: Sync linux/fs.h with the kernel sources
        perf parse-events: Check if the software events array slots are populated
        perf tools: Add 'cgroup-switches' software event
        perf intel-pt: Remove redundant setting of ptq->insn_len
        perf intel-pt: Fix sample instruction bytes
        perf intel-pt: Fix transaction abort handling
        perf test: Fix libpfm4 support (63) test error for nested event groups
        tools arch kvm: Sync kvm headers with the kernel sources
        perf buildid-list: Initialize zstd_data
      a050a6d2
    • Linus Torvalds's avatar
      Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 1434a312
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
      
       - "cgroup_disable=" boot param was being applied too late confusing
         some subsystems. Fix it by moving application to __setup() time.
      
       - Comment spelling fixes. Included here to lower the chance of trivial
         future merge conflicts.
      
      * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: fix spelling mistakes
        cgroup: disable controllers at parse time
      1434a312
    • Linus Torvalds's avatar
      Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 5df7ae7b
      Linus Torvalds authored
      Pull workqueue fix from Tejun Heo:
       "One commit to fix spurious workqueue stall warnings across VM
        suspensions"
      
      * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        wq: handle VM suspension in stall detection
      5df7ae7b
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · f71d49e0
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "There's some device specific fixes here but also an unusually large
        number of fixes for the core, including both fixes for breakage
        introduced on ACPI systems while fixing the long standing confusion
        about the polarity of GPIO chip selects specified through DT, and
        fixes for ordering issues on unregistration which have been exposed
        through the wider usage of devm_."
      
      * tag 'spi-fix-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sc18is602: implement .max_{transfer,message}_size() for the controller
        spi: sc18is602: don't consider the chip select byte in sc18is602_check_transfer
        MAINTAINERS: Add Alain Volmat as STM32 SPI maintainer
        dt-bindings: spi: spi-mux: rename flash node
        spi: Don't have controller clean up spi device before driver unbind
        spi: Assume GPIO CS active high in ACPI case
        spi: sprd: Add missing MODULE_DEVICE_TABLE
        spi: Switch to signed types for *_native_cs SPI controller fields
        spi: take the SPI IO-mutex in the spi_set_cs_timing method
        spi: spi-fsl-dspi: Fix a resource leak in an error handling path
        spi: spi-zynq-qspi: Fix stack violation bug
        spi: spi-zynq-qspi: Fix kernel-doc warning
        spi: altera: Make SPI_ALTERA_CORE invisible
        spi: Fix spi device unregister flow
      f71d49e0
    • Zhen Lei's avatar
      cgroup: fix spelling mistakes · 08b2b6fd
      Zhen Lei authored
      
      
      Fix some spelling mistakes in comments:
      hierarhcy ==> hierarchy
      automtically ==> automatically
      overriden ==> overridden
      In absense of .. or ==> In absence of .. and
      assocaited ==> associated
      taget ==> target
      initate ==> initiate
      succeded ==> succeeded
      curremt ==> current
      udpated ==> updated
      
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      08b2b6fd
  4. May 24, 2021
    • Linus Torvalds's avatar
      Linux 5.13-rc3 · c4681547
      Linus Torvalds authored
      c4681547
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6ebb6814
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "Two perf fixes:
      
         - Do not check the LBR_TOS MSR when setting up unrelated LBR MSRs as
           this can cause malfunction when TOS is not supported
      
         - Allocate the LBR XSAVE buffers along with the DS buffers upfront
           because allocating them when adding an event can deadlock"
      
      * tag 'perf-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context
        perf/x86: Avoid touching LBR_TOS MSR for Arch LBR
      6ebb6814
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0898678c
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "Two locking fixes:
      
         - Invoke the lockdep tracepoints in the correct place so the ordering
           is correct again
      
         - Don't leave the mutex WAITER bit stale when the last waiter is
           dropping out early due to a signal as that forces all subsequent
           lock operations needlessly into the slowpath until it's cleaned up
           again"
      
      * tag 'locking-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal
        locking/lockdep: Correct calling tracepoints
      0898678c
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f73d2a42
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A few fixes for irqchip drivers:
      
         - Allocate interrupt descriptors correctly on Mainstone PXA when
           SPARSE_IRQ is enabled; otherwise the interrupt association fails
      
         - Make the APPLE AIC chip driver depend on APPLE
      
         - Remove redundant error output on devm_ioremap_resource() failure"
      
      * tag 'irq-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: Remove redundant error printing
        irqchip/apple-aic: APPLE_AIC should depend on ARCH_APPLE
        ARM: PXA: Fix cplds irqdesc allocation when using legacy mode
      f73d2a42
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7de7ac8d
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Fix how SEV handles MMIO accesses by forwarding potential page faults
         instead of killing the machine and by using the accessors with the
         exact functionality needed when accessing memory.
      
       - Fix a confusion with Clang LTO compiler switches passed to the it
      
       - Handle the case gracefully when VMGEXIT has been executed in
         userspace
      
      * tag 'x86_urgent_for_v5.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sev-es: Use __put_user()/__get_user() for data accesses
        x86/sev-es: Forward page-faults which happen during emulation
        x86/sev-es: Don't return NULL from sev_es_get_ghcb()
        x86/build: Fix location of '-plugin-opt=' flags
        x86/sev-es: Invalidate the GHCB after completing VMGEXIT
        x86/sev-es: Move sev_es_put_ghcb() in prep for follow on patch
      7de7ac8d
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 28ceac69
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix breakage of strace (and other ptracers etc.) when using the new
         scv ABI (Power9 or later with glibc >= 2.33).
      
       - Fix early_ioremap() on 64-bit, which broke booting on some machines.
      
      Thanks to Dmitry V. Levin, Nicholas Piggin, Alexey Kardashevskiy, and
      Christophe Leroy.
      
      * tag 'powerpc-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s/syscall: Fix ptrace syscall info with scv syscalls
        powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls
        powerpc: Fix early setup to make early_ioremap() work
      28ceac69
  5. May 23, 2021
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.13' of... · 4d762034
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix short log indentation for tools builds
      
       - Fix dummy-tools to adjust to the latest stackprotector check
      
      * tag 'kbuild-fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: dummy-tools: adjust to stricter stackprotector check
        scripts/jobserver-exec: Fix a typo ("envirnoment")
        tools build: Fix quiet cmd indentation
      4d762034
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 34c5c898
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "10 patches.
      
        Subsystems affected by this patch series: mm (pagealloc, gup, kasan,
        and userfaultfd), ipc, selftests, watchdog, bitmap, procfs, and lib"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        userfaultfd: hugetlbfs: fix new flag usage in error path
        lib: kunit: suppress a compilation warning of frame size
        proc: remove Alexey from MAINTAINERS
        linux/bits.h: fix compilation error with GENMASK
        watchdog: reliable handling of timestamps
        kasan: slab: always reset the tag in get_freepointer_safe()
        tools/testing/selftests/exec: fix link error
        ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry
        Revert "mm/gup: check page posion status for coredump."
        mm/shuffle: fix section mismatch warning
      34c5c898
    • Mike Kravetz's avatar
      userfaultfd: hugetlbfs: fix new flag usage in error path · e32905e5
      Mike Kravetz authored
      In commit d6995da3 ("hugetlb: use page.private for hugetlb specific
      page flags") the use of PagePrivate to indicate a reservation count
      should be restored at free time was changed to the hugetlb specific flag
      HPageRestoreReserve.  Changes to a userfaultfd error path as well as a
      VM_BUG_ON() in remove_inode_hugepages() were overlooked.
      
      Users could see incorrect hugetlb reserve counts if they experience an
      error with a UFFDIO_COPY operation.  Specifically, this would be the
      result of an unlikely copy_huge_page_from_user error.  There is not an
      increased chance of hitting the VM_BUG_ON.
      
      Link: https://lkml.kernel.org/r/20210521233952.236434-1-mike.kravetz@oracle.com
      Fixes: d6995da3
      
       ("hugetlb: use page.private for hugetlb specific page flags")
      Signed-off-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
      Reviewed-by: default avatarMina Almasry <almasry.mina@google.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Miaohe Lin <linmiaohe@huawei.com>
      Cc: Mina Almasry <almasrymina@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e32905e5