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
45 stars 13 forks source link

Rework Monitors to mere templates #277

Open cvonelm opened 1 year ago

cvonelm commented 1 year ago

Our zoo of monitors looks very similar: They basically just all own some set of Writers, and then if either the timer fd runs out or a Writer associated fd signals readiness to write, they call writer.write().

I have a feeling that much of the Monitor infrastructure could be reworked into such a one-liner:

GenericMonitor<ThisWriter, ThatWriter, AlsoThisWriter>

without too many asterisks attached, but then again, this might overestimate what C++ templating is capable of.

With many possible NECMonitors, NVidiaMonitors, UncoreMonitors etc. in lo2s' future this might be a worthwhile discussion.