主权项 |
1. An automated method of optimizing execution of a program in a parallel processing environment, the program adapted to execute in data memory and instruction memory, the method comprising:
(a) receiving, at an optimizer, the program; (b) compiling the program upon instruction by the optimizer, wherein the compiled program comprises logging instructions for determining the time during which execution of a first thread is waiting for execution of a second thread; (c) executing the program upon instruction by the optimizer; (d) the optimizer observing the execution of the program and, using information logged by the logging instructions for determining the time during which execution of a first thread is waiting for execution of a second thread, identifying a subset of instructions that are most frequently waited upon by other threads (e) the optimizer identifying groups of instructions associated with the subset of instructions that are most frequently waited upon by other threads wherein the groups of instructions include the subset of instructions that are most frequently waited upon by other threads and (f) the optimizer recompiling the program and storing the identified groups of instructions including the subset of instructions that are most frequently waited upon by other threads in the instruction memory, and storing remaining portions of the program in the data memory, wherein the instruction memory has a higher access rate and smaller capacity than the data memory, wherein subsequent execution of the program occurs using the recompiled program. |