When it comes to determining available events for performance monitoring with tools like "perf," there can sometimes be discrepancies between the Linux source code and the Processor Programming Reference (PPR) documentation. In your case, you have noticed that the event "ic_cache_inval.l2_invalidating_probe" is present in the Linux source code but not listed in the PPR document for your AMD Ryzen 7 4800H CPU.
In such situations, it is generally recommended to prioritize the information provided in the PPR documentation. The PPR is specifically designed to provide accurate and detailed information about the CPU's architecture, performance monitoring counters, and events. It is a reliable source for understanding the specific capabilities and features of your CPU.
However, it's worth noting that the Linux source code can also provide valuable insights, especially when it comes to events that are specific to the Linux kernel's implementation of performance monitoring. In some cases, the Linux kernel may expose additional events or utilize specific names for events that may not be explicitly mentioned in the PPR documentation.
To strike a balance, you can consider referring to both the PPR documentation and the Linux source code. Pay attention to the events listed in the PPR as the primary reference, and if you find events in the Linux source code that are not mentioned in the PPR, you can use them with the understanding that they may be specific to the Linux kernel's implementation.
If you encounter any inconsistencies or uncertainties, reaching out to the AMD support or developer community could provide further clarification and guidance specific to your CPU and the tools you are using.
PC Hardware Specialist