emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp native profiler


From: Eli Zaretskii
Subject: Re: Elisp native profiler
Date: Wed, 03 Oct 2012 19:43:20 +0200

> From: Jason Rumney <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden,  address@hidden
> Date: Wed, 03 Oct 2012 22:25:36 +0800
> 
> Timeslices are probably much shorter now than the 10ms they used to be
> in Windows 95, but I guarantee they are still much longer than the time
> it takes to execute:
> 
> >   while (clock () < expiration_time)
> >     Sleep (0);
> 
> This is exactly the condition that will cause a false reading on a CPU
> monitor, as the thread is runnable in every single timeslice,
> even if it is immediately relinquishing it to another thread.  The CPU
> monitor is only checking on the granularity of a timeslice so it sees
> 100%, where the actual usage for this process might be a fraction of 1%.

Thanks.  There's something to learn every day.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]