Bluefield2 provides several performance counters via mlx_pmc driver under /sys/class/hwmon and Performance Monitoring Counters - NVIDIA Docs provides methods to program and access them. I would like to know if there is any way of accessing these performance counters in per-process granualarity. BTW, I have tried perf stat command, which can show per-process performance counters, but it does not have L3 cache information, while under /sys/class/hwmon, there are some L3 cache counters, but they are system-wide, not per-process. Thanks!
According to Cortex A72 manual, there is no L3 cache-related counters for Cortex A72, which is why perf stat will not work if we want to view L3 cache-related counters. Then my question is if there is any method to access the counters under /sys/class/hwmon(the counters are provided by mlx_pmc driver and include L3 cache-related ones, PCIe, etc.) at per-core/per-process granualrity so we can access L3 cache counters even if perf stat does not provide them. I have tried to program and view these counters based on the instructions in Performance Monitoring Counters - NVIDIA Docs, but theses counters seem to be system-wide, is there any methods that I haven’t noticed to help me view them for each core/each process, or just simply no methods to do this? Thanks.