I am trying to measure the CPU time accurately used by a process in the schedule function through
sched_info_depart() and sched_info_arrive(), but most of time the calculated CPU time is zero.
As in one tick (jiffy increments) many processes are scheduled, it is not able to measure accurately the CPU time used by the all scheduled process since the measurement time is based on jiffies incrementation.
Most output got from relayfs shows that CPU time is zero as:
PID : Name: Jiffies : CPU Time
4353 : Xorg: 152680 : 0
4521 : artsd: 152680 : 0
4353 : Xorg: 152680 : 0
How can I measure the CPU time used by all processes in one tick?
Yahoo! Acesso Grátis
Internet rápida e grátis. Instale o discador agora!