[PATCH v3 0/2] perf test: Add event group test

Ravi Bangoria posted 2 patches 2 years, 9 months ago
tools/perf/tests/Build          |   1 +
tools/perf/tests/builtin-test.c |   1 +
tools/perf/tests/event_groups.c | 127 ++++++++++++++++++++++++++++++++
tools/perf/tests/tests.h        |   1 +
tools/perf/util/Build           |   1 +
tools/perf/util/pmu.c           |   2 +-
tools/perf/util/pmus.c          |   5 ++
tools/perf/util/pmus.h          |   9 +++
8 files changed, 146 insertions(+), 1 deletion(-)
create mode 100644 tools/perf/tests/event_groups.c
create mode 100644 tools/perf/util/pmus.c
create mode 100644 tools/perf/util/pmus.h
[PATCH v3 0/2] perf test: Add event group test
Posted by Ravi Bangoria 2 years, 9 months ago
Multiple events in a group can belong to one or more pmus, however
there are some limitations to it. One of the limitation is, perf
doesn't allow creating a group of events from different hw pmus.
Write a simple test to create various combinations of hw, sw and
uncore pmu events and verify group creation succeeds or fails as
expected.

v2: https://lore.kernel.org/r/20221129111946.409-1-ravi.bangoria@amd.com
v2->v3:
 - Define a set of uncore pmus that supports more than 3 events. This
   will prevent false negative results by not picking random uncore
   pmu. Test will be skipped if no uncore pmu found.

Ravi Bangoria (2):
  perf tool: Move pmus list variable to new a file
  perf test: Add event group test

 tools/perf/tests/Build          |   1 +
 tools/perf/tests/builtin-test.c |   1 +
 tools/perf/tests/event_groups.c | 127 ++++++++++++++++++++++++++++++++
 tools/perf/tests/tests.h        |   1 +
 tools/perf/util/Build           |   1 +
 tools/perf/util/pmu.c           |   2 +-
 tools/perf/util/pmus.c          |   5 ++
 tools/perf/util/pmus.h          |   9 +++
 8 files changed, 146 insertions(+), 1 deletion(-)
 create mode 100644 tools/perf/tests/event_groups.c
 create mode 100644 tools/perf/util/pmus.c
 create mode 100644 tools/perf/util/pmus.h

-- 
2.38.1
Re: [PATCH v3 0/2] perf test: Add event group test
Posted by Liang, Kan 2 years, 9 months ago

On 2022-12-05 11:32 p.m., Ravi Bangoria wrote:
> Multiple events in a group can belong to one or more pmus, however
> there are some limitations to it. One of the limitation is, perf
> doesn't allow creating a group of events from different hw pmus.
> Write a simple test to create various combinations of hw, sw and
> uncore pmu events and verify group creation succeeds or fails as
> expected.
> 
> v2: https://lore.kernel.org/r/20221129111946.409-1-ravi.bangoria@amd.com
> v2->v3:
>  - Define a set of uncore pmus that supports more than 3 events. This
>    will prevent false negative results by not picking random uncore
>    pmu. Test will be skipped if no uncore pmu found.
> 
> Ravi Bangoria (2):
>   perf tool: Move pmus list variable to new a file

a new file

Other than the above typo, the patch series looks good to me.

Acked-by: Kan Liang <kan.liang@linux.intel.com>

Thanks,
Kan

>   perf test: Add event group test
> 
>  tools/perf/tests/Build          |   1 +
>  tools/perf/tests/builtin-test.c |   1 +
>  tools/perf/tests/event_groups.c | 127 ++++++++++++++++++++++++++++++++
>  tools/perf/tests/tests.h        |   1 +
>  tools/perf/util/Build           |   1 +
>  tools/perf/util/pmu.c           |   2 +-
>  tools/perf/util/pmus.c          |   5 ++
>  tools/perf/util/pmus.h          |   9 +++
>  8 files changed, 146 insertions(+), 1 deletion(-)
>  create mode 100644 tools/perf/tests/event_groups.c
>  create mode 100644 tools/perf/util/pmus.c
>  create mode 100644 tools/perf/util/pmus.h
>
Re: [PATCH v3 0/2] perf test: Add event group test
Posted by Arnaldo Carvalho de Melo 2 years, 9 months ago
Em Tue, Dec 06, 2022 at 09:47:57AM -0500, Liang, Kan escreveu:
> On 2022-12-05 11:32 p.m., Ravi Bangoria wrote:
> > Multiple events in a group can belong to one or more pmus, however
> > there are some limitations to it. One of the limitation is, perf
> > doesn't allow creating a group of events from different hw pmus.
> > Write a simple test to create various combinations of hw, sw and
> > uncore pmu events and verify group creation succeeds or fails as
> > expected.
> > 
> > v2: https://lore.kernel.org/r/20221129111946.409-1-ravi.bangoria@amd.com
> > v2->v3:
> >  - Define a set of uncore pmus that supports more than 3 events. This
> >    will prevent false negative results by not picking random uncore
> >    pmu. Test will be skipped if no uncore pmu found.
> > 
> > Ravi Bangoria (2):
> >   perf tool: Move pmus list variable to new a file
> 
> a new file
> 
> Other than the above typo, the patch series looks good to me.
> 
> Acked-by: Kan Liang <kan.liang@linux.intel.com>

Fixed that up, added your Acked-by, thanks.

- Arnaldo
Re: [PATCH v3 0/2] perf test: Add event group test
Posted by Ian Rogers 2 years, 9 months ago
On Mon, Dec 5, 2022 at 8:33 PM Ravi Bangoria <ravi.bangoria@amd.com> wrote:
>
> Multiple events in a group can belong to one or more pmus, however
> there are some limitations to it. One of the limitation is, perf
> doesn't allow creating a group of events from different hw pmus.
> Write a simple test to create various combinations of hw, sw and
> uncore pmu events and verify group creation succeeds or fails as
> expected.
>
> v2: https://lore.kernel.org/r/20221129111946.409-1-ravi.bangoria@amd.com
> v2->v3:
>  - Define a set of uncore pmus that supports more than 3 events. This
>    will prevent false negative results by not picking random uncore
>    pmu. Test will be skipped if no uncore pmu found.

Acked-by: Ian Rogers <irogers@google.com>

Thanks!
Ian

> Ravi Bangoria (2):
>   perf tool: Move pmus list variable to new a file
>   perf test: Add event group test
>
>  tools/perf/tests/Build          |   1 +
>  tools/perf/tests/builtin-test.c |   1 +
>  tools/perf/tests/event_groups.c | 127 ++++++++++++++++++++++++++++++++
>  tools/perf/tests/tests.h        |   1 +
>  tools/perf/util/Build           |   1 +
>  tools/perf/util/pmu.c           |   2 +-
>  tools/perf/util/pmus.c          |   5 ++
>  tools/perf/util/pmus.h          |   9 +++
>  8 files changed, 146 insertions(+), 1 deletion(-)
>  create mode 100644 tools/perf/tests/event_groups.c
>  create mode 100644 tools/perf/util/pmus.c
>  create mode 100644 tools/perf/util/pmus.h
>
> --
> 2.38.1
>