>-----Original Message----- >From: Tomasz Duszynski <tduszyn...@marvell.com> >Sent: Friday, October 25, 2024 10:54 AM >To: Tomasz Duszynski <tduszyn...@marvell.com> >Cc: ruifeng.w...@arm.com; bruce.richard...@intel.com; >david.march...@redhat.com; dev@dpdk.org; >Jerin Jacob <jer...@marvell.com>; konstantin.v.anan...@yandex.ru; >mattias.ronnb...@ericsson.com; >m...@smartsharesystems.com; roret...@linux.microsoft.com; >step...@networkplumber.org; >tho...@monjalon.net; zhou...@loongson.cn >Subject: [PATCH v15 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. > >v15: >- add some basic logs related to API failures >- get rid of thread-local-storage >- do not support MT-safety (which was buggy anyway) in management APIs >(rte_pmu_init(), > rte_pmu_fini(), rte_pmu_add_{event,events_by_pattern}() as it impacts > rte_pmu_read() > performance because more logic needs to be incorporated to handle all corner > cases >- improve documentation slightly >- various other improvements here and there >v14: >- replace __atomic_xxx with rte_atomic_xxx >- rebase to dpdk/main since that's a new feature >v13: >- allow init/fini calling from multiple contexts >- get rid of conditional compilation and return erors in case APIs are > used on unsupported OS >v12: >- rebase old series >- slightly refresh existing documentation >- make sure compiler won't optimize accesses to certain variables during > event readout >- drop previous Acked-by to respin a fresh review cycle >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 | 1 + > app/test/test_pmu.c | 55 +++ > 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 | 34 ++ > doc/guides/prog_guide/trace_lib.rst | 32 ++ > doc/guides/rel_notes/release_24_11.rst | 7 + > lib/eal/common/eal_common_trace.c | 5 +- > lib/eal/common/eal_common_trace_pmu.c | 38 ++ > lib/eal/common/eal_common_trace_points.c | 5 + > lib/eal/common/eal_trace.h | 4 + > lib/eal/common/meson.build | 1 + > lib/eal/include/rte_eal_trace.h | 11 + > lib/eal/meson.build | 3 + > lib/eal/version.map | 1 + > lib/meson.build | 1 + > lib/pmu/meson.build | 22 + > lib/pmu/pmu_arm64.c | 94 ++++ > lib/pmu/pmu_private.h | 32 ++ > lib/pmu/rte_pmu.c | 536 +++++++++++++++++++++++ > lib/pmu/rte_pmu.h | 229 ++++++++++ > lib/pmu/rte_pmu_pmc_arm64.h | 30 ++ > lib/pmu/rte_pmu_pmc_x86_64.h | 24 + > lib/pmu/version.map | 14 + > 26 files changed, 1196 insertions(+), 2 deletions(-) create mode 100644 > app/test/test_pmu.c >create mode 100644 lib/eal/common/eal_common_trace_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
Hi, Did anyone interested have a time to look into latest series?