Hi,
Some of PowerPC cores contain time base which could be the ruler to measure the running time of codes.
Generally, e200z4, e200z7 have such registers, RBL and TBU. They are SPR284 and SPR285.
Sample codes could be taken the reference within AN2865SW(Timebase project) .
Enjoy the measuring!
Cheers!
Oliver
BTW, measure the running time of one function on S32K could also be gotten through the link.