Scalable system call stack sampling
AssigneeInternational Business Machines Corporation
InventorsKean G. Kuiper, Frank E. Levine
Life of this patent
Estimating the term…
Abstract
An interrupt is generated based on an event. Further, a thread is selected for monitoring. In addition, an interrupt handler captures information for the monitored thread. An affinity of the monitored thread is set such that the monitored thread runs only on a current processor without being able to migrate to a different processor. A sampler thread that runs on the current processor retrieves a call stack associated with a monitored thread after the affinity of the monitored thread has been set to the current processor.
Claims23
A computer program product for multi-threading, the computer program product comprising:
- a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:
- computer readable program code configured to generate an interrupt based on an event;
- computer readable program code configured to select a thread for monitoring;
- computer readable program code configured to capture information, with an interrupt handler, for a monitored thread;
- computer readable program code configured to set an affinity of the monitored thread such that the monitored thread runs only on a current processor without being able to migrate to a different processor;
- and
- computer readable program code configured to retrieve, with a sampler thread that runs on the current processor, a call stack associated with a monitored thread after the affinity of the monitored thread has been set to the current processor.
A method comprising:
- generating, using a computer having storage, an interrupt based on an event;
- selecting a thread for monitoring;
- capturing information, with an interrupt handler, for a monitored thread;
- setting an affinity of the monitored thread such that the monitored thread runs only on a current processor without being able to migrate to a different processor;
- retrieving, with a sampler thread that runs on the current processor, a call stack associated with a monitored thread after the affinity of the monitored thread has been set to the current processor;
- and
- restoring the affinity of the monitored thread after the call stack has been retrieved.
A system comprising:
- processors;
- and
- storage coupled to the processors, wherein the storage device has stored thereon program code, and wherein at least one of the processors is configured to execute the program code to perform operations, wherein the operations comprise:
- generating an interrupt based on an event;
- selecting a thread for monitoring;
- capturing information, with an interrupt handler, for a monitored thread;
- setting an affinity of the monitored thread such that the monitored thread runs only on a current processor of the processors without being able to migrate to a different processor of the processors;
- and
- retrieving, with a sampler thread that runs on the current processor, a call stack associated with a monitored thread after the affinity of the monitored thread has been set to the current processor.
Dependencies are inferred from the claim text.