how to know the application run on which core, and run how many times on this core

I have a dual core pc, I write a application with two child process.
I know I can add sched_get_cpu to know the process run on which core, but, it just when the sched_get_cpu is called, it will tell me the result, my quesion is how to know the child proceess spend how many times on one core.

I do not understand your question. Please clarify.

Hope admin delete this post, I will post a new one for my question

Thanks