Skip to content

add support for self monitoring

Tomasz Duszynski dpdk-dev 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest4 patches 29 repliesIn review
  2. v104 patches 3 repliesSuperseded
  3. v94 patches 2 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v84 patches1 replySuperseded
v74 patches2 repliesSuperseded
v64 patches9 repliesSuperseded
v54 patches13 repliesSuperseded
v44 patches13 repliesSuperseded
v34 patches4 repliesSuperseded
v24 patches0 repliesSuperseded
v14 patches1 replySuperseded

Changes in v11 from the cover letter

- skip fast test in case init fails

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib: add generic support for reading PMU eventsMAINTAINERS app/test/meson.build app/test/test_pmu.c +10 more+824 -122 replies
2/4pmu: support reading ARM PMU events in runtimeapp/test/test_pmu.c lib/pmu/meson.build lib/pmu/pmu_arm64.c +2 more+139 -00 replies
3/4pmu: support reading Intel x86_64 PMU events in runtimeapp/test/test_pmu.c lib/pmu/meson.build lib/pmu/rte_pmu.h +1 more+29 -00 replies
4/4eal: add PMU support to tracing libraryapp/test/test_trace_perf.c doc/guides/prog_guide/profile_app.rst doc/guides/prog_guide/trace_lib.rst +8 more+157 -10 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMorten BrørupRuifeng WangKonstantin Ananyev
SeriesA-b Series-acked-by R-b A-b
1/4A-b
2/4A-b A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v11 thread

Cover letter [PATCH v11 0/4] add support for self monitoring

This series adds self monitoring support i.e allows to configure and read performance measurement unit (PMU) counters in runtime without using perf utility. This has certain advantages when application runs on isolated cores running dedicated tasks.

Events can be read directly using rte_pmu_read() or using dedicated tracepoint rte_eal_trace_pmu_read(). The latter will cause events to be stored inside CTF file.

By design, all enabled events are grouped together and the same group is attached to lcores that use self monitoring funtionality.

Events are enabled by names, which need to be read from standard location under sysfs i.e

/sys/bus/event_source/devices/PMU/events

where PMU is a core pmu i.e one measuring cpu events. As of today raw events are not supported.

v11:
- skip fast test in case init fails
v10:
- check permissions before using counters
- do not use internal symbols in exported functions
- address review comments
v9:
- fix 'maybe-uninitialized' warning reported by CI
v8:
- just rebase series
v7:
- use per-lcore event group instead of global table index by lcore-id
- don't add pmu_autotest to fast tests because due to lack of suported on every arch
v6:
- move codebase to the separate library
- address review comments
v5:
- address review comments
- fix sign extension while reading pmu on x86
- fix regex mentioned in doc
- various minor changes/improvements here and there
v4:
- fix freeing mem detected by debug_autotest
v3:
- fix shared build
v2:
- fix problems reported by test build infra

Tomasz Duszynski (4):
lib: add generic support for reading PMU events
pmu: support reading ARM PMU events in runtime
pmu: support reading Intel x86_64 PMU events in runtime
eal: add PMU support to tracing library

 MAINTAINERS                              |   5 +
 app/test/meson.build                     |   2 +
 app/test/test_pmu.c                      |  68 +++
 app/test/test_trace_perf.c               |  10 +
 doc/api/doxy-api-index.md                |   3 +-
 doc/api/doxy-api.conf.in                 |   1 +
 doc/guides/prog_guide/profile_app.rst    |  17 +
 doc/guides/prog_guide/trace_lib.rst      |  32 ++
 doc/guides/rel_notes/release_23_03.rst   |   7 +
 lib/eal/common/eal_common_trace.c        |  13 +-
 lib/eal/common/eal_common_trace_points.c |   5 +
 lib/eal/include/rte_eal_trace.h          |  13 +
 lib/eal/meson.build                      |   3 +
 lib/eal/version.map                      |   1 +
 lib/meson.build                          |   1 +
 lib/pmu/meson.build                      |  21 +
 lib/pmu/pmu_arm64.c                      |  94 ++++
 lib/pmu/pmu_private.h                    |  32 ++
 lib/pmu/rte_pmu.c                        | 521 +++++++++++++++++++++++
 lib/pmu/rte_pmu.h                        | 232 ++++++++++
 lib/pmu/rte_pmu_pmc_arm64.h              |  30 ++
 lib/pmu/rte_pmu_pmc_x86_64.h             |  24 ++
 lib/pmu/version.map                      |  16 +
 23 files changed, 1149 insertions(+), 2 deletions(-)
 create mode 100644 app/test/test_pmu.c
 create mode 100644 lib/pmu/meson.build
 create mode 100644 lib/pmu/pmu_arm64.c
 create mode 100644 lib/pmu/pmu_private.h
 create mode 100644 lib/pmu/rte_pmu.c
 create mode 100644 lib/pmu/rte_pmu.h
 create mode 100644 lib/pmu/rte_pmu_pmc_arm64.h
 create mode 100644 lib/pmu/rte_pmu_pmc_x86_64.h
 create mode 100644 lib/pmu/version.map

--
2.34.1