aboutsummaryrefslogtreecommitdiff
path: root/lib/libpmc/pmu-events
Commit message (Collapse)AuthorAgeFilesLines
* pmc: add alderlaken modelAnaëlle CAZUC2025-12-0411-0/+1865
| | | | | | | | | | This commit adds alderlaken CPU model to hwpmc/libpmc. JSON event definitions are imported from Intel perfmon version 1.16. Reviewed by: mhorne MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D49229
* pmc: add emerald rapids modelAnaëlle CAZUC2025-12-0414-0/+23297
| | | | | | | | | | This commit adds emerald rapids CPU model to hwpmc/libpmc. JSON event definitions are imported from Intel perfmon version 1.06. Reviewed by: mhorne MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D49228
* libpmc: add more alderlake modelsacazuc2025-02-251-0/+3
| | | | | | | | | | | | According to [1], the CPU models 6-{b7,ba,bf} are also alderlake-family models. This patch adds them to the mapfile.csv. [1] https://github.com/torvalds/linux/blob/master/tools/perf/pmu-events/arch/x86/mapfile.csv#L2 Reviewed by: mhorne MFC after: 3 days Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D49126
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* cross-tools: fts has different types for cmp routineWarner Losh2024-05-261-1/+1
| | | | | | | | | | | | | | | | fts has different types for its compare rotuine. Other systems, not 4.4BSD based, have a non-const version. Before we tested against __GLIBC__, but now we test against __linux__ because that's Linux's API and musl doesn't define __GLIBC__. In addition, link against libftl on this platform since musl doesn't include ftl routines in libc, but rather in libftl. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45349
* libpmc: Import AMD Zen 4 PMU eventsAlexander Motin2024-04-2011-1/+3871
| | | | MFC after: 1 week
* jevents: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15Jessica Clarke2024-03-161-1/+1
| | | | | | | | | macOS, like Linux, does not include an outer const qualifier for its fts_open callback arguments, so -Wincompatible-function-pointer-types also picks this up and breaks the build now Clang 16 makes it an error by default. Extend the existing Linux support to fix this. MFC after: 1 week
* jevents: fix bootstrapping on Linux with Clang 16Alex Richardson2023-12-121-0/+4
| | | | | | | | | The glibc fts_open() callback type does not have the second const qualifier and it appears that Clang 16 errors by default for mismatched function pointer types. Add an ifdef to handle this case. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D43000
* dirdeps: Add missing dependency filesStephen J. Kiernan2023-10-291-0/+10
| | | | | Some leaf directories were missing Makefile.depend files or needed architecture-specific Makefile.depend.* files.
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-162-2/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* pmc(3): Correct some typos in event descriptionsGordon Bergling2022-09-046-10/+10
| | | | | | | - s/occured/occurred/ - s/the the/the/ MFC after: 3 days
* libpmc: import updated pmu-events for arm64Mitchell Horne2022-07-06168-4/+10204
| | | | | | | | | | | | | Thanks to the recently updated import of the jevents utility by mav@, we can now compile the latest version of these event definitions. This should support a wider set of common ARMv8 processors, for example, the Cortex-A72 in the Raspberry Pi 4. This brings this folder in sync with Linux commit 62e6eb8d5454. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35549
* pmc(3): Fix a common typo in a descriptionGordon Bergling2022-07-031-1/+1
| | | | | | - s/transistioned/transitioned/ MFC after: 3 days
* libpmc: Disable hardcoding of Intel fixed counters.Alexander Motin2022-05-311-0/+2
| | | | | | | Intel json's now have pretty reasonable fixed counters representation via event=0 and umask. Hardcoded values create more confusion than fix. MFC after: 1 month
* libpmc: jevents: Sync with the latest Linux kernel.Alexander Motin2022-05-3010-233/+569
| | | | | | | commit f4df0dbbe62ee8e4405a57b27ccd54393971c773 Date: Wed May 25 22:04:10 2022 +0800 MFC after: 1 month
* Revert "libpmc: jevents: Partial style(9) pass"Alexander Motin2022-05-301-74/+49
| | | | | | | This file is shared with Linux. Having local style patches does not help with updating it. This reverts commit 3ea691c2612952dc5e6963649ad64312bd6dff4f.
* libpmc: Another update of x86 event definitions.Alexander Motin2022-05-27222-60265/+82830
| | | | MFC after: 1 month
* pmc(3): Fix a common typo in json descriptionsGordon Bergling2022-03-282-12/+12
| | | | | | - s/from from/from/ MFC after: 3 days
* libpmc: Update some x86 event definitions.Alexander Motin2021-11-2590-26682/+32387
| | | | MFC after: 1 month
* libpmc: Import AMD Zen 3 PMU eventsGreg V2021-06-309-0/+1575
| | | | | | Reviewed by: mav, mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30965
* libpmc: remove pe->aliasMitchell Horne2021-05-311-1/+0
| | | | | | | | | | 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
* Fix additional memory leak in process_mapfileEric van Gyzen2020-09-171-0/+2
| | | | | | | | | | | | | | Additional Coverity detected memory leak fix. Submitted by: bret_ketchum@dell.com Reported by: Coverity Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26462 Notes: svn path=/head/; revision=365845
* libpmc: Fix memory leak in process_mapfileEric van Gyzen2020-08-311-0/+3
| | | | | | | | | | | | | | Coverity detected memory leak fix. Submitted by: bret_ketchum@dell.com Reported by: Coverity Reviewed by: cem MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26230 Notes: svn path=/head/; revision=364996
* Update AMD Zen1 and add Zen2 events mapping.Alexander Motin2020-07-1320-938/+2025
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=363157
* Minor textual fixes.Alexander Motin2020-07-131-6/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=363144
* Map family 0x5F (Denverton) to goldmont.Alexander Motin2020-04-241-0/+1
| | | | | | | | | According to the 325462-071US document, they should be the same. MFC after: 1 week Notes: svn path=/head/; revision=360269
* Update x86 countersMatt Macy2020-04-0395-6707/+46804
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=359622
* pmc: Add Hygon Dhyana support.Konstantin Belousov2020-02-071-0/+1
| | | | | | | | | | | | | To make the PMC tool pmcstat working properly on Hygon platform, add support for Hygon Dhyana family 18h by using the PMC initialization code path of AMD family 17h. Submitted by: Pu Wen <puwen@hygon.cn> MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23562 Notes: svn path=/head/; revision=357670
* libpmc: jevents: Go ahead and use snprintf(3)Conrad Meyer2020-01-291-6/+3
| | | | | | | | Reported by: Coverity CID: 1391362 Notes: svn path=/head/; revision=357243
* libpmc: jevents: Partial style(9) passConrad Meyer2020-01-291-49/+74
| | | | | | | | Sort headers, move includes up to the top of the file, function return types on their own line; no functional change. Notes: svn path=/head/; revision=357241
* libpmc: add MIT SPDX tag to header fileEd Maste2019-12-121-0/+1
| | | | | | | | | | | The jevents tool includes a copy of the jsmn json parser which is MIT licensed. Upstream the MIT license appears in the jsmn.c source and a standalone LICENSE file, but the latter is not included in the copy contained in libpmc and the jsmn.h header carried no license information. Add an SPDX tag to clarify the situation. Notes: svn path=/head/; revision=355671
* libpmc: convert s390 events data to proper jsonEd Maste2019-12-1215-15/+15
| | | | Notes: svn path=/head/; revision=355668
* libpmc: convert powerpc event files to proper jsonEd Maste2019-12-1218-1963/+1963
| | | | Notes: svn path=/head/; revision=355667
* libpmc: sort some amdfam17h entries to make valid jsonEd Maste2019-12-122-4/+4
| | | | Notes: svn path=/head/; revision=355666
* libpmc: remove undesired prefix from two s390 countersEd Maste2019-12-122-2/+2
| | | | | | | | | | | Two counters included a prefix 'Counter:###\tName:XXX' in their descriptions that appears to be a leftover from some conversion process. Remove them. Found because a json validator tripped over the tab in the description. Notes: svn path=/head/; revision=355654
* libpmc: convert arm64 data files to proper jsonEd Maste2019-12-116-124/+124
| | | | | | | | | | | | jevents includes a very permissive json parser that accepts invalid json, of which there are many examples in libpmc (typically extra or missing commas). Convert the arm64 files to proper json so other tools can parse them. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355630
* libpmc: jevents: handle empty descriptoinEd Maste2019-11-041-1/+1
| | | | | | | | | | PR: 241258 Reported by: sigsys @ gmail.com Obtained from: github.com/andikleen/pmu-tools commit bb3c77ed61 MFC after: 3 days Notes: svn path=/head/; revision=354342
* Fix warnings with lib/libpmcEnji Cooper2019-04-142-22/+12
| | | | | | | | | | | | | | | | | | | | | | | * Use `MIN` instead of similar hand rolled macro. * Sort headers. * Use `errno.h` instead of `sys/errno.h`. * Wrap the argument to sizeof in parentheses for clarity. * Remove `__BSD_VISIBLE` and `_XOPEN_SOURCE` #defines to mute warnings about incompatible snprintf definitions. This fixes a number of warnings I've been seeing lately in my builds. Sort makefile variables per style.Makefile(9) (`CFLAGS`/`CWARNFLAG.gcc`) and bump `WARNS` to 3. MFC after: 2 weeks Reviewed by: jtl Approved by: jtl (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19851 Notes: svn path=/head/; revision=346196
* Fix deterministic builds by sorting input to fts in jeventsMatt Macy2019-02-051-2/+93
| | | | | | | Reported by: emaste@ Notes: svn path=/head/; revision=343758
* Add aditional counter descriptions to AMD 0x17Matt Macy2018-11-043-0/+8081
| | | | | | | | | Submitted by: Somalapuram Amaranath MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D17401 Notes: svn path=/head/; revision=340108
* Fix get_maxfds() in jeventsAlex Richardson2018-10-291-7/+8
| | | | | | | | | | | | | | | | | If RLIM_INFINITY == -1ULL (such as on macOS) the min() call will result in a value of less than 1 being returned. This causes nftw() to fail with EINVAL. While touching this file also fix includes to work on Linux/macOS and don't declare snprintf since it may have different attributes in the system headers there. Reviewed By: mmacy Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17682 Notes: svn path=/head/; revision=339880
* Add library and kernel support for AMD Family 17h countersMatt Macy2018-08-143-1/+9
| | | | | | | NB: lacks default sample rate for most counters Notes: svn path=/head/; revision=337735
* pmc amd17h: fix inputs to jeventsMatt Macy2018-08-136-4625/+5
| | | | Notes: svn path=/head/; revision=337730
* Add PMC support for AMD Family CPUsMatt Macy2018-08-136-0/+5549
| | | | Notes: svn path=/head/; revision=337729
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-26235-0/+111412
| | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Notes: svn path=/head/; revision=334244
* Revert r334242 "pmc(3)/hwpmc(4): update supported Intel processors to rely ↵Matt Macy2018-05-26235-111412/+0
| | | | | | | | | fully on the" because of squash commit messages Notes: svn path=/head/; revision=334243
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-26235-0/+111412
vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Squashed commit of the following: commit 4459d43eff815bec08ccc5533dbe5de846f03128 Author: Matt Macy <mmacy@mattmacy.io> Date: Sat May 26 00:06:31 2018 -0700 libpmc: fix pmu function signatures for non amd64 commit a2cb8bbc586c65d41f9b291430a2261ec67b59fe Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:38:11 2018 -0700 pmcstat: fix indentation of usage commit f686954b15ff56a833ac80404898977cb80a265b Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:49 2018 -0700 pmclog(3): add callchain and pmcallocatedyn, remove pcsample commit 73e13a0d2e9498c81c150d14d022050cee7511bb Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:00 2018 -0700 pmclog.h: GC pcsample field commit 3e93ffd65da641fa657539dad3c48e281f8b5798 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:05:57 2018 -0700 hwpmc: make Intel core CPUs use external event tables commit 634f5fae1e1644ac324003136c66cd9c619d1c93 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:00:06 2018 -0700 pmclog: update log record types, bump PMC_MAJOR - explicitly make log record types a multiple of 8 bytes - hook in pmu event types for pmc_allocate records - remove references to no longer PCSAMPLE record commit 83d84fcd2d65bdf6ddcb2e155a22f0cfa2a9c225 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 21:52:10 2018 -0700 libpmc: add support for having vendor table driven pmc_allocate commit 9e6ad63c40c2fce8404847ace5078ca6cb33a736 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:11:33 2018 -0700 hwpmc_core: add accessors for EVSEL & UMASK, make IAP_UMASK useful to user commit 859dceb93daa6419a48c794db99b6758e5b041c9 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:09:45 2018 -0700 pmcstat: update usage and man page as well as make -L consistent with pmccontrol commit 79c7d8597e28c2eb13f5f9113e65ec2792ca57b1 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 18:07:03 2018 -0700 pmu_util: add support for all current intel event keywords commit d8089c7f6a6c8527f38324252b1ffb47004694c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:45:00 2018 -0700 add description for new arguments commit 058336740bab53c62ec88a3a026ea848cf3878c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:38:15 2018 -0700 libpmc: move pmu_events table and pmu_utils out of libpmcstat so that they can be used by pmc_allocate commit 049b66b382e2f833c3f47bc8df9e750cb265709f Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:12:41 2018 -0700 pmcstat: hook pmu_events counter description utility routines in commit f5e01e7b37a691dc045e1aa16b3ebdd162515de8 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:11:59 2018 -0700 pmu_events: add utility routines for listing counters and their descriptions commit cba4d4f8907f772279f86f18f915e0d74d33ac56 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:09:50 2018 -0700 pmu-events: expand out skylake regex to simplify string matches Notes: svn path=/head/; revision=334242