Recording CPU Time for Sample Of Computing Thread Based On CPU Use State Of Activity Associated With The Sample

Uloženo v:
Podrobná bibliografie
Název: Recording CPU Time for Sample Of Computing Thread Based On CPU Use State Of Activity Associated With The Sample
Document Number: 20160170798
Datum vydání: June 16, 2016
Appl. No: 14/660591
Application Filed: March 17, 2015
Abstrakt: Computing threads can be sampled such that the samples hit each activity with a probability proportional to a time period of that activity. Therefore, the sampling can advantageously account for all activities, including activities that are smaller than the applicable sampling interval.
Claim: 1. A method comprising: receiving, by at least one processor, a computing thread characterizing a portion of a plurality of activities of a computer program; identifying, by the at least one processor, the plurality of activities associated with the computing thread; sampling, by the at least one processor, the computing thread to generate a plurality of samples, a probability of at least one sample being taken within each activity being proportional to a time period of the activity; obtaining, by the at least one processor and from an operating system operatively coupled to the processor and for each sample, a time period associated with a central processing unit (CPU) operatively coupled to the at least one processor; determining, by the at least one processor, that a sample indicates an activity that is not serviced by the CPU; recording, by the at least one data processor, the time period for the sample associated with the activity that is not serviced by the CPU in a stack frame specific to a prior sample that indicates a prior activity that was serviced by the CPU; and providing, by the at least one processor, data stored in the stack frame specific to the prior sample.
Claim: 2. The method of claim 1, wherein the providing comprises: generating a summary report comprising: the time period recorded for the prior activity, identification of the prior activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 3. The method of claim 1, further comprising: determining, by the at least one processor, that another sample indicates another activity that is serviced by the CPU; recording, by the at least one data processor, the time period for the another sample indicating the another activity in another stack frame specific to the another sample, the stack frame specific to the prior sample and the stack frame specific to the another sample being a part of a call stack for the computing thread; and providing, by the at least one processor, data stored in the another stack frame specific to the another sample.
Claim: 4. The method of claim 3, wherein the providing of the data stored in the another stack frame specific to the another sample comprises: generating a summary report comprising: the time period recorded for the another activity, identification of the another activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 5. The method of claim 1, wherein the computer program executes an enterprise resource planning application.
Claim: 6. The method of claim 1, wherein each activity of the computer program is a subroutine of the computer program.
Claim: 7. A system comprising: at least one processor to: receive a computing thread characterizing a portion of a plurality of activities of a computer program; identify the plurality of activities associated with the computing thread; sample the computing thread to generate a plurality of samples, a probability of at least one sample being taken within each activity being proportional to a time period of the activity; obtain, from an operating system operatively coupled to the processor and for each sample, a time period associated with a central processing unit (CPU) operatively coupled to the at least one processor; determine that a sample indicates an activity that is not serviced by the CPU; and record the time period for the sample indicating the activity that is not serviced by the CPU; and a call stack including a plurality of stack frames associated with samples that are serviced by the CPU, the plurality of stack frames including a stack frame specific to a prior sample that indicates a prior activity that was serviced by the CPU.
Claim: 8. The system of claim 7, wherein the at least one processor is configured to provide data stored in the stack frame.
Claim: 9. The system of claim 8, wherein the providing comprises: generating a summary report comprising: the time period recorded for the prior activity, identification of the prior activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 10. The system of claim 1, wherein the at least one processor is configured to: determine that another sample indicates another activity that is serviced by the CPU; and record the time period for the another sample indicating the another activity in another stack frame specific to the another sample, the stack frame specific to the prior sample and the stack frame specific to the another sample being a part of a call stack for the computing thread.
Claim: 11. The system of claim 10, wherein the at least one processor is further configured to: provide data stored in the another stack frame specific to the another sample.
Claim: 12. The system of claim 11, wherein the providing comprises: generating a summary report comprising: the time period recorded for the another activity, identification of the another activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 13. The system of claim 7, wherein the computer program executes an enterprise resource planning application.
Claim: 14. The system of claim 7, wherein each activity of the computer program is a function call within the computer program.
Claim: 15. A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: receiving a computing thread characterizing a portion of a plurality of activities of a computer program; identifying the plurality of activities associated with the computing thread; sampling the computing thread to generate a plurality of samples, a probability of at least one sample being taken within each activity being proportional to a time period of the activity; obtaining, from an operating system operatively coupled to the processor and for each sample, a time period associated with a central processing unit (CPU) operatively coupled to the at least one processor; determining that a sample indicates an activity that is not serviced by the CPU; recording the time period for the sample indicating the activity that is not serviced by the CPU in a stack frame specific to a prior sample that indicates a prior activity that was serviced by the CPU; and providing data stored in the stack frame specific to the prior sample.
Claim: 16. The non-transitory computer program product of claim 15, wherein the providing comprises: generating a summary report comprising: the time period recorded for the prior activity, identification of the prior activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 17. The non-transitory computer program product of claim 15, further comprising: determining, by the at least one processor, that another sample indicates another activity that is serviced by the CPU; recording, by the at least one data processor, the time period for the another sample indicating the another activity in another stack frame specific to the another sample, the stack frame specific to the prior sample and the stack frame specific to the another sample being a part of a call stack for the computing thread; and providing, by the at least one processor, data stored in the another stack frame specific to the another sample.
Claim: 18. The non-transitory computer program product of claim 17, wherein the providing of the data stored in the another stack frame specific to the another sample comprises: generating a summary report comprising: the time period recorded for the another activity, identification of the another activity, and a total number of samples for which time periods associated with the CPU are recorded in stack frames of prior samples; and displaying the summary report on a graphical user interface operatively coupled to the at least one processor.
Claim: 19. The non-transitory computer program product of claim 15, wherein the computer program executes an enterprise resource planning application.
Claim: 20. The non-transitory computer program product of claim 15, wherein each activity of the computer program is a subroutine of the computer program.
Current International Class: 06; 06
Přístupové číslo: edspap.20160170798
Databáze: USPTO Patent Applications
Popis
Abstrakt:Computing threads can be sampled such that the samples hit each activity with a probability proportional to a time period of that activity. Therefore, the sampling can advantageously account for all activities, including activities that are smaller than the applicable sampling interval.