Forums - FAQ: Run time Module Profiling/Function Profiling

1 post / 0 new
FAQ: Run time Module Profiling/Function Profiling
brianp
Join Date: 5 Dec 12
Posts: 41
Posted: Thu, 2013-10-10 18:33

§ 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

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.