IP Library Granted Patent US 9,612,945
Granted Patent B1
US 9,612,945 · App. 14/949,780 · Granted Apr 4, 2017

Call count profiling for estimation of relative hotness of function call frequency

Inventors: Daniel Booss (Wiesloch, DE); Guenter Radestock (Karlsruhe, DE); Mehul Wagle (Pune, IN)
Assignee: SAP SE
G06F11/3688G06F11/3466G06F8/443G06F11/3409G06F11/3419
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,612,945
App. No.
14/949,780
Granted
Apr 4, 2017
Kind
B1
Abstract

Instances of a call stack executing in a database management system and separated by a sampling interval can be compared and upwardly traversed until reaching a point of difference between the instances. A call counter can be incremented for each new frame identified in the second instance of the call stack since the point of difference such that relative call count frequencies of multiple frames (which can include function calls) can be determined. Systems, methods, and computer program products are described.

Claims (26)

1. A method to be performed on one or more data processors comprising at least part of a computer system, the method comprising:

comparing a first instance of a call stack and a second instance of the call stack, the first instance of the call stack being executed in a database management system at a first time and the second instance of the call stack being executed in the database management system at a second time, the first time and the second time being separated by a sampling interval, and the comparing including upwardly traversing, starting from the bottom-most frame in the first instance and the second instance of the call stack, the first instance and the second instance of the call stack;

identifying, based at least on the comparing, a first frame at which the first instance of the call stack differs from the second instance of the call stack; and

incrementing a call counter for each frame that is subsequent to and upwards from the first frame in the second instance of the call stack.

2. A method as in claim 1 , wherein the upwardly traversing of the first instance and the second instance of the call stack comprises identifying one or more frames that are called in the same order in both the first instance and the second instance of the call stack.

3. A method as in claim 1 , further comprising storing the call counters for the plurality of frames in a data structure.

4. A method as in claim 1 , further comprising estimating, based at least on the call counters, a relative call count frequency between the first instance of the call stack and the second instance of the call stack.

5. A method as in claim 1 , wherein the first instance of the call stack is generated on a previous sample run, and wherein the operations further comprise attaching the first instance of the call stack into a heap memory of each executing light weight process thread for the call stack.

6. A system comprising:

computer hardware comprising at least one programmable processor configured to perform operations comprising:

comparing a first instance of a call stack and a second instance of the call stack, the first instance of the call stack being executed in a database management system at a first time and the second instance of the call stack being executed in the database management system at a second time, the first time and the second time being separated by a sampling interval, and the comparing including upwardly traversing, starting from the bottom-most frame in the first instance and the second instance of the call stack, the first instance and the second instance of the call stack;

identifying, based at least on the comparing, a first frame at which the first instance of the call stack differs from the second instance of the call stack; and

incrementing a call counter for each frame that is subsequent to and upwards from the first frame in the second instance of the call stack.

7. A system as in claim 6 , wherein the upwardly traversing of the first instance and the second instance of the call stack comprises identifying one or more frames that are called in the same order in both the first instance and the second instance of the call stack.

8. A system as in claim 6 , wherein the operations further comprise storing the call counters for the plurality of frames in a data structure.

9. A system as in claim 6 , wherein the operations further comprise estimating, based at least on the call counters, a relative call count frequency between the first instance of the call stack and the second instance of the call stack.

10. A system as in claim 6 , wherein the first instance of the call stack is generated on a previous sample run, and wherein the operations further comprise attaching the first instance of the call stack into a heap memory of each executing light weight process thread for the call stack.

11. A system as in claim 6 , wherein the computer hardware further comprises a machine-readable medium storing instructions that, when executed by the processor, cause the at least one programmable processor to perform at least some of the operations.

12. A computer program product comprising a non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:

comparing a first instance of a call stack and a second instance of the call stack, the first instance of the call stack being executed in a database management system at a first time and the second instance of the call stack being executed in the database management system at a second time, the first time and the second time being separated by a sampling interval, and the comparing including upwardly traversing, starting from the bottom-most frame in the first instance and the second instance of the call stack, the first instance and the second instance of the call stack;

identifying, based at least on the comparing, a first frame at which the first instance of the call stack differs from the second instance of the call stack; and

incrementing a call counter for each frame that is subsequent to and upwards from the first frame in the second instance of the call stack.

13. A computer program product as in claim 12 , wherein the upwardly traversing of the first instance and the second instance of the call stack comprises identifying one or more frames that are called in the same order in both the first instance and the second instance of the call stack.

14. A computer program product as in claim 12 , wherein the operations further comprise storing the call counters for the plurality of frames in a data structure.

15. A computer program product as in claim 12 , wherein the operations further comprise estimating, based at least on the call counters, a relative call count frequency between the first instance of the call stack and the second instance of the call stack.

16. A computer program product as in claim 12 , wherein the first instance of the call stack is generated on a previous sample run, and wherein the operations further comprise attaching the first instance of the call stack into a heap memory of each executing light weight process thread for the call stack.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 24, 2015
From: BOOSS, DANIEL; RADESTOCK, GUENTER; WAGLE, MEHUL
To: SAP SE
Reel/Frame 037129/0154 →