§ APIs for profiling a module or function
§ qurt_get_core_pcycles()
§ Returns the total number of Pcycles elapsed since bootup
§ This helps to get the total execution time of the module with the help of the running clock
§ Below example shows usage of this API
§ qurt_profile_get_thread_pcycles()
§ Gets tcycle that current thread has consumed; excludes context switches to other software threads
§ Helps to get exact cycles required by this module and MCPS of software thread
§ See the example code below for profiling the process() call of a custom audio module
#ifdef AUDPPSVC_TEST
uint64_t prof_cycles=0;
prof_cycles =qurt_profile_get_thread_pcycles();
#endif // AUDPPSVC_TEST
/* Begin primary processing */
result = module_ptr->vtbl_ptr->process(module_ptr,
pProcessBuffers[input_index],
pProcessBuffers[output_index],
NULL);
#ifdef AUDPPSVC_TEST
/* Diff Current Cycle State against previosly acquired to
check Cycles elapsed */
prof_cycles = qurt_profile_get_thread_pcycles() - prof_cycles;
#endif