[LLVMdev] FYI: Changing RunSafely.sh to only track user time

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Apr 19 09:59:22 PDT 2010

On Apr 18, 2010, at 11:08 PM, John Criswell wrote:

> Second, why are you only interested in user time?  The reason why we had 
> RunSafely.sh measure user + system time is that it gives a more accurate 
> depiction of how well an optimization works.  If a program spends most 
> of its time in the OS, increasing speed in user-space doesn't gain us 
> much.  If a transform decreases user time but increases system time, 
> then measuring only user time may show a speedup when measuring 
> user+system will show a loss.

What kind of optimization might change the system time?

The problem with measuring system time is that it can depend on many variable factors that have nothing to do with the process being tested. For instance, the number of files on disk, the amount of free space on disk, the total number of processes on the system, the amount of free memory pages on the system, and the size of the buffer cache can all affect how much work a system call has to do.


More information about the llvm-dev mailing list