Skip to content
Snippets Groups Projects
  1. Oct 22, 2022
  2. Oct 20, 2022
  3. Oct 19, 2022
  4. Oct 17, 2022
  5. Oct 15, 2022
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · a3a36565
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        b8d1d163 ("x86/apic: Don't disable x2APIC if locked")
        ca5b7c0d ("perf/x86/amd/lbr: Add LbrExtV2 branch record support")
      
      Addressing these tools/perf build warnings:
      
          diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
          Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
      
      That makes the beautification scripts to pick some new entries:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        --- before	2022-10-14 18:06:34.294561729 -0300
        +++ after	2022-10-14 18:06:41.285744044 -0300
        @@ -264,6 +264,7 @@
         	[0xc0000102 - x86_64_specific_MSRs_offset] = "KERNEL_GS_BASE",
         	[0xc0000103 - x86_64_specific_MSRs_offset] = "TSC_AUX",
         	[0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO",
        +	[0xc000010e - x86_64_specific_MSRs_offset] = "AMD64_LBR_SELECT",
         	[0xc000010f - x86_64_specific_MSRs_offset] = "AMD_DBG_EXTN_CFG",
         	[0xc0000300 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS",
         	[0xc0000301 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_CTL",
        $
      
      Now one can trace systemwide asking to see backtraces to where that MSR
      is being read/written, see this example with a previous update:
      
        # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        ^C#
      
      If we use -v (verbose mode) we can see what it does behind the scenes:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        Using CPUID AuthenticAMD-25-21-0
        0x6a0
        0x6a8
        New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        0x6a0
        0x6a8
        New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        mmap size 528384B
        ^C#
      
      Example with a frequent msr:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2
        Using CPUID AuthenticAMD-25-21-0
        0x48
        New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        0x48
        New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        mmap size 528384B
        Looking at the vmlinux_path (8 entries long)
        symsrc__init: build id mismatch for vmlinux.
        Using /proc/kcore for kernel data
        Using /proc/kallsyms for symbols
           0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule ([kernel.kallsyms])
                                             futex_wait_queue_me ([kernel.kallsyms])
                                             futex_wait ([kernel.kallsyms])
                                             do_futex ([kernel.kallsyms])
                                             __x64_sys_futex ([kernel.kallsyms])
                                             do_syscall_64 ([kernel.kallsyms])
                                             entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
                                             __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so)
           0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule_idle ([kernel.kallsyms])
                                             do_idle ([kernel.kallsyms])
                                             cpu_startup_entry ([kernel.kallsyms])
                                             secondary_startup_64_no_verify ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Daniel Sneddon <daniel.sneddon@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Link: https://lore.kernel.org/lkml/Y0nQkz2TUJxwfXJd@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a3a36565
    • Qi Liu's avatar
      perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet · 5e91e57e
      Qi Liu authored
      
      Add support for using 'perf report --dump-raw-trace' to parse PTT packet.
      
      Example usage:
      
      Output will contain raw PTT data and its textual representation, such
      as (8DW format):
      
      0 0 0x5810 [0x30]: PERF_RECORD_AUXTRACE size: 0x400000  offset: 0
      ref: 0xa5d50c725  idx: 0  tid: -1  cpu: 0
      .
      . ... HISI PTT data: size 4194304 bytes
      .  00000000: 00 00 00 00                                 Prefix
      .  00000004: 08 20 00 60                                 Header DW0
      .  00000008: ff 02 00 01                                 Header DW1
      .  0000000c: 20 08 00 00                                 Header DW2
      .  00000010: 10 e7 44 ab                                 Header DW3
      .  00000014: 2a a8 1e 01                                 Time
      .  00000020: 00 00 00 00                                 Prefix
      .  00000024: 01 00 00 60                                 Header DW0
      .  00000028: 0f 1e 00 01                                 Header DW1
      .  0000002c: 04 00 00 00                                 Header DW2
      .  00000030: 40 00 81 02                                 Header DW3
      .  00000034: ee 02 00 00                                 Time
      ....
      
      This patch only add basic parsing support according to the definition of
      the PTT packet described in Documentation/trace/hisi-ptt.rst. And the
      fields of each packet can be further decoded following the PCIe Spec's
      definition of TLP packet.
      
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi6124@gmail.com>
      Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zeng Prime <prime.zeng@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/20220927081400.14364-4-yangyicong@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5e91e57e
    • Qi Liu's avatar
      perf auxtrace arm64: Add support for HiSilicon PCIe Tune and Trace device driver · 057381a7
      Qi Liu authored
      
      HiSilicon PCIe tune and trace device (PTT) could dynamically tune the
      PCIe link's events, and trace the TLP headers).
      
      This patch add support for PTT device in perf tool, so users could use
      'perf record' to get TLP headers trace data.
      
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Acked-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi6124@gmail.com>
      Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zeng Prime <prime.zeng@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/20220927081400.14364-3-yangyicong@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      057381a7
    • Qi Liu's avatar
      perf auxtrace arm: Refactor event list iteration in auxtrace_record__init() · 45a3975f
      Qi Liu authored
      
      Add find_pmu_for_event() and use to simplify logic in
      auxtrace_record_init(). find_pmu_for_event() will be reused in
      subsequent patches.
      
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi6124@gmail.com>
      Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zeng Prime <prime.zeng@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/20220927081400.14364-2-yangyicong@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      45a3975f
    • Athira Rajeev's avatar
      perf tests stat+json_output: Include sanity check for topology · 58d4802a
      Athira Rajeev authored
      
      Testcase stat+json_output.sh fails in powerpc:
      
      	86: perf stat JSON output linter : FAILED!
      
      The testcase "stat+json_output.sh" verifies perf stat JSON output. The
      test covers aggregation modes like per-socket, per-core, per-die, -A
      (no_aggr mode) along with few other tests. It counts expected fields for
      various commands. For example say -A (i.e, AGGR_NONE mode), expects 7
      fields in the output having "CPU" as first field. Same way, for
      per-socket, it expects the first field in result to point to socket id.
      The testcases compares the result with expected count.
      
      The values for socket, die, core and cpu are fetched from topology
      directory:
      
        /sys/devices/system/cpu/cpu*/topology.
      
      For example, socket value is fetched from "physical_package_id" file of
      topology directory.  (cpu__get_topology_int() in util/cpumap.c)
      
      If a platform fails to fetch the topology information, values will be
      set to -1. For example, incase of pSeries platform of powerpc, value for
      "physical_package_id" is restricted and not exposed. So, -1 will be
      assigned.
      
      Perf code has a checks for valid cpu id in "aggr_printout"
      (stat-display.c), which displays the fields. So, in cases where topology
      values not exposed, first field of the output displaying will be empty.
      This cause the testcase to fail, as it counts  number of fields in the
      output.
      
      Incase of -A (AGGR_NONE mode,), testcase expects 7 fields in the output,
      becos of -1 value obtained from topology files for some, only 6 fields
      are printed. Hence a testcase failure reported due to mismatch in number
      of fields in the output.
      
      Patch here adds a sanity check in the testcase for topology.  Check will
      help to skip the test if -1 value found.
      
      Fixes: 0c343af2 ("perf test: JSON format checking")
      Reported-by: default avatarDisha Goel <disgoel@linux.vnet.ibm.com>
      Suggested-by: default avatarIan Rogers <irogers@google.com>
      Suggested-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Claire Jensen <cjense@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Link: https://lore.kernel.org/r/20221006155149.67205-2-atrajeev@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      58d4802a
    • Athira Rajeev's avatar
      perf tests stat+csv_output: Include sanity check for topology · cd400f6f
      Athira Rajeev authored
      
      Testcase stat+csv_output.sh fails in powerpc:
      
      	84: perf stat CSV output linter: FAILED!
      
      The testcase "stat+csv_output.sh" verifies perf stat CSV output. The
      test covers aggregation modes like per-socket, per-core, per-die, -A
      (no_aggr mode) along with few other tests. It counts expected fields for
      various commands. For example say -A (i.e, AGGR_NONE mode), expects 7
      fields in the output having "CPU" as first field. Same way, for
      per-socket, it expects the first field in result to point to socket id.
      The testcases compares the result with expected count.
      
      The values for socket, die, core and cpu are fetched from topology
      directory:
      
        /sys/devices/system/cpu/cpu*/topology.
      
      For example, socket value is fetched from "physical_package_id" file of
      topology directory.  (cpu__get_topology_int() in util/cpumap.c)
      
      If a platform fails to fetch the topology information, values will be
      set to -1. For example, incase of pSeries platform of powerpc, value for
      "physical_package_id" is restricted and not exposed. So, -1 will be
      assigned.
      
      Perf code has a checks for valid cpu id in "aggr_printout"
      (stat-display.c), which displays the fields. So, in cases where topology
      values not exposed, first field of the output displaying will be empty.
      This cause the testcase to fail, as it counts  number of fields in the
      output.
      
      Incase of -A (AGGR_NONE mode,), testcase expects 7 fields in the output,
      becos of -1 value obtained from topology files for some, only 6 fields
      are printed. Hence a testcase failure reported due to mismatch in number
      of fields in the output.
      
      Patch here adds a sanity check in the testcase for topology.  Check will
      help to skip the test if -1 value found.
      
      Fixes: 7473ee56 ("perf test: Add checking for perf stat CSV output.")
      Reported-by: default avatarDisha Goel <disgoel@linux.vnet.ibm.com>
      Suggested-by: default avatarIan Rogers <irogers@google.com>
      Suggested-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Claire Jensen <cjense@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Link: https://lore.kernel.org/r/20221006155149.67205-1-atrajeev@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cd400f6f
    • Adrian Hunter's avatar
      perf intel-pt: Fix system_wide dummy event for hybrid · 6cef7dab
      Adrian Hunter authored
      
      User space tasks can migrate between CPUs, so when tracing selected CPUs,
      system-wide sideband is still needed, however evlist->core.has_user_cpus
      is not set in the hybrid case, so check the target cpu_list instead.
      
      Fixes: 7d189cad ("perf intel-pt: Track sideband system-wide when needed")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20221012082259.22394-3-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6cef7dab
    • Adrian Hunter's avatar
      perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc · 5a3d4707
      Adrian Hunter authored
      
      uClibc segfaulted because NULL was passed as the format to fprintf().
      
      That happened because one of the format strings was missing and
      intel_pt_print_info() didn't check that before calling fprintf().
      
      Add the missing format string, and check format is not NULL before calling
      fprintf().
      
      Fixes: 11fa7cb8 ("perf tools: Pass Intel PT information for decoding MTC and CYC")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20221012082259.22394-2-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5a3d4707
    • James Clark's avatar
      perf test: Fix attr tests for PERF_FORMAT_LOST · e2803966
      James Clark authored
      
      Since PERF_FORMAT_LOST was added, the default read format has that bit
      set, so add it to the tests. Keep the old value as well so that the test
      still passes on older kernels.
      
      This fixes the following failure:
      
        expected read_format=0|4, got 20
        FAILED './tests/attr/test-record-C0' - match failure
      
      Fixes: 85b425f31c8866e0 ("perf record: Set PERF_FORMAT_LOST by default")
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221012094633.21669-2-james.clark@arm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e2803966
    • Ammy Yi's avatar
      perf test: test_intel_pt.sh: Add 9 tests · f77811a0
      Ammy Yi authored
      
      Add tests:
      	Test with MTC and TSC disabled
      	Test with branches disabled
      	Test with/without CYC
      	Test recording with sample mode
      	Test with kernel trace
      	Test virtual LBR
      	Test power events
      	Test with TNT packets disabled
      	Test with event_trace
      
      These tests mostly check that perf record works with the corresponding
      Intel PT config terms, sometimes also checking that certain packets do or
      do not appear in the resulting trace as appropriate.
      
      The "Test virtual LBR" is slightly trickier, using a Python script to
      check that branch stacks are actually synthesized.
      
      Signed-off-by: default avatarAmmy Yi <ammy.yi@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-8-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f77811a0
    • Adrian Hunter's avatar
      perf inject: Fix GEN_ELF_TEXT_OFFSET for jit · 89b15d00
      Adrian Hunter authored
      
      When a program header was added, it moved the text section but
      GEN_ELF_TEXT_OFFSET was not updated.
      
      Fix by adding the program header size and aligning.
      
      Fixes: babd0438 ("perf jit: Include program header in ELF files")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Lieven Hey <lieven.hey@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      89b15d00
    • Adrian Hunter's avatar
      perf test: test_intel_pt.sh: Add jitdump test · 973db240
      Adrian Hunter authored
      
      Add a test for decoding self-modifying code using a jitdump file.
      
      The test creates a workload that uses self-modifying code and generates its
      own jitdump file.  The result is processed with perf inject --jit and
      checked for decoding errors.
      
      Note the test will fail without patch "perf inject: Fix GEN_ELF_TEXT_OFFSET
      for jit" applied.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-6-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      973db240
    • Adrian Hunter's avatar
      perf test: test_intel_pt.sh: Tidy some alignment · 40053a4b
      Adrian Hunter authored
      
      Tidy alignment of test function lines to make them more readable.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-5-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      40053a4b
    • Adrian Hunter's avatar
      perf test: test_intel_pt.sh: Print a message when skipping kernel tracing · 9637bf8f
      Adrian Hunter authored
      
      Messages display with the perf test -v option. Add a message to show when
      skipping a test because the user cannot do kernel tracing.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-4-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9637bf8f
    • Adrian Hunter's avatar
      perf test: test_intel_pt.sh: Tidy some perf record options · 5021d82b
      Adrian Hunter authored
      
      When not decoding, the options "-B -N --no-bpf-event" speed up perf record.
      Make a common function for them.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-3-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5021d82b
    • Adrian Hunter's avatar
      perf test: test_intel_pt.sh: Fix return checking again · e4080492
      Adrian Hunter authored
      
      count_result() does not always reset ret=0 which means the value can spill
      into the next test result.
      
      Fix by explicitly setting it to zero between tests.
      
      Committer testing:
      
        # perf test "Miscellaneous Intel PT testing"
        110: Miscellaneous Intel PT testing               : Ok
        #
      
      Tested as well with:
      
        # perf test -v "Miscellaneous Intel PT testing"
      
      Fixes: fd9b45e3 ("perf test: test_intel_pt.sh: Fix return checking")
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20221014170905.64069-2-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e4080492
  6. Oct 14, 2022
  7. Oct 13, 2022
  8. Oct 12, 2022
  9. Oct 11, 2022
  10. Oct 10, 2022
  11. Oct 07, 2022
Loading