Recording a number of page faults, context switches, and interrupts