Embodiments of apparatuses, methods, and systems for virtualizing performance counters are disclosed. In one embodiment, an apparatus includes a counter, a counter enable storage location, counter enable logic, and virtual machine control logic. The counter enable storage location is to store a coun
Embodiments of apparatuses, methods, and systems for virtualizing performance counters are disclosed. In one embodiment, an apparatus includes a counter, a counter enable storage location, counter enable logic, and virtual machine control logic. The counter enable storage location is to store a counter enable indicator. The counter enable logic is to enable the counter based on the counter enable indicator. The virtual machine control logic is to transfer control of the apparatus to a guest. The virtual machine control logic includes guest state load logic to cause a guest value from a virtual machine control structure to be loaded into the counter enable storage location in connection with a transfer of control of the apparatus to the guest.
대표청구항▼
1. An apparatus comprising: a memory to store a plurality of counters and a counter enable storage location to store: one or more counter enable bits or fields, each of which corresponds to, and is to control, one or more of the plurality of counters; andone or more additional enable indicators, eac
1. An apparatus comprising: a memory to store a plurality of counters and a counter enable storage location to store: one or more counter enable bits or fields, each of which corresponds to, and is to control, one or more of the plurality of counters; andone or more additional enable indicators, each of which corresponds to, and is to control, a respective subset of the one or more counter enable bits or fields; anda processor to communicate with the memory to: enable a counter among the plurality of counters responsive to: a counter enable bit or field, among a first subset of the one or more counter enable bits or fields and corresponding to the counter, being configured to a respective enable value, andan additional enable indicator, among the one or more additional enable indicators and corresponding to the first subset, being configured to a respective enable value,disable the counter responsive to a configuration to a disable value of at least one of the counter enable bit or field or the additional enable indicator,provide virtualization for the plurality of counters,cause a guest value or a host value to be loaded into the counter enable storage location in connection with a transfer of control between a host and a guest, andtransfer control of the apparatus from the host to the guest if the guest value is loaded and from the guest to the host if the host value is loaded. 2. The apparatus of claim 1, wherein the processor is further to disable use of the counter by the host responsive to the guest value being in the counter enable bit or field or the additional enable indicator. 3. The apparatus of claim 1, wherein the plurality of counters comprises performance counters to log performance monitor information. 4. The apparatus of claim 1, wherein the plurality of counters comprises performance counters to count a selected event. 5. The apparatus of claim 1, wherein the selected event is selected from a branch misprediction, a cache hit, a cache miss, a translation lookaside buffer hit, and a translation lookaside buffer miss. 6. The apparatus of claim 1, wherein the processor is further to: cause the guest value to be loaded into the counter enable storage location in connection with the transfer of control from the host to the guest; andtransfer control of the apparatus from the host to the guest. 7. The apparatus of claim 1, wherein the processor is further to: cause the host value to be loaded into the counter enable storage location in connection with the transfer of control from the guest to the host; andtransfer control of the apparatus from the guest to the host. 8. A non-transitory computer-readable storage medium having instructions stored thereon that, when executed by a processor, cause the processor to: enable a counter among a plurality of counters responsive to: a counter enable bit or field, corresponding to the counter, being configured to a respective enable value, andan additional enable indicator, corresponding to the counter enable bit or field, being configured to a respective enable value; anddisable the counter, by the processor in an apparatus, responsive to configuration to a disable value of at least one of the counter enable bit or field or the additional enable indicator;provide virtualization for the plurality of counters;cause a guest value or a host value to be loaded into a counter enable storage location in connection with a transfer of control between a host and a guest; andtransfer control of the apparatus from the host to the guest if the guest value is loaded and from the guest to the host if the host value is loaded. 9. The computer-readable storage medium of claim 8, wherein the instructions are further to cause the processor to disable use of the counter by the host responsive to the guest value being in the counter enable bit or field or the additional enable indicator. 10. The computer-readable storage medium of claim 8, wherein the plurality of counters comprises performance counters to log performance monitor information. 11. The computer-readable storage medium of claim 8, wherein the plurality of counters comprises performance counters to count a selected event. 12. The computer-readable storage medium of claim 11, wherein the selected event is selected from a branch misprediction, a cache hit, a cache miss, a translation lookaside buffer hit, and a translation lookaside buffer miss. 13. The computer-readable storage medium of claim 8, wherein the instructions are further to cause the processor to: cause the guest value to be loaded into the counter enable storage location in connection with the transfer of control from the host to the guest; andtransfer control of the apparatus from the host to the guest. 14. The computer-readable storage medium of claim 8, wherein the instructions are further to cause the processor to: cause the host value to be loaded into the counter enable storage location in connection with the transfer of control from the guest to the host; andtransfer control of the apparatus from the guest to the host. 15. A method comprising: enabling a counter among a plurality of counters responsive to: a counter enable bit or field, corresponding to the counter, being configured to a respective enable value, andan additional enable indicator, corresponding to the counter enable bit or field, being configured to a respective enable value; anddisabling the counter, by a processor in an apparatus, responsive to configuration to a disable value of at least one of the counter enable bit or field or the additional enable indicator;providing virtualization for the plurality of counters;causing a guest value or a host value to be loaded into a counter enable storage location in connection with a transfer of control between a host and a guest; andtransferring control of the apparatus from the host to the guest if the guest value is loaded and from the guest to the host if the host value is loaded. 16. The method of claim 15, further comprising disabling use of the counter by the host responsive to the guest value being in the counter enable bit or field or the additional enable indicator. 17. The method of claim 15, wherein the plurality of counters comprises performance counters to log performance monitor information. 18. The method of claim 15, wherein the plurality of counters comprises performance counters to count a selected event, wherein the selected event is selected from a branch misprediction, a cache hit, a cache miss, a translation lookaside buffer hit, and a translation lookaside buffer miss. 19. The method of claim 15, further comprising: causing the guest value to be loaded into the counter enable storage location in connection with the transfer of control from the host to the guest; andtransferring control of the apparatus from the host to the guest. 20. The method of claim 15, further comprising: causing the host value to be loaded into the counter enable storage location in connection with the transfer of control from the guest to the host; andtransferring control of the apparatus from the guest to the host. 21. A processor comprising: a plurality of counters;counter control storage locations to store a plurality of counter enable bits or fields, wherein each of the counter enable bits or fields corresponds to one of the plurality of counters;a global counter enable storage location to store a global counter enable indicator;counter enable logic to: enable a counter among the plurality of counters in response to a respective enable value being set in: a counter enable bit or field, among the plurality of counter enable bits or fields and corresponding to the counter, andthe global counter enable indicator; anddisable the counter in response to a disable value being set in at least one of the counter enable bit or field or the global counter enable indicator; andcontrol logic to: support virtualization for the plurality of counters; andenable assignment of the plurality of counters for exclusive use by a host or a guest. 22. The processor of claim 21, wherein the counter control storage locations are further to store information to configure the plurality of counters to count corresponding events. 23. The processor of claim 22, wherein the corresponding events comprise one or more of a cache miss, a cache hit, a branch misprediction, a translation lookaside buffer hit, or a translation lookaside buffer miss. 24. A handheld device comprising: a memory to store monitor software or firmware to manage an execution environment for guest software; anda processor to communicate with the memory to: store a plurality of counters,store a plurality of counter enable bits or fields in respective counter control storage locations, wherein each of the counter enable bits or fields corresponds to one of the plurality of counters,store a global counter enable indicator in a global counter enable storage location,enable a counter among the plurality of counters in response to a respective enable value being set in: a counter enable bit or field, among the plurality of counter enable bits or fields and corresponding to the counter, andthe global counter enable indicator;disable the counter in response to a disable value being set in at least one of the counter enable bit or field or the global counter enable indicator;support virtualization for the plurality of counters; andenable assignment of the plurality of counters for exclusive use by a host or a guest. 25. The handheld device of claim 24, wherein the processor is further to store information to configure the plurality of counters to count corresponding events. 26. The handheld device of claim 25, wherein the corresponding events comprise one or more of a cache miss, a cache hit, a branch misprediction, a translation lookaside buffer hit, or a translation lookaside buffer miss.
연구과제 타임라인
LOADING...
LOADING...
LOADING...
LOADING...
LOADING...
이 특허에 인용된 특허 (12)
Pannell Bobby L. (P.O. Box 116968 Carrollton TX 75007), Air conditioning system for a recreational vehicle.
DeWitt, Jr.,Jimmie Earl; Levine,Frank Eliot; Richardson,Christopher Michael; Urquhart,Robert John, Method and apparatus for autonomically initiating measurement of secondary metrics based on hardware counter values for primary metrics.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.