主权项 |
1. A method for recording activity for a concurrent software environment executing one or more software threads in a computer system comprising a plurality of processors, each processor comprising a program counter, the method comprising:
recording, by a thread state indicator, an indication of a synchronization state of a software thread of the one or more software threads in which the software thread ceases to execute in a processor of the plurality of processors of the computer system, wherein the indication of the synchronization state is associated with an identification of the software thread; polling at regular intervals, by a time profiler, values of the program counter for the processor; identifying, by the time profiler and based on the values of the program counter, the processor of the computer system becoming idle, wherein the processor is idle when the value of the program counter indicates that the processor has no software thread dispatched to execute therewith; identifying, by a dispatch monitor, a dispatch of the software thread to the processor; recording, by the time profiler, an indication that the processor is idle; and
generating, in response to the recording of the indication that the processor is idle and the indication of the synchronization state of the software thread indicating the software thread ceases to execute in the processor, a record, wherein the record attributes an idleness of the processor to the software thread and the indicated synchronization state. |