path: root/release
diff options
authorMitchell Horne <mhorne@FreeBSD.org>2023-09-27 16:37:46 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2023-09-27 16:39:56 +0000
commitc362fe939f6fe52056fb7506be9e5cbd0a5ef60b (patch)
treebb428c99da5259a643713fdeab2eab1c09c6e0b5 /release
parentda695970cee95d0b460c451d5ff9c2cea04f1b73 (diff)
pmcstat: fix duplicate event allocation on CPU 0HEADmain
Commit b6e28991bf3a modified the allocation path for system scope PMCs so that the event was allocated early for CPU 0. The reason is so that the PMC's capabilities could be checked, to determine if pmcstat should allocate the event on every CPU, or just on one CPU in each NUMA domain. In the current scheme, there is no way to determine this information without performing the PMC allocation. This broke the established use-case of log analysis, and so 0aa150775179a was committed to fix the assertion. The result was what appeared to be functional, but in normal counter measurement pmcstat was silently allocating two counters for CPU 0. This cuts the total number of counters that can be allocated from a CPU in half. Additionally, depending on the particular hardware/event, we might not be able to allocate the same event twice on a single CPU. The simplest solution is to release the early-allocated PMC once we have obtained its capabilities, and reallocate it later on. This restores the event list logic to behave as it has for many years, and partially reverts commit b6e28991bf3a. Reported by: alc, kevans Reviewed by: jkoshy, ray MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41978
Diffstat (limited to 'release')
0 files changed, 0 insertions, 0 deletions