I want to use CCNT register readings to profile short code segments. The code to read CCNT would be in C (if possible) or C inline assembly compiled under Linux by ccp. Can somebody provide an example? I found this in online documentation:
MRC p15, 0, <Rd>, c15, c12, 1 ; read the CCNT
I don't know ARM assembly syntax. c15 seems to refer to the CCNT, according to the documentation, but what about p15, c12 and 0 and 1? Does <Rd> stand for where you want to put the result?
I am using RDTSC in x86 inline assembly for this purpose. Does the CCNT have similar semantics?