Patent ID: 8862786

Claim:
A computer program product comprising: a non-transitory tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method of executing low power code path instructions or high power code path instructions on a first processor in a computing system that comprises a plurality of processors, the method comprising: receiving an application code configured to perform a first task on the first processor, the application code comprising a first path through the application code, the first path comprising the low power code path instructions corresponding to the first task, the application code further comprising a second path through the application code, the second path comprising the high power code path instructions corresponding to the first task, the first path being distinct from the second path; determining whether a current power state of the first processor is a low power state or a high power state based on contents of a power state register of the first processor; based on determining that the current power state of the first processor is the low power state, executing the low power code path instructions of the application code on the first processor, the executing the low power code path instructions by the first processor comprising: collecting pre-processing information, the pre-processing information comprising power and performance state information from the plurality of processors in the computing system; storing the pre-processing information as hardware state data; and executing the low power code path instructions of the first path through the application code to perform the first task; and based on determining that the current power state of the first processor is the high power state, executing the high power code path instructions on the first processor, the executing the high power code path instructions by the first processor comprising: accessing the hardware state data; and based on the accessed hardware state data, executing the high power code path instructions of the second path through the application code to perform the first task.