PerfMonComps: A few updates to PerfMonMT
This MR changes the event-level monitoring frequency to be time-based instead of event-number-based. Since the event processing time depends on various factors (specific job, number of threads etc.), it's hard to find a one-size-fits-all solution based on the latter. Traversing through smaps
is fairly costly so one should avoid doing it too frequently. Therefore, now we don't sample more frequently than 30 seconds by default (configurable).
I also dropped explicitly obtaining the thread id in get_thread_cpu_time
and instead use the predefined CLOCK_THREAD_CPUTIME_ID
.