Autogenerate Intel pcbe values from perfmon data
Every CPU generation that Intel puts out has its own set of CPU Performance Counters that it uses for measuring various CPU events. These change from CPU core to CPU core and are explicitly considered in the SDM as non-architectural. These events are all encoded in the core_pcbe kernel module and need to be updated and kept in sync with Intel. Rather than trying to manually sync this data up, we should leverage the perfmon data that Intel has put together and referenced in the SDM. This allows us to go through and add support for several platforms based on Intel's data as an authoritative source.
This change imports the perfmon JSON blobs and then adds a tool to the build cpcgen which is transform this data. At this time only a subset of the data is encoded and used. As we add support for reading and understanding off core events and other types of data, then we can leverage this information.
All in all this should simplify the act of adding support for new Intel platforms.
I've tested this by booting non-debug and debug builds, looking at all the counters to see that we're getting the ones appropriate for the platform, and running some of them on various systems to see that they're actually firing and incrementing. I'll be honest that I haven't exhaustively tested a lot of the counters.
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
commit 7e3dbbac48aaad67ac841ba479a67a2081d6a02b Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2019-01-21T02:29:42.000Z 10212 Autogenerate Intel pcbe values from perfmon data Reviewed by: Jason King <email@example.com> Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>