Microstackshots
AssigneeApple Inc.
InventorsKevin James Van Vechten, Shantonu Sen, Craig M. Federighi, Guy L. Tribble
Life of this patent
Estimating the term…
Abstract
A method and apparatus of a device that captures a stackshot of an executing process is described. In an exemplary embodiment, the device detects an interrupt of the process occurring during the execution of the process, where the process execution can be in a kernel space and user space, and the interrupt occurs during the user space. The device further determines whether to capture a stackshot during the interrupt using a penalty function. If the stackshot is to be captured, the device captures the stackshot and saves the stackshot.
Claims20
A non-transitory machine-readable medium having executable instructions to cause one or more processing units to perform a method to capture a stackshot of a process, the method comprising:
- detecting an interrupt of the process occurring during the runtime of the process, wherein the process runtime includes kernel runtime and user runtime, and the interrupt occurs during the user runtime;
- determining whether to capture a stackshot during the interrupt using a penalty function;
- and
- if the stackshot is to be captured,
- capturing the stackshot, and
- saving the stackshot.
A non-transitory machine-readable medium having executable instructions to cause one or more processing units to perform a method to determine an execution profile of a device, the method comprising:
- capturing a plurality of stackshots of a device for the execution profile of that device, wherein capturing one of the plurality of the stackshots includes,
- detecting an interrupt of a process executing on the device, wherein the interrupt occurs during the process execution, wherein the process execution includes execution in kernel space and user space, and the interrupt occurs during the execution in the user space;
- determining whether to capture a stackshot during the interrupt using a penalty function;
- and
- if that stackshot is to be captured,
- capturing that stackshot, and
- saving that stackshot, and
- determining the execution profile of the device using the plurality of stackshots.
A method to capture a stackshot of a process, the method comprising:
- detecting an interrupt of the process occurring during the execution of the process, wherein the process execution includes execution in kernel space and user space, and the interrupt occurs during the execution in the user space;
- determining whether to capture a stackshot during the interrupt using a penalty function;
- and
- if the stackshot is to be captured,
- capturing the stackshot, and
- saving the stackshot.
A device to capture a stackshot of a process executing on that device, the device comprising:
- a processor;
- a memory coupled to the processor though a bus;
- and
- a process executed from the memory by the processor to cause the processor to detect an interrupt of the process occurring during the execution of the process, wherein the process execution includes execution in kernel space and user space, and the interrupt occurs during the execution in the user space, determine whether to capture a stackshot during the interrupt using a penalty function, and if the stackshot is to be captured, capture the stackshot, and save the stackshot.
Dependencies are inferred from the claim text.