I'd like to analyze how the processing time are distributed to individual CPU for a process ( KVM actually). In Linux a task can be migrated to other CPU during its life-cycle, the process may run in CPU0 for 1 sec then in CPU1 for 2 sec, but we can only get the overall processing time(3 sec) from /proc/pid/stat, but not 1sec and 2sec.
And we can get the per CPU aggregate processing time for all process in /proc/stat, but not for a particular process e.g. a KVM.
There are also some scheduling statics in /proc/pid/schedstat and /proc/schedstat, but I'm not clear how to derive it from statics like number of migrations.
This problem is also covered in the virt-top document, I think there is still no clear solution.
Do you have any ideas?