How to use timers of OMAP3530 processor with in the program code under linux

Dear all,

    Iam trying to use genenral purpose timers of OMAP 3530 procesor
for measuring cycles (MIPS) of a code, for that I need to call some
timer functions.

--> Is it the right way of calling omap timers direactly with in the
program.

--> so, Is there any way of calling the timer functions from the
program code, and that I need to build with the RVCT compiler and GNU/
ARM tool chain and then to run in the Beagleboard. If it possible
suggest me with some example.

(OR)

-->otherwise, is there any other way of measuring instruction cycles,
so please suggest me.

Thanks in advance,
Ajay.

Ajay,

you can use the performance monitor control register to get the cycle
count.
check out the example mentioned in the link:http://groups.google.com/
group/beagleboard/browse_thread/thread/
1e6243e7e8af87d3/84027a24fbcb7ca7?hl=en&lnk=gst&q=performance
+counter#84027a24fbcb7ca7.

Cheers,
Dharshan