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
Patent Number: 9,632,902
Datum vydání: April 25, 2017
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.
Inventors: Scheuer, Tobias (Bruchsal, DE); Booss, Daniel (Wiesloch, DE)
Assignees: SAP SE (Walldorf, DE)
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, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determining, by the at least one processor, that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; recording, by the at least one data processor, the particular time period in a first stack frame specific to a prior sample of the plurality of samples that indicates a prior activity of the plurality of activities that was serviced by the CPU; and providing, by the at least one processor, data stored in the first stack frame, the providing comprising: generating a summary report comprising: the particular time period, 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: 2. 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, a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of a call stack for the computing thread; and providing, by the at least one processor, data stored in the second stack frame.
Claim: 3. The method of claim 1 , wherein the computer program executes an enterprise resource planning application.
Claim: 4. The method of claim 1 , wherein each activity of the computer program is a subroutine of the computer program.
Claim: 5. A method comprising: receiving, by at least one processor, a computing thread characterizing a portion of a plurality of activities of a computer program, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determining, by the at least one processor, that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; recording, by the at least one data processor, the particular time period in a first stack frame specific to a prior sample of the plurality of samples that indicates a prior activity of the plurality of activities that was serviced by the CPU; and providing, by the at least one processor, data stored in the first stack frame, 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, a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of a call stack for the computing thread; and providing, by the at least one processor, data stored in the second stack frame, the providing of the data stored in the second stack frame comprising: generating a summary report comprising: the specific time period, identification of the other 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: 6. The method of claim 5 , wherein the computer program executes an enterprise resource planning application.
Claim: 7. The method of claim 5 , wherein each activity of the computer program is a subroutine of the computer program.
Claim: 8. A system comprising: at least one processor to: receive a computing thread characterizing a portion of a plurality of activities of a computer program, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determine that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; and record the particular time period; and a call stack including a plurality of stack frames associated with the plurality of samples, the plurality of stack frames including a stack frame in which the at least one processor records the particular time period, the at least one processor configured to provide data stored in the stack frame, the providing comprising: generating a summary report comprising: the particular time period, 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: 9. The system of claim 8 , wherein the at least one processor is configured to: determine that another sample indicates another activity that is serviced by the CPU; and record a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of the call stack.
Claim: 10. The system of claim 9 , wherein the at least one processor is further configured to: provide data stored in the second stack frame.
Claim: 11. The system of claim 8 , wherein the computer program executes an enterprise resource planning application.
Claim: 12. The system of claim 8 , wherein each activity of the computer program is a function call within the computer program.
Claim: 13. A system comprising: at least one processor to: receive a computing thread characterizing a portion of a plurality of activities of a computer program, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determine that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; and record the particular time period; and a call stack including a plurality of stack frames associated with the plurality of samples, the plurality of stack frames including a stack frame in which the at least one processor records the particular time period, the at least one processor configured to provide data stored in the stack frame, wherein the at least one processor is configured to: determine that another sample indicates another activity that is serviced by the CPU; record a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of the call stack; and provide data stored in the second stack frame, the providing of the data in the second stack frame comprising: generating a summary report comprising: the specific time period, identification of the other 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: 14. The system of claim 13 , wherein the at least one processor is configured to provide data stored in the stack frame.
Claim: 15. The system of claim 13 , wherein the computer program executes an enterprise resource planning application.
Claim: 16. The system of claim 13 , wherein each activity of the computer program is a function call within the computer program.
Claim: 17. 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, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determining that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; recording the particular time period in a first stack frame specific to a prior sample of the plurality of samples that indicates a prior activity of the plurality of activities that was serviced by the CPU; and providing data stored in the first stack frame, the providing comprising: generating a summary report comprising: the particular time period, 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: 18. The non-transitory computer program product of claim 17 , wherein the operations further comprise: determining, by the at least one processor, that another sample indicates another activity that is serviced by the CPU; recording a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of the call stack; and providing data stored in the second stack frame.
Claim: 19. The non-transitory computer program product of claim 17 , wherein the computer program executes an enterprise resource planning application.
Claim: 20. The non-transitory computer program product of claim 17 , wherein each activity of the computer program is a subroutine of the computer program.
Claim: 21. 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, the plurality of activities associated with the computing thread, the computing thread being associated with a plurality of samples so that a probability of at least one sample of the plurality of samples being taken within each activity of the plurality of activities is proportional to a time period of the activity; determining that a sample of the plurality of samples indicates a particular activity of the plurality of activities that is not serviced by a central processing unit (CPU) operatively coupled to the at least one processor, the particular activity not being serviced by the CPU for a particular time period; recording the particular time period in a first stack frame specific to a prior sample of the plurality of samples that indicates a prior activity of the plurality of activities that was serviced by the CPU; providing data stored in the first stack frame; determining, by the at least one processor, that another sample indicates another activity that is serviced by the CPU; recording a specific time period for the other sample indicating the other activity in a second stack frame specific to the other sample, the first stack frame and the second stack frame being a part of the call stack; and providing data stored in the second stack frame, the providing of the data stored in the second stack frame comprising: generating a summary report comprising: the specific time period, identification of the other 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: 22. The non-transitory computer program product of claim 21 , wherein the computer program executes an enterprise resource planning application.
Claim: 23. The non-transitory computer program product of claim 21 , wherein each activity of the computer program is a subroutine of the computer program.
Patent References Cited: 8458716 June 2013 Altrichter
2009/0187784 July 2009 Bernardi
Primary Examiner: Kessler, Gregory A
Attorney, Agent or Firm: Mintz Levin Cohn Ferris Glovsky and Popeo, P.C.
Přístupové číslo: edspgr.09632902
Databáze: USPTO Patent Grants
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.