linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] Add perf sampling tests as part of selftest
@ 2022-01-27  7:19 Kajol Jain
  2022-01-27  7:19 ` [PATCH 01/20] selftest/powerpc/pmu: Include mmap_buffer field as part of struct event Kajol Jain
                   ` (20 more replies)
  0 siblings, 21 replies; 25+ messages in thread
From: Kajol Jain @ 2022-01-27  7:19 UTC (permalink / raw)
  To: mpe; +Cc: kjain, atrajeev, maddy, linuxppc-dev, rnsastry

Patch series adds support for perf sampling tests that
enables capturing sampling data in perf mmap buffer and
further support for reading and processing the samples.
It also addds basic utility functions to process the
mmap buffer inorder to read total count of samples as
well as the contents of sample.

With enablement of extended regs in powerpc, sample can
also capture performance monitor registers (different
Monitor Mode control Registers) by specifying sample type
for extended regs. This information from sample is
used to verify the perf interface, by comparing the event
code fields with interrupt registers value.

Patch series also include support for macros which does the
job of extracting the event code fields and specific
fields from supported Monitor Mode Control Registers.

The sampling support functions and testcases are added in new
folder  "sampling_tests" under "selftests/powerpc/pmu" and
corresponding updates are done Makefiles in "selftests/powerpc"
and "sampling_tests" folder. Testcases are added for PMU registers
which verifies that the perf interface programs these SPR's
correctly.

Patch 1 of the series add new field "mmap_buffer" to "struct event"
to enable capturing of samples as part of perf event.
This field is a place-holder for the mmap-buffer incase of
sample collection

Patch 2-4 adds support functions for enabling perf sampling test and
adds couple of basic utility functions to post process the
mmap buffer. It also adds macros to parse event codes.

Patch 5 adds event_init_sampling function to initialise event
attribute fields for sampling events.

Patch 6-8 adds generic Monitor Mode Control Register(MMCR) macro to get
specific field value from a specific MMCR. It also adds macros and
utility functions to fetch individual fields from all MMCRx PMU registers.

Patch 9-20 adds testcases to verify if fields values of MMCRx registers
are set correctly from event code via perf interface

Link to the linux-ci:
https://github.com/athira-rajeev/linux-ci/actions?query=branch%3Asefltests

Patchset contains initial set of test cases along with basic
utilities to verify basic perf interface. More sampling testcases
are in plan which will cover additional scenarios.

Athira Rajeev (11):
  selftest/powerpc/pmu: Include mmap_buffer field as part of struct
    event
  selftest/powerpc/pmu: Add support for perf sampling tests
  selftest/powerpc/pmu: Add macro to extract mmcr0/mmcr1 fields
  selftest/powerpc/pmu/: Add interface test for mmcr0 exception bits
  selftest/powerpc/pmu/: Add interface test for mmcr0_cc56run field
  selftest/powerpc/pmu/: Add interface test for mmcr0_pmccext bit
  selftest/powerpc/pmu/: Add interface test for mmcr0_pmcjce field
  selftest/powerpc/pmu/: Add interface test for mmcr0_fc56 field using
    pmc1
  selftest/powerpc/pmu/: Add interface test for mmcr0_pmc56 using pmc5
  selftest/powerpc/pmu/: Add interface test for mmcr1_comb field
  selftest/powerpc/pmu/: Add selftest for mmcr1 pmcxsel/unit/cache
    fields

Kajol Jain (4):
  selftest/powerpc/pmu: Add utility functions to post process the mmap
    buffer
  selftest/powerpc/pmu: Add macro to extract mmcr3 and mmcra fields
  selftest/powerpc/pmu/: Add interface test for mmcr3_src fields
  selftest/powerpc/pmu: Add interface test for mmcra register fields

Madhavan Srinivasan (5):
  selftest/powerpc/pmu: Add macros to parse event codes
  selftest/powerpc/pmu: Add event_init_sampling function
  selftest/powerpc/pmu: Add macros to extract mmcr fields
  selftest/powerpc/pmu/: Add interface test for mmcr2_l2l3 field
  selftest/powerpc/pmu/: Add interface test for mmcr2_fcs_fch fields

 tools/testing/selftests/powerpc/pmu/Makefile  |  11 +-
 tools/testing/selftests/powerpc/pmu/event.c   |  18 +-
 tools/testing/selftests/powerpc/pmu/event.h   |   6 +
 .../powerpc/pmu/sampling_tests/Makefile       |  28 +
 .../powerpc/pmu/sampling_tests/misc.c         | 507 ++++++++++++++++++
 .../powerpc/pmu/sampling_tests/misc.h         | 263 +++++++++
 .../pmu/sampling_tests/mmcr0_cc56run_test.c   |  59 ++
 .../sampling_tests/mmcr0_exceptionbits_test.c |  59 ++
 .../sampling_tests/mmcr0_fc56_pmc1ce_test.c   |  58 ++
 .../sampling_tests/mmcr0_fc56_pmc56_test.c    |  58 ++
 .../pmu/sampling_tests/mmcr0_pmccext_test.c   |  59 ++
 .../pmu/sampling_tests/mmcr0_pmcjce_test.c    |  58 ++
 .../pmu/sampling_tests/mmcr1_comb_test.c      |  66 +++
 .../mmcr1_sel_unit_cache_test.c               |  70 +++
 .../pmu/sampling_tests/mmcr2_fcs_fch_test.c   |  67 +++
 .../pmu/sampling_tests/mmcr2_l2l3_test.c      |  74 +++
 .../pmu/sampling_tests/mmcr3_src_test.c       |  67 +++
 .../mmcra_thresh_marked_sample_test.c         |  80 +++
 18 files changed, 1605 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/Makefile
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_cc56run_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_exceptionbits_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_fc56_pmc1ce_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_fc56_pmc56_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_pmccext_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr0_pmcjce_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr1_comb_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr1_sel_unit_cache_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr2_fcs_fch_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr2_l2l3_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr3_src_test.c
 create mode 100644 tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c

-- 
2.27.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-03-10 12:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  7:19 [PATCH 00/20] Add perf sampling tests as part of selftest Kajol Jain
2022-01-27  7:19 ` [PATCH 01/20] selftest/powerpc/pmu: Include mmap_buffer field as part of struct event Kajol Jain
2022-01-27  7:19 ` [PATCH 02/20] selftest/powerpc/pmu: Add support for perf sampling tests Kajol Jain
2022-01-27  7:19 ` [PATCH 03/20] selftest/powerpc/pmu: Add macros to parse event codes Kajol Jain
2022-01-27  7:19 ` [PATCH 04/20] selftest/powerpc/pmu: Add utility functions to post process the mmap buffer Kajol Jain
2022-01-27  7:19 ` [PATCH 05/20] selftest/powerpc/pmu: Add event_init_sampling function Kajol Jain
2022-01-27  7:19 ` [PATCH 06/20] selftest/powerpc/pmu: Add macros to extract mmcr fields Kajol Jain
2022-01-27  7:19 ` [PATCH 07/20] selftest/powerpc/pmu: Add macro to extract mmcr0/mmcr1 fields Kajol Jain
2022-01-27  7:20 ` [PATCH 08/20] selftest/powerpc/pmu: Add macro to extract mmcr3 and mmcra fields Kajol Jain
2022-01-27  7:20 ` [PATCH 09/20] selftest/powerpc/pmu/: Add interface test for mmcr0 exception bits Kajol Jain
2022-01-27  7:20 ` [PATCH 10/20] selftest/powerpc/pmu/: Add interface test for mmcr0_cc56run field Kajol Jain
2022-01-27  7:20 ` [PATCH 11/20] selftest/powerpc/pmu/: Add interface test for mmcr0_pmccext bit Kajol Jain
2022-01-27  7:20 ` [PATCH 12/20] selftest/powerpc/pmu/: Add interface test for mmcr0_pmcjce field Kajol Jain
2022-01-27  7:20 ` [PATCH 13/20] selftest/powerpc/pmu/: Add interface test for mmcr0_fc56 field using pmc1 Kajol Jain
2022-01-27  7:20 ` [PATCH 14/20] selftest/powerpc/pmu/: Add interface test for mmcr0_pmc56 using pmc5 Kajol Jain
2022-01-27  7:20 ` [PATCH 15/20] selftest/powerpc/pmu/: Add interface test for mmcr1_comb field Kajol Jain
2022-01-27  7:20 ` [PATCH 16/20] selftest/powerpc/pmu/: Add selftest for mmcr1 pmcxsel/unit/cache fields Kajol Jain
2022-03-10  7:49   ` Christophe Leroy
2022-03-10 12:11     ` Michael Ellerman
2022-03-10 12:29       ` kajoljain
2022-01-27  7:20 ` [PATCH 17/20] selftest/powerpc/pmu/: Add interface test for mmcr2_l2l3 field Kajol Jain
2022-01-27  7:20 ` [PATCH 18/20] selftest/powerpc/pmu/: Add interface test for mmcr2_fcs_fch fields Kajol Jain
2022-01-27  7:20 ` [PATCH 19/20] selftest/powerpc/pmu/: Add interface test for mmcr3_src fields Kajol Jain
2022-01-27  7:20 ` [PATCH 20/20] selftest/powerpc/pmu: Add interface test for mmcra register fields Kajol Jain
2022-03-02 12:41 ` [PATCH 00/20] Add perf sampling tests as part of selftest Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).