Patent ID: 9069891
Filing Date: 2015-06-30
Classification: G06F

Abstract:
1. A device for supporting hardware enabled performance counters with support for context switching, comprising: a plurality of performance counters operable to collect information associated with one or more computer system related activities; a first register associated with a performance counter unit that implements the performance counters, the first register operable to store a memory address; a second register operable to store a mode indication, the mode indication comprising at least whether to switch out contents of the performance counters, whether to switch in contents of the performance counter, or both, the operating system writing the mode indication to initiate a copy; and a hardware state machine operable to read the second register and cause the plurality of performance counters to copy the information to memory area indicated by the memory address written into the first register by an operating system, based on the mode indication, wherein the hardware state machine automatically saves and restores data associated with all of the performance counters implemented by the performance counter unit, while the operating system performs other tasks associated with the context switching.