Intel vTune seems to be able to measure performance counters on a per-process basis.
In the same vein, how can we use the Intel PCM library to get the measurements of the counters but filtered based on process id?