Arnaud Patard (Rtp) 写道:
Laurent GUERBY <[email protected]> writes:
Hi,
Hi,
I'd like to time some low level code, is there a way
to count cycles in userspace for loongson processors
running debian lenny?
You can try using the mips instruction rdhwr to get the cycle counter. I
didn't tested it but I think it should work.
As far as I know, there is still no rdhwr instruction in LS2E/2F, but
you can use mfc0/dmfc0 to read the 'count' cp0 register.
I would have said oprofile too but unfortunately, it needs some special
care on kernel side before it can be used.
Arnaud
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]