Time accounting based on TSC
- as thre are still KERNEL and IDLE entries, time accounting for kernel and idle time works the same as for any other process - everytime we stop accounting for the currently running process, kernel or idle, we read the TSC counter and increment the p_cycles entry. - the process cycles inherently include some of the kernel cycles as we can stop accounting for the process only after we save its context and we start accounting just before we restore its context - this assumes that the system does not scale the CPU frequency which will be true for ... long time ;-)
This commit is contained in:
@@ -25,12 +25,6 @@
|
||||
#define unset_sys_bit(map,bit) \
|
||||
( MAP_CHUNK(map.chunk,bit) &= ~(1 << CHUNK_OFFSET(bit) )
|
||||
|
||||
#ifdef CONFIG_IDLE_TSC
|
||||
#define IDLE_STOP if(idle_active) { read_tsc_64(&idle_stop); idle_active = 0; }
|
||||
#else
|
||||
#define IDLE_STOP
|
||||
#endif
|
||||
|
||||
/* args to intr_init() */
|
||||
#define INTS_ORIG 0 /* restore interrupts */
|
||||
#define INTS_MINIX 1 /* initialize interrupts for minix */
|
||||
|
||||
Reference in New Issue
Block a user