1. A computer program product comprising a computer useable medium having a computer readable program, wherein the computer readable program when executed on a computer causes the computer to: generate a sample based on an event; identify, with a dispatch monitor, a next dispatched monitored thread that is dispatched by a current processor; set a processor affinity of the next dispatched monitored thread such that the next dispatched monitored thread runs only on the current processor without being able to migrate to a different processor; retrieve, with a sampled thread that runs on the processor, a next dispatched monitored thread call stack after the processor affinity of the next dispatched monitored thread has been set to the current processor; restore the processor affinity of the next dispatched monitored thread after the next dispatched monitored thread call stack has been obtained; and record the next dispatched monitored thread call stack for the next dispatched monitored thread.