tud-zih-energy / lo2s

Linux OTF2 Sampling - A Lightweight Node-Level Performance Monitoring Tool
https://tu-dresden.de/zih/forschung/projekte/lo2s?set_language=en
GNU General Public License v3.0
46 stars 13 forks source link

Rip pmu-events out of tools/perf #305

Closed cvonelm closed 11 months ago

cvonelm commented 11 months ago

pmu-events is the gold mine that contains all the information perf has about all the events it knows from every architecture it supports.

The way it works is that it has a set of JSON files describing all events. A python script then generates one huge C file from these JSON files which a bunch of helpers which can be used to retrieve event information based on architecture and CPU model.

With this we get

A quick and dirty hack shows that the amount of functions that we have to rip out of the kernel to make it standalone is relatively small. Atleast for x86 (there is some architecture dependent stuff in it) I've managed to get it to work very fast.

cvonelm commented 11 months ago

I was blinded by my excitement. This does nothing that libpfm cant do better