Audio multithreaded profiling
AssigneeDSP Concepts, Inc.
InventorMadhan Mohan Gundluru
Life of this patent
Estimating the term…
Abstract
A method of thread-level cycle processing includes determining a clock value at the start of execution of a first thread, receiving preemption of the first thread by a second thread; determining a clock value at the start and end of execution of the second thread, determining a duration of the second thread by subtracting the clock value at the start of execution of the second thread from the clock value at the end of execution of the second thread. A clock value at the end of execution of the first thread is then determined and a duration of the first thread is determined by subtracting the duration of the second thread from the difference between the clock value at the end of execution of the first thread and the clock value at the end of execution of the first thread.
Claims20
A method, executed by one or more processors, of processing at least a first thread and a second thread, the method comprising:
- determining, by the first thread, a clock value at the start of execution of the first thread;
- beginning processing the first thread;
- receiving preemption of the first thread by a second thread;
- determining, by the second thread, a clock value at the start of execution of the second thread;
- processing the second thread;
- determining, by the second thread, a clock value at the end of execution of the second thread;
- determining, by the second thread, a duration of the second thread by subtracting the clock value at the start of execution of the second thread from the clock value at the end of execution of the second thread;
- passing the duration of the second thread to the first thread;
- completing processing of the first thread;
- determining, by the first thread, a clock value at the end of execution of the first thread;
- and
- determining, by the first thread, a duration of the first thread by subtracting the duration of the second thread from a difference between the clock value at the end of execution of the first thread and the clock value at the start of execution of the first thread.
A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to process at least a first thread and a second thread by performing operations comprising:
- determining, by the first thread, a clock value at the start of execution of the first thread;
- beginning processing the first thread;
- receiving preemption of the first thread by a second thread;
- determining, by the second thread, a clock value at the start of execution of the second thread;
- processing the second thread;
- determining, by the second thread, a clock value at the end of execution of the second thread;
- determining, by the second thread, a duration of the second thread by subtracting the clock value at the start of execution of the second thread from the clock value at the end of execution of the second thread;
- passing the duration of the second thread to the first thread;
- completing processing of the first thread;
- determining, by the first thread, a clock value at the end of execution of the first thread;
- and
- determining, by the first thread, a duration of the first thread by subtracting the duration of the second thread from a difference between the clock value at the end of execution of the first thread and the clock value at the start of execution of the first thread.
A computing apparatus comprising:
- a processor;
- and
- a memory storing instructions that, when executed by the processor, configure the apparatus to process at least a first thread and a second thread by performing operations comprising:
- determining, by the first thread, a clock value at the start of execution of the first thread;
- beginning processing the first thread;
- receiving preemption of the first thread by a second thread;
- determining, by the second thread, a clock value at the start of execution of the second thread;
- processing the second thread;
- determining, by the second thread, a clock value at the end of execution of the second thread;
- determining, by the second thread, a duration of the second thread by subtracting the clock value at the start of execution of the second thread from the clock value at the end of execution of the second thread;
- passing the duration of the second thread to the first thread;
- completing processing of the first thread;
- determining, by the first thread, a clock value at the end of execution of the first thread;
- and
- determining, by the first thread, a duration of the first thread by subtracting the duration of the second thread from a difference between the clock value at the end of execution of the first thread and the clock value at the start of execution of the first thread.
Dependencies are inferred from the claim text.