Method of virtualizing counter in computer system
원문보기
IPC분류정보
국가/구분
United States(US) Patent
등록
국제특허분류(IPC7판)
G06F-009/455
출원번호
UP-0270113
(2005-11-08)
등록번호
US-7788664
(2010-09-20)
발명자
/ 주소
Janakiraman, Gopalakrishnan
Menon, Aravind
Santos, Jose Renato
Turner, Yoshio Frank
출원인 / 주소
Hewlett-Packard Development Company, L.P.
인용정보
피인용 횟수 :
17인용 특허 :
8
초록▼
An embodiment of a method of virtualizing a counter in a computer system comprises a first step and iterative performance of second through fifth steps. In the first step, a virtual machine monitor programs a hardware event counter with an initial count for a profiling event for a virtual machine. I
An embodiment of a method of virtualizing a counter in a computer system comprises a first step and iterative performance of second through fifth steps. In the first step, a virtual machine monitor programs a hardware event counter with an initial count for a profiling event for a virtual machine. In the second step, the virtual machine monitor saves a suspension count and disables the hardware event counter upon suspending operation of the virtual machine. In the third step, the virtual machine monitor programs the hardware event counter with the suspension count upon resuming the operation of the virtual machine. Upon receiving an interrupt from the hardware event counter that provides notification of reaching the initial count, the virtual machine monitor performs the fourth and fifth steps. In the fourth step, the virtual machine monitor saves a sample that comprises an event identifier and a code-in-execution indicator. In the fifth step, the virtual machine monitor reprograms the hardware event counter with the initial count.
대표청구항▼
What is claimed is: 1. A method of virtualizing a counter in a computer system comprising the steps of: a virtual machine monitor: programming a hardware event counter with an initial count which is a specific count number that must be reached before the hardware event counter generates an interrup
What is claimed is: 1. A method of virtualizing a counter in a computer system comprising the steps of: a virtual machine monitor: programming a hardware event counter with an initial count which is a specific count number that must be reached before the hardware event counter generates an interrupt for a profiling event for a virtual machine; and iteratively performing the steps of: using a virtual machine monitor to suspend operation of the virtual machine while processor time and memory space is allocated to another virtual machine, and upon suspending operation of the virtual machine, saving a suspension count representing a then present count number of the hardware event counter and disabling the hardware event counter; upon resuming the operation of the virtual machine, programming the hardware event counter with the suspension count; and upon receiving an interrupt to the virtual machine from the hardware event counter that provides notification of reaching the initial count: saving a sample that comprises an event identifier identifying an event type of the profiling event and a code-in-execution indicator representing an instruction that was executing when the initial count was reached; and reprogramming the hardware event counter with the initial count. 2. The method of claim 1 wherein the step of programming the hardware event counter further comprises programming the hardware event counter with the event identifier identifying the event type of the profiling event to count an event type. 3. The method of claim 2 wherein the step of programming the hardware event counter with the suspension count further comprises programming the hardware event counter with the event type. 4. The method of claim 1 wherein the step of programming the hardware event counter with the initial count is in response to a request by the virtual machine. 5. The method of claim 1 wherein the sample further comprises an operating mode identifier. 6. The method of claim 5 wherein the operating mode identifier is selected from a hypervisor mode, a kernel mode, and a user mode. 7. The method of claim 1 further comprising the step of the virtual machine accessing the sample. 8. The method of claim 7 wherein the code-in-execution indicator comprises a program counter at a time of the interrupt. 9. The method of claim 8 further comprising the virtual machine decrementing the program counter to determine an event-associated instruction. 10. The method of claim 9 further comprising the virtual machine saving a modified sample including a larger section of code than just the instruction that was executing when the initial count was reached. 11. The method of claim 10 wherein the modified sample comprises the event identifier and the event-associated instruction identifier. 12. The method of claim 10 further comprising the virtual machine flushing the modified sample to storage. 13. The method of claim 12 further comprising the step of performing a statistical analysis upon a series of modified samples. 14. The method of claim 7 further comprising the virtual machine correlating the code-in-execution indicator to particular computer code. 15. The method of claim 14 wherein the particular computer code is selected from a particular software module, a particular function, a particular group of instructions, and a particular instruction. 16. The method of claim 1 wherein the interrupt is a non-maskable interrupt. 17. The method of claim 1 wherein the step of the virtual machine monitor saving the sample saves the sample in a buffer. 18. The method of claim 1 wherein the profiling event is selected from performance events, debug events, error events, and security violation events. 19. The method of claim 1 wherein the profiling event is selected from executed instructions, clock cycles, cache events, cache hits, cache misses, virtual memory translation look-aside buffer events, virtual memory translation look-aside buffer hits, virtual memory translation look-aside buffer misses, and branch events. 20. A method of virtualizing a counter in a computer system comprising the steps of a virtual machine monitor: programming a hardware event counter with an initial count which is a specific count number that must be reached before the hardware event counter generates an interrupt for a profiling event while each of a plurality of virtual machines operate; and iteratively performing the steps of: using a virtual machine monitor to suspend operation of the virtual machine while processor time and memory space is allocated to another virtual machine, and upon suspending operation of the virtual machine, saving a suspension count representing a then present count number of the hardware event counter and disabling the hardware event counter; upon resuming the operation of the virtual machine, programming the hardware event counter with the suspension count; and upon receiving an interrupt to the virtual machine from the hardware event counter that provides notification of reaching the initial count: saving a sample that comprises an event identifier identifying an event type of the profiling event and a code-in-execution indicator representing an instruction that was executing when the initial count was reached; and reprogramming the hardware event counter with the initial count. 21. The method of claim 20 wherein the initial count for a first virtual machine is different from the initial count for a second virtual machine. 22. The method of claim 20 wherein the profiling event for a first virtual machine is different from the profiling event for a second virtual machine. 23. A computer system including non-transitory computer hardware having executable instructions stored thereon which are executed for implementing a method of virtualizing a counter in the computer system, the method of virtualizing the counter comprising the steps of: a virtual machine monitor: programming a hardware event counter with an initial count which is a specific count number that must be reached before the hardware event counter generates an interrupt for a profiling event for a virtual machine; and iteratively performing the steps of: using a virtual machine monitor to suspend operation of the virtual machine while processor time and memory space is allocated to another virtual machine, and upon suspending operation of the virtual machine, saving a suspension count representing a then present count number of the hardware event counter and disabling the hardware event counter; upon resuming the operation of the virtual machine, programming the hardware event counter with the suspension count; and upon receiving an interrupt to the virtual machine from the hardware event counter that provides notification of reaching the initial count: saving a sample that comprises an event identifier identifying an event type of the profiling event and a code-in-execution indicator representing an instruction that was executing when the initial count was reached; and reprogramming the hardware event counter with the initial count. 24. A computer system including non-transitory computer hardware having executable instructions stored thereon which are executed for implementing a method of virtualizing a counter in the computer system, the method of virtualizing the counter comprising the steps of: a virtual machine monitor: programming a hardware event counter with an initial count for a profiling event while each of a plurality of virtual machines operate; and iteratively performing the steps of: using a virtual machine monitor to suspend operation of the virtual machine while processor time and memory space is allocated to another virtual machine, and upon suspending operation of the virtual machine, saving a suspension count representing a then present count number of the hardware event counter and disabling the hardware event counter; upon resuming the operation of the virtual machine, programming the hardware event counter with the suspension count; and upon receiving an interrupt to the virtual machine from the hardware event counter that provides notification of reaching the initial count: saving a sample that comprises an event identifier identifying an event type of the profiling event and a code-in-execution indicator representing an instruction that was executing when the initial count was reached; and reprogramming the hardware event counter with the initial count.
Record Stephen E. (Ridgefield CT) Shepherd Ann M. (Endwell NY) Shultz Steven S. (Endicott NY), Dynamically established event monitors in event management services of a computer system.
Alpert Donald (Santa Clara CA) Hammond Gary N. (Campbell CA), Method and apparatus for providing breakpoints on taken jumps and for providing software profiling in a computer system.
Berry, Robert Francis; Hussain, Riaz Y.; Levine, Frank Eliot; Urquhart, Robert J., Method and system for SMP profiling using synchronized or nonsynchronized metric variables with support across multiple systems.
Wadsworth Robert D. (Costa Mesa CA) Ip Tony K. (Trabuco Canyon CA) Danknick Daniel A. (Orange CA) Russell William C. (Laguna Hills CA), Serial port using non-maskable interrupt terminal of a microprocessor.
Jones, Scott T.; Kuiper, Kean G.; Levine, Frank E.; Pineda, Enio M., Performing call stack sampling by setting affinity of target thread to a current process to prevent target thread migration.
Kowalski, Marcin Piotr; Richardson, David R.; Greenfield, James Alfred Gordon; Van Der Merwe, Jacobus Johannes Nicolaas; Eddey, Matthew James; De Kadt, Christopher Richard Jacques; Desantis, Peter Nicholas, Profile-guided data preloading for virtualized resources.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.