Add support for recent AMD chips including Threadripper Zen+/Zen2 and Ryzen Zen 2
As a bonus I fixed an error message.
Details
- Reviewers
mmacy
Running pmccontrol and pmcstat
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 31529 Build 29133: arc lint + arc unit
Event Timeline
Could you clarify if these files are synced from Linux or generated from the manuals? I wanted to add a few counters that appear in the documentation but are missing from both the Intel and FreeBSD definitions. What would be the best way should we add definitions to the existing files in the correct place or create a new file to track these additions?
Most of it is in Linux's amdzen2 files should I just merge those under a new name? Seems weird they didn't use versioning. Do you have a better plan how to deal with these? (Also is the Linux tree the correct source for these json files?)
Some counters from the Linux repo appear to be undocumented at the moment and I left those out. Also they seem to think some of these are available on earlier platforms but I don't see that in the documentation nor can I test it.
I'm a bit confused. The counter descriptions are just copied from Linux. If you're just copying from there, just add them as is. If you're doing something new then add them as a different file.
Sorry Matthew, if you clarify what you would like to see I'm happy to prepare the diff. Here's three options.
- [Current] I wrote the definitions from AMD PPR 55803 which is the only document I can find for Zen2. I'm assuming the Linux version is based on that so it's similar, but they had a few counters I could not find a reference for.
https://developer.amd.com/wp-content/resources/55803_0.54-PUB.pdf
- Merge the definitions into the correct files in the existing amdfam17h folder. i.e. the core counters will be placed in core.json.
- Create a new folder for the AMD Zen2 definition (called amdzen2) and I'll merge FreeBSD's additional l3cache definitions that don't appear in Linux's repository.
It may be worth while keeping Zen1 & 2 as a single folder, as the Linux repository suggests some Zen2 counters work in prior models.