]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gprofng: add hardware counters for AMD Zen3
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 17 May 2024 04:00:51 +0000 (21:00 -0700)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Sat, 18 May 2024 01:28:05 +0000 (18:28 -0700)
commitee7af0e7107e918d37bd2686fea1db8f88d2242a
tree12897d98828474dcde1099595921b4e344305bea
parent663741df74f975ca00de84ba17d2cd8417bb1d03
gprofng: add hardware counters for AMD Zen3

Historically, we have used several APIs (perfctr, libcpc, perf_event_open) for profiling.
For each hardware we have several tables of hardware counters.
Some information is duplicated in these tables.
Some of the information is no longer used.
I did not touch the existing hwc tables.
I added a new hwc table for an AMD Zen3 machine.

ChangeLog
2024-05-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/31123
* common/core_pcbe.c (core_pcbe_get_events): Add new argument.
* common/hwc_cpus.h: New constants for AMD hardware.
* common/hwcdrv.c: Add new argument to hwcdrv_get_descriptions.
Clean up the code.
* common/hwcdrv.h: Likewise.
* common/hwcfuncs.c (hwcdrv_get_descriptions): Add new argument.
* common/hwctable.c: Add the hwc table for AMD Zen3.
* src/hwc_amd_zen3.h: New file.
* common/opteron_pcbe.c: Add new argument to opt_pcbe_get_events.
* src/collctrl.cc: Remove unused variable.
* src/collctrl.h: Likewise.
gprofng/common/core_pcbe.c
gprofng/common/hwc_cpus.h
gprofng/common/hwcdrv.c
gprofng/common/hwcdrv.h
gprofng/common/hwcfuncs.c
gprofng/common/hwctable.c
gprofng/common/opteron_pcbe.c
gprofng/src/collctrl.cc
gprofng/src/collctrl.h
gprofng/src/hwc_amd_zen3.h [new file with mode: 0644]