Patent ID: 7458078

Claim:
A method in a data processing system for storing thread tracking information during execution of a computer program, comprising: setting a thread tracking control bit in a processor of the data processing system to enable thread tracking by the processor; and responsive to setting the thread tracking control bit in the processor: allocating a work area for a thread of the computer program, wherein the work area is used to store thread tracking information for the thread, and wherein the thread tracking information is a thread call stack; automatically determining, within microcode of the processor, if an event has occurred requiring modification of the thread tracking information in the work area; and responsive to the microcode automatically determining that an event has occurred requiring modification of the thread tracking information in the work area, modifying the thread tracking information in the work area, wherein modifying the thread tracking information includes at least one of adding an entry to the thread call stack and popping off an entry from the thread call stack, and wherein the method further comprises: determining if modifying the thread tracking information will cause an overflow of the work area; and responsive to determining that modifying the thread tracking information will cause an overflow of the work area, extending the work area, wherein extending the work area includes: allocating a new area of memory for storage of the thread tracking information; storing a beginning address and a length of the new area in control registers of the processor; and copying existing thread tracking information from the work area to the new area of memory.