How to measure program execution time in ARM Cortex-A8 processor?

I found this very interesting question:

http://stackoverflow.com/questions/3247373/how-to-measure-program-execution-time-in-arm-cortex-a8-processor