Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of architectures with PERF_METRICS MSR support #253

Open
willowec opened this issue Dec 3, 2024 · 3 comments
Open

List of architectures with PERF_METRICS MSR support #253

willowec opened this issue Dec 3, 2024 · 3 comments
Assignees

Comments

@willowec
Copy link

willowec commented Dec 3, 2024

Hello,

I am working on a pull request for PAPI in order to add support for directly reading the PERF_METRICS MSR to acquire level 1 and level 2 Topdown Micro-architecture Analysis (TMA) metrics on architectures that support them. I know that this can be detected on a model by model basis by reading the IA32_PERF_CAPABILITIES MSR, but that MSR cannot be read from userspace. Therefore, I am trying to assemble a list of CPUID Family/Model ID's for what processors support the PERF_METRICS MSR so that I can hardcode support.

I have already tried Reading the Intel Software Developer Manual Volume 4. This got me a meager list of 4 Family/Model ID's that support PERF_METRICS: 06_7DH, 06_7EH 06_AAH, and 06_BDH. This list is obviously not comprehensive as it does not include my own machine where I have been developing the component (06_B7H).

I see that in this repository, there is a file for many architectures called '[architecture]_metrics.json'. These files do individually list the events that are used in combination to derive topdown metrics, and it seems like it might be possible to use them to discover whether the PERF_METRICS MSR is supported on that architecture. Am I correct in guessing that, for example, line 60 of alderlake_metrics_goldencove_core.json indicates that the alderlake architecture supports the FETCH_LATENCY field of the PERF_METRICS MSR, and therefore level 2 TMA metrics in hardware? If so, does there already exist a complete list of what architectures support the MSR or should I manually assemble it?

Thank you,
Willow

@willowec
Copy link
Author

willowec commented Dec 4, 2024

After making a script to find all occurrences of each PERF_METRICS entry, I have assembled this list of supported architectures. Is this correct?

Supports TMA level 1 metrics only:

  1. RKL/metrics/rocketlake_metrics.json
  2. ICL/metrics/icelake_metrics.json
  3. TGL/metrics/tigerlake_metrics.json
  4. ICX/metrics/icelakex_metrics.json

Supports TMA levels 1 & 2:

  1. SPR/metrics/sapphirerapidshbm_metrics.json
  2. MTL/metrics/meteorlake_metrics_redwoodcove_core.json
  3. ARL/metrics/arrowlake_metrics_lioncove_core.json
  4. ADL/metrics/alderlake_metrics_goldencove_core.json
  5. GNR/metrics/graniterapids_metrics.json
  6. LNL/metrics/lunarlake_metrics_lioncove_core.json
  7. SPR/metrics/sapphirerapids_metrics.json
  8. EMR/metrics/emeraldrapids_metrics.json

@edwarddavidbaker
Copy link
Contributor

edwarddavidbaker commented Dec 9, 2024

Hi @willowec ,

10th generation Ice Lake core introduced the first iteration of PERF_METRICS.
image

12th generation P-core (Golden Cove core) extends the previous PERF_METRICS.
image

The model specific section of the SDM will also document MSRs. PERF_METRICS is documented directly for ICL in table 2-44.
image

Then the documentation links 11th generation TGL to the prior generation. Where table 2-44 corresponded to ICL.
image


You're tables are correct.

  • Products starting with Ice Lake cores but before Golden Cove cores will support the first iteration of PERF_METRICS.
    • ICL, RKL, TGL.
    • ICX.
  • P-Cores on products starting at Golden Cove core will support the extended PERF_METRICS.
    • ADL (and RPL), MTL, LNL, ARL.
    • SPR, EMR, GNR.

@edwarddavidbaker edwarddavidbaker self-assigned this Dec 9, 2024
@edwarddavidbaker
Copy link
Contributor

I'm assigning this to myself because I noticed a follow-up item in the SDM. The model specific section for 12th and 13th generations link to the previous generation MSR tables. However, it looks like the P-Core table could be updated to mention PERF_METRICS.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants