| 3c01f741 | 30-Sep-2021 |
Mitchell Horne <[email protected]> |
libpmc: add some AMD pmu counter aliases
Make it mostly compatible with what's defined for Intel. Except where noted, these are defined for all of amdzen(1|2|3).
Reviewed by: emaste MFC after: 1 we
libpmc: add some AMD pmu counter aliases
Make it mostly compatible with what's defined for Intel. Except where noted, these are defined for all of amdzen(1|2|3).
Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32162
(cherry picked from commit a20c10893eb17e281f119d1b9b39c175dbf4d7bd)
show more ...
|
| 83166f87 | 19-May-2021 |
Mitchell Horne <[email protected]> |
arm64 support for pmu-events
8cc3815f: hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE
Make it possible to specify event codes without an offset of PMC_EV_ARMV8_FIRST, by setting a machi
arm64 support for pmu-events
8cc3815f: hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE
Make it possible to specify event codes without an offset of PMC_EV_ARMV8_FIRST, by setting a machine-dependent flag. This is required to make use of event definitions from pmu-events.
Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30602
28dd6730: libpmc: enable pmu_utils on arm64
This allows supported libpmc to query/select from the pmu-events table, which may have a more complete set of events than what we define manually. A future update to these definitions should greatly improve this support. The alias table is empty for now, until this future import is complete.
Add the Foundation's copyright for recent work on this file.
Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30603
27ea55fc: libpmc/hwpmc: fix issues with arm64 pmu-events support
Due to a mis-merge, the changes committed to libpmc never called pmu_parse_event(), or set pm->pm_ev. However, this field shouldn't be used to carry the actual pmc event code anyway, as it is expected to contain the index into the pmu event array (otherwise, it breaks event name lookup in pmclog_get_event()). Add a new MD field, pm_md.pm_md_config, to pass the raw event code to arm64_allocate_pmc().
Additionally, the change made to pmc_md_op_pmcallocate was incorrect, as this is a union, not a struct. Restore the proper padding size.
Reviewed by: luporl, ray, andrew Fixes: 28dd6730a5d6 ("libpmc: enable pmu_utils on arm64") Fixes: 8cc3815f02be ("hwpmc_arm64: accept raw event codes...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31221
(cherry picked from commit 8cc3815f02be9fa2a96e47713ad989e6d787e12a) (cherry picked from commit 28dd6730a5d6bc73aca4c015c0ff875a9def25ac) (cherry picked from commit 27ea55fc655b0081f760a34ff5dd5526ba02a0fb)
show more ...
|
| 87c9a293 | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: make libpmc_pmu_utils.c more amenable to porting
The current version has every function stubbed out for !x86. Only two functions (pmu_alias_get() and pmc_pmu_pmcallocate() are really platfor
libpmc: make libpmc_pmu_utils.c more amenable to porting
The current version has every function stubbed out for !x86. Only two functions (pmu_alias_get() and pmc_pmu_pmcallocate() are really platform dependent, so reduce the width of the ifdefs and remove some of the stubs.
Reviewed by: ray MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30532
(cherry picked from commit 0024f1aa7720d5f4f587a6c5911fc5238195ae49)
show more ...
|
| 6911f398 | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: limit pmu-events to 64-bit powerpc
Although currently unused, there are only pmu event definitions for POWER8 and POWER9. There is no sense in building these on 32-bit platforms.
Sponsored
libpmc: limit pmu-events to 64-bit powerpc
Although currently unused, there are only pmu event definitions for POWER8 and POWER9. There is no sense in building these on 32-bit platforms.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 507d68984a010dab0c3ecc5477c36526c3a7fa48)
show more ...
|
| 440e5ecb | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: use $MACHINE_CPUARCH
This is preferred over $MACHINE_ARCH for these types of checks, although it makes no difference for amd64 or i386. No functional change intended.
Sponsored by: The Free
libpmc: use $MACHINE_CPUARCH
This is preferred over $MACHINE_ARCH for these types of checks, although it makes no difference for amd64 or i386. No functional change intended.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 3864da302af34853ddb2c33a42de5668a0d68cdd)
show more ...
|
| b040b03d | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: eliminate pmc_pmu_stat_mode()
There is a single consumer, the pmc utility, that clearly has knowledge of which counters it is expecting. Remove this function and have it use common counter a
libpmc: eliminate pmc_pmu_stat_mode()
There is a single consumer, the pmc utility, that clearly has knowledge of which counters it is expecting. Remove this function and have it use common counter aliases instead.
Reviewed by: gnn MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30528
(cherry picked from commit ec66cc955b629e614cf493bf168048de033f6a2c)
show more ...
|
| 3a9b3a84 | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: remove pe->alias
It has never been a part of upstream's struct pmu_event. The jevents utility will not fill this field, so remove it.
Reviewed by: gnn MFC after: 2 weeks Sponsored by: The F
libpmc: remove pe->alias
It has never been a part of upstream's struct pmu_event. The jevents utility will not fill this field, so remove it.
Reviewed by: gnn MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30530
(cherry picked from commit 0c915023dbb7000cd30bb768eb84f6dc757adcc5)
show more ...
|
| b44f0bd4 | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: always generate libpmc_events.c
The jevents build tool will create an empty table if it doesn't find any events, so we can remove the extra $MACHINE_CPUARCH checks.
Reviewed by: gnn, ray, e
libpmc: always generate libpmc_events.c
The jevents build tool will create an empty table if it doesn't find any events, so we can remove the extra $MACHINE_CPUARCH checks.
Reviewed by: gnn, ray, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30531
(cherry picked from commit 689c7e7975cdee38ca6fd60ad3372d55c43c948c)
show more ...
|
| b85044ce | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: remove unused 'isfixed' variable
Reviewed by: gnn, emaste MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30529
(cherry picked fro
libpmc: remove unused 'isfixed' variable
Reviewed by: gnn, emaste MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30529
(cherry picked from commit 0092642f863946ee1edc88fa634887d7c8a54656)
show more ...
|
| eae121b1 | 31-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: fix "instructions" alias on Intel
The typo prevents the counter from being allocated.
This fixes e.g. pmcstat -s instructions sleep 5
Reviewed by: mizhka, gnn, ray, emaste MFC after: 5 day
libpmc: fix "instructions" alias on Intel
The typo prevents the counter from being allocated.
This fixes e.g. pmcstat -s instructions sleep 5
Reviewed by: mizhka, gnn, ray, emaste MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30527
(cherry picked from commit bc1a6a9d692a1f827514144b6bce0654a8be4f4d)
show more ...
|
| dfb4fb41 | 13-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: fall-back to kernel tables if pmu-events fails
On x86, the pmu_events table is the source of truth for finding supported events. However, events not found there may still be present in the k
libpmc: fall-back to kernel tables if pmu-events fails
On x86, the pmu_events table is the source of truth for finding supported events. However, events not found there may still be present in the kernel's static event tables. For example, the pmc.soft(3) events will never be available from pmu-events.
Update pmc_allocate() to search the legacy event tables if pmc_pmu_pmcallocate() fails to return a result. This allows both event sources to be consulted before giving up, thus restoring pmc.soft(3) and pmc.tsc(3) on x86.
Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30216
(cherry picked from commit dfdc57e8aa8ba4b4e4484f736e8c7645ab69b54a)
show more ...
|
| 57caeb51 | 13-May-2021 |
Mitchell Horne <[email protected]> |
libpmc: remove PMC_MDEP_TABLE logic
This logic was added for handling some of the complicated relationships between events and x86 CPU models. Since that logic has been mostly removed from libpmc(3)
libpmc: remove PMC_MDEP_TABLE logic
This logic was added for handling some of the complicated relationships between events and x86 CPU models. Since that logic has been mostly removed from libpmc(3) in favor of pmu-events, this no longer serves much of a purpose. Mapping CPU types to event tables is already handled by the switch statement in pmc_init().
Reviewed by: ray, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30196
(cherry picked from commit da13ef6aa0565c8d79326bba5606671062033bbf)
show more ...
|