For performance evaluation, I used the below template:
// Here is the code block to be tested.
// I wanted to know the cycles consumed during this block.
time = perf_get_section_time(PERFORMANCE_COUNTER_0_BASE, 1);
printf("\n\nTotal cycles consumed in FIR calculation = %ld cycles\n", time);
This returns the no of clock cycles consumed. And by knowing the oscillator frequency, we can calcuate the total time consumed in the block.