Thread (16 messages) 16 messages, 5 authors, 2016-01-20

How to get better precision out of getrusage on the ARM?

flat view

From: Russell King - ARM Linux <hidden>
Date: 2015-12-22 14:49:07

On Tue, Dec 22, 2015 at 09:30:30AM -0500, Patrick Doyle wrote:
Short version:
My application running on a Cortex-A5 processor (the SAMA5D2 from
Atmel) calls getrusage(RUSAGE_THREAD, ...), which returns cpu time
quantized to the kernel tick frequency (100Hz or 1Khz, depending on
CONFIG_HZ_100 vs CONFIG_HZ_1000).

How can I get better precision for sched_clock on the (Cortex-A5) ARM?
 The x86 uses the TSC.
You need to provide a sched_clock() implementation using
sched_clock_register().

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help