UoB-HPC / SimEng

The University of Bristol HPC Simulation Engine
https://uob-hpc.github.io/SimEng
Apache License 2.0
86 stars 15 forks source link

Add framework for collecting hardware counters and other performance metrics #25

Open jrprice opened 5 years ago

jrprice commented 5 years ago

Simple things like IPC, stalls, flushes can easily be built into the core code (and currently are). We may want to consider exposing some interfaces that would enable third-party code (plugins?) to observe the simulation to collect additional metrics, whilst keeping the core SimEng codebase clean. This approach could be used to generate additional performance-related hardware counters, but potentially also for things like power/thermal modelling.

simonmcs commented 5 years ago

Sounds good. One of the best things for us to leverage is PAPI, as there's a whole ecosystem ready to consume, analyse and display these counters, mostly for real hardware:

https://icl.cs.utk.edu/projects/papi/wiki/Introduction_to_PAPI-C

There may well be other 3rd party APIs for further metrics which might prove useful too. But the nice thing about PAPI is that it's extensible, so we could expose all the internal counters we want to this way, far more than you can afford to do in real hardware.