Recording CPU time for sample of computing thread based on CPU use state of activity associated with the sample

Saved in:
Bibliographic Details
Title: Recording CPU time for sample of computing thread based on CPU use state of activity associated with the sample
Patent Number: 10108,524
Publication Date: October 23, 2018
Appl. No: 15/489208
Application Filed: April 17, 2017
Abstract: 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: SAP SE (Walldorf, DE)
Assignees: SAP SE (Walldorf, DE)
Claim: 1. A method comprising: determining, by at least one processor, that a sample of a plurality of samples indicates a particular subroutine of a plurality of subroutines that is not being serviced for a particular time period by a central processing unit operatively coupled to the at least one processor, the plurality of samples being associated with a computing thread characterizing a portion of the plurality of subroutines; recording, by the at least one data processor, the particular time period in a stack frame specific to a prior sample of the plurality of samples, the prior sample indicating a prior subroutine of the plurality of subroutines that was serviced by the central processing unit; and retrieving, by the at least one processor, the particular time period from the stack frame to generate a report.
Claim: 2. The method of claim 1 , wherein a probability of at least one sample of the plurality of samples being taken within each subroutine of the plurality of subroutines is proportional to a time period of the subroutine.
Claim: 3. The method of claim 1 , wherein the plurality of subroutines is a part of a computer program that executes an enterprise resource planning application.
Claim: 4. The method of claim 1 , wherein each subroutine of the plurality of subroutines is a function call within a computer program.
Claim: 5. The method of claim 1 , further comprising: receiving, by the at least one processor, the computing thread prior to the determining that the sample indicates the particular subroutine that is not serviced by the central processing unit.
Claim: 6. The method of claim 1 , wherein the report comprises the particular subroutine, an identification of the prior subroutine, and a total number of samples for which time periods associated with the central processing unit are recorded in stack frames of prior samples.
Claim: 7. The method of claim 1 , further comprising: displaying, by the at least one processor, the report on a graphical user interface.
Claim: 8. The method of claim 1 , wherein the stack frame is a first data structure that stores data associated with the prior subroutine, the stack frame being a part of a call stack, the call stack being a second data structure that stores data associated with the computing thread.
Claim: 9. 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: determining that a sample of a plurality of samples associated with a computing thread characterizing a portion of a plurality of subroutines indicates a particular subroutine of the plurality of subroutines that is not being serviced for a particular time period by a central processing unit operatively coupled to the at least one processor; recording the particular time period in a stack frame specific to a prior sample of the plurality of samples, the prior sample indicating a prior subroutine of the plurality of subroutines that was serviced by the central processing unit; and retrieving the particular time period from the stack frame to generate a report.
Claim: 10. The non-transitory computer program product of claim 9 , wherein a probability of at least one sample of the plurality of samples being taken within each subroutine of the plurality of subroutines is proportional to a time period of the subroutine.
Claim: 11. The non-transitory computer program product of claim 10 , wherein the plurality of subroutines is a part of a computer program that executes an enterprise resource planning application.
Claim: 12. The non-transitory computer program product of claim 10 , wherein each subroutine of the plurality of subroutines is a function call within a computer program.
Claim: 13. The non-transitory computer program product of claim 9 , wherein the operations further comprise receiving the computing thread prior to the determining that the sample indicates the particular subroutine that is not serviced by the central processing unit.
Claim: 14. The non-transitory computer program product of claim 9 , wherein the report comprises the particular subroutine, an identification of the prior subroutine, and a total number of samples for which time periods associated with the central processing unit are recorded in stack frames of prior samples.
Claim: 15. A system comprising: a call stack including a plurality of stack frames associated with a plurality of samples associated with a computing thread characterizing a portion of a plurality of subroutines; at least one processor to determine that a sample of the plurality of samples indicates a particular subroutine of the plurality of subroutines that is not being serviced for a particular time period by a central processing unit operatively coupled to the at least one processor, the at least one processor configured to record the particular time period in a stack frame of the plurality of stack frames that is specific to a prior sample of the plurality of samples, the prior sample indicating a prior subroutine of the plurality of subroutines that was serviced by the central processing unit, the at least one processor configured to retrieve the particular time period from the stack frame to generate a report.
Claim: 16. The system of claim 15 , wherein a probability of at least one sample of the plurality of samples being taken within each subroutine of the plurality of subroutines is proportional to a time period of the subroutine.
Claim: 17. The system of claim 15 , wherein: the plurality of subroutines is a part of a computer program that executes an enterprise resource planning application; and each subroutine of the plurality of subroutines is a function call within a computer program.
Claim: 18. The system of claim 15 , wherein the at least one processor is configured to receive the computing thread prior to the determining that the sample indicates the particular subroutine that is not serviced by the central processing unit.
Claim: 19. The system of claim 15 , wherein the report comprises the particular subroutine, an identification of the prior subroutine, and a total number of samples for which time periods associated with the central processing unit are recorded in stack frames of prior samples.
Claim: 20. The system of claim 15 , wherein the at least one processor is configured to display the report on a graphical user interface.
Patent References Cited: 8458716 June 2013 Altrichter et al.
2009/0187784 July 2009 Bernardi et al.
Primary Examiner: Kessler, Gregory A
Attorney, Agent or Firm: Mintz Levin Cohn Ferris Glovsky and Popeo, P.C.
Accession Number: edspgr.10108524
Database: USPTO Patent Grants
Description
Abstract: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.