You can make use of performance monitor hardware from scratch.
http://cache.freescale.com/files/32bit/doc/app_note/AN3636.pdf
The e500 performance monitor driver exists in the kernel. The core API is in arch/powerpc/perf/core-fsl-emb.c and e500 related stuff is in arch/powerpc/perf/e500-pmu.c.
Bare-board example in CodeWarrior PA:
<CodeWarrior>\PA\CodeWarrior_Examples\Bareboard_Examples\e500mcPerformanceMonitor_eabi
Have a great day,
Pavel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------