Patent Number: 
Section: claims

1. A computer program product stored in a non-transitory computer-usable medium, the computer program product comprising:computer usable program code for collecting idle counts occurring during execution of code to form collected idle counts; andcomputer usable program code for providing the idle counts to an application for analyzing why a processor becomes idle, wherein the computer usable program code for collecting idle counts comprises:computer usable program code for collecting information for a system having a transition between an idle state and a non-idle state to form collected system information; andcomputer usable program means for providing the collected system information for analysis by an application; and wherein the computer usable program code for collecting information comprises:computer usable program code for generating trace records in response to events in which the processor transitions to the idle state and from the idle state; andcomputer usable program means for storing counts of times a processor associated with a thread has been in an idle state in nodes in a tree constructed using the thread's entries into and exits out of routines. 2. The computer program product of claim 1, wherein the computer usable program code for storing counts of times a processor associated with the thread has been in the idle state in nodes in a tree constructed using the thread's entries into and exits out of routines comprises:computer usable program code for storing a first count of a number of times a processor has been idle in a current node in response to an entry into a second routine from a first routine; andcomputer usable program code for storing a second count of the number of times the processor has been idle in the current node in response to an exit from the first routine. 3. The computer program product of claim 2, wherein the first count is a difference between a base count of the number of times the processor has been idle when the first routine was entered and a current count of the number of times the processor has been idle when the entry into the second routine from the first routine occurs. 4. The computer program product of claim 2, wherein the second count is a difference between a base count of the number of times the processor has been idle when the first routine was entered and a current count of the number of times the processor has been idle when the exit from the first routine occurs. 5. The computer program product of claim 4 further comprising:computer usable program code for combining the trace records with the nodes in the tree using node identifiers. 6. The computer program product of claim 1, wherein each trace record in the trace records includes a node identifier of a current node present when each trace record was generated. 7. A data processing system comprising:a bus;a communications unit connected to the bus;a memory connected to the bus, wherein the memory includes a set of computer usable program code; anda first processor connected to the bus, wherein the first processor executes the set of computer usable program code to collect idle counts occurring during execution of code to form collected idle counts; and provide the idle counts to an application for analyzing why a second processor becomes idle, wherein the first processor executing the set of computer usable program code to collect idle counts comprises the first processor executing the set of computer usable program code to collect information for a system having a transition between an idle state and a non-idle state to form collected system information; and to provide the collected system information for analysis by an application, and wherein the first processor executing the set of computer usable program code to collect information comprises the first processor executing the set of instructions to generate trace records in response to events in which the second processor transitions to the idle state and from the idle state; and to store counts of times the second processor associated with a thread has been in an idle state in nodes in a tree constructed using the thread's entries into and exits out of routines. 8. The data processing system of claim 7, wherein the first processor executing the set of instructions to store counts of times the second processor associated with the thread has been in an idle state in nodes in a tree constructed using the thread's entries into and exits out of routines comprises the first processor executing the set of instructions to store a first count of a number of times the second processor has been idle in a current node in response to an entry into a second routine from a first routine; and to store a second count of the number of times the second processor has been idle in the current node in response to an exit from the first routine. 9. The data processing system of claim 8, wherein the first count is a difference between a base count of the number of times the second processor has been idle when the first routine was entered and a current count of the number of times the second processor has been idle when the entry into the second routine from the first routine occurs. 10. The data processing system of claim 8, wherein the second count is a difference between a base count of the number of times the second processor has been idle when the first routine was entered and a current count of the number of times the second processor has been idle when the exit from the first routine occurs. 11. The data processing system of claim 10, further comprising wherein the first processor executing the set of instructions combines the trace records with the nodes in the tree using node identifiers. 12. The data processing system of claim 7, wherein each trace record in the trace records includes a node identifier of a current node present when each trace record was generated.