I need to find out how many CPU cores a given process has executed on during a certain time e.g 1 second or so? This has to be done from a C program (or possibly C++). I know that perf presents the number of I need to find out how many CPU cores a given p