Claims
- 1. A method for real-time power profiling of a target system comprising the steps of:
instrumenting an embedded application to be executed on the target system to capture task execution data; generating the task execution data as each task is executed on the target system; capturing power measurement data as each task is executed on the target system; receiving the task execution data on a host system as the task execution data is generated without halting the embedded application; and correlating the task execution data with the power measurement data to determine a power consumption for each task.
- 2. The method of claim 1 wherein the task execution data comprises a set of task handles of all executed tasks taken in the execution order of the executed tasks.
- 3. The method of claim 2 wherein the power measurement data comprises a set of power measurements in the order each power measurement was taken wherein each power measurement in the set corresponds to an execution period of an executed task.
- 4. The method of claim 3 wherein the step of correlating comprises:
for each task handle in turn of the set of task handles
determining the identity of a first task associated with the task handle; and attributing a next power measurement of the set of power measurements to the first task.
- 5. The method of claim 1 wherein the step of instrumenting comprises replacing an address of a task switch hook function with an address of a trigger function such that the trigger function is called at each task context switch.
- 6. The method of claim 5 wherein the trigger function is operable to perform a method for collecting a set of task handles of all executed tasks taken in the execution order of the executed tasks and a set of power measurements in the order each power measurement is taken wherein each power measurement in the set corresponds to an execution period of an executed task comprising the steps of:
transmitting a task handle of a task about to be executed to the host system; signaling a power measurement device to stop measuring power and capture a power measurement; and signaling the power measurement device to start measuring power.
- 7. The method of claim 3 wherein each power measurement comprises a voltage value and a current value.
- 8. The method of claim 1 wherein the step of generating the task execution data further comprises generating the task execution data as each task is created on the target system.
- 9. The method of claim 8 wherein the step of instrumenting comprises:
replacing an address of a task switch hook function with an address of a trigger function such that the trigger function is called at each task context switch; and replacing an address of a task create hook function with an address of a task creation support function such that the task creation support function is called when each task is created.
- 10. The method of claim 9 wherein the task execution data comprises a set of task handles wherein each task handle is a task creation handle or a task execution handle taken in the order each task was created or executed.
- 11. The method of claim 10 wherein the power measurement data comprises a set of power measurements in the order each power measurement was taken wherein each power measurement in the set corresponds to an execution period of an executed task.
- 12. The method of claim 11 wherein the step of correlating comprises:
for each task handle in turn of the set of task handles
if the task handle is a task creation handle then
a. creating a ProfileTask object; b. adding the ProfileTask object to an array of ProfileTask objects; and c. if the hash table has an entry for a task associated with the task handle then
c1. replacing the entry with the ProfileTask object else c2. adding an entry to the hash table for the task associated with the task handle and placing the ProfileTask object in the entry; and if the task handle is a task execution handle then
a. locating a ProfileTask object for the task associated with the task handle; and b. attributing a next power measurement of the set of power measurements to the task associated with the ProfileTask object.
- 13. The method of claim 11 wherein each power measurement comprises a voltage value and a current value.
- 14. A method for power profiling of a target system comprising the steps of:
instrumenting an embedded application to be executed on the target system to capture task execution data; generating the task execution data as each task is executed on the target system; capturing power measurement data as each task is executed on the target system; receiving the task execution data on a host system as the task execution data is generated; and correlating the task execution data with the power measurement data to determine a power consumption for each task.
- 15. The method of claim 14 wherein the task execution data comprises a task handle of the executed task.
- 16. The method of claim 15 wherein the power measurement data comprises a power measurement corresponding to an execution period of the executed task.
- 17. The method of claim 16 wherein the step of correlating comprises:
attributing the power measurement to the executed task; and adding an entry for the executed task to a task handle data structure if not already entered.
- 18. The method of claim 14 wherein the step of instrumenting comprises replacing an address of a task switch hook function with an address of a trigger function such that the trigger function is called at each task context switch.
- 19. The method of claim 18 wherein the trigger function is operable to perform a method for collecting the task handle of the executed task and a power measurement corresponding to an execution period of the executed task comprising the steps of:
transmitting the task handle of the executed task to the host system; signaling a power measurement device to stop measuring power and capture a power measurement; and signaling the power measurement device to start measuring power.
- 20. The method of claim 16 wherein the power measurement comprises a voltage value and a current value.
- 21. The method of claim 14 wherein the step of generating the task execution data further comprises generating the task execution data as each task is created on the target system.
- 22. The method of claim 21 wherein the step of instrumenting comprises:
replacing an address of a task switch hook function with an address of a trigger function such that the trigger function is called at each task context switch; and replacing an address of a task create hook function with an address of a task creation support function such that the task creation support function is called when each task is created.
- 23. The method of claim 22 wherein the task execution data comprises a task creation handle or a task execution handle.
- 24. The method of claim 23 wherein the power measurement data comprises a power measurement corresponding to an execution period of the executed task.
- 25. The method of claim 24 wherein the step of correlating comprises:
if the task execution data is a task creation handle then
a. creating a ProfileTask object; b. adding the ProfileTask object to an array of ProfileTask objects; and c. if a hash table has an entry for a task associated with the task creation handle then
c1. replacing the entry with the ProfileTask object else c2. adding an entry to the hash table for the task associated with the task creation handle and placing the ProfileTask object in the entry; and if the task execution data is a task execution handle then
a. locating a ProfileTask object for a task associated with the task execution handle; and b. attributing a next power measurement of the set of power measurements to the task associated with the ProfileTask object.
- 26. The method of claim 24 wherein the power measurement comprises a voltage value and a current value.
- 27. A system for power profiling of an embedded application comprising:
a host computer; and a software development environment installed on the host computer wherein the software development environment is operable to send and receive information between the host computer and a target system and to at least receive information from a power measurement device and the software development environment comprises power profiling software embodying a method for real-time power profiling of the target system comprising the steps of:
providing for the instrumentation of an embedded application to be executed on the target system to capture task execution data; providing for the generation of the task execution data as each task is executed on the target system; providing for the capture of power measurement data as each task is executed on the target system; providing for the reception of the task execution data on a host system as the task execution data is generated without halting the embedded application; and providing for the correlation of the task execution data with the power measurement data to determine a power consumption for each task.
- 28. A system for power profiling of an embedded application comprising:
a host computer; and a software development environment installed on the host computer wherein the software development environment is operable to send and receive information between the host computer and a target system and to at least receive information from a power measurement device and the software development environment comprises power profiling software embodying a method for power profiling of the target system comprising the steps of:
providing for the instrumentation of an embedded application to be executed on the target system to capture task execution data; providing for the generation of the task execution data as each task is executed on the target system; providing for the capture of power measurement data as each task is executed on the target system; providing for the reception of the task execution data on a host system as the task execution data is generated; and providing for the correlation of the task execution data with the power measurement data to determine a power consumption for each task.
- 29. A method for real-time power profiling of a target system comprising the steps of:
providing for the instrumentation of an embedded application to be executed on the target system to capture task execution data; providing for the generation of the task execution data as each task is executed on the target system; providing for the capture of power measurement data as each task is executed on the target system; providing for the reception of the task execution data on a host system as the task execution data is generated without halting the embedded application; and providing for the correlation of the task execution data with the power measurement data to determine a power consumption for each task.
- 30. A method for power profiling of a target system comprising the steps of:
providing for the instrumentation of an embedded application to be executed on the target system to capture task execution data; providing for the generation of the task execution data as each task is executed on the target system; providing for the capture of power measurement data as each task is executed on the target system; providing for the reception of the task execution data on a host system as the task execution data is generated; and providing for the correlation of the task execution data with the power measurement data to determine a power consumption for each task.
Parent Case Info
[0001] This application is related to and claims priority under 35 USC §119 (e)(1) to Provisional Application Serial No. 60/369,596, (attorney docket TI-34344) “Power Profiler” filed on Apr. 4, 2002 and Provisional Application Serial No. 64/401,128, (attorney docket TI-34344PS1) “Power Profiler” filed on Aug. 5, 2002. This application is also related to co-pending applications Ser. No. XX/XXX,XXX (attorney docket TI-34464) “Power Profiling System and Method for Correlating Runtime Information” and Ser. No. XX/XXX,XXX (attorney docket TI-34344) “Method And Apparatus for Non-Obtrusive Power Profiling.”
Provisional Applications (2)
|
Number |
Date |
Country |
|
60369596 |
Apr 2002 |
US |
|
60401128 |
Aug 2002 |
US |