[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elisp native profiler
From: |
Jason Rumney |
Subject: |
Re: Elisp native profiler |
Date: |
Wed, 03 Oct 2012 22:25:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> The documentation says it causes the thread to
> relinquish the remainder of its time slice, but I apparently didn't
> realize how short that slice is.
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%.
- Re: Elisp native profiler, (continued)
- Re: Elisp native profiler, Stefan Monnier, 2012/10/01
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
- Re: Elisp native profiler, Stefan Monnier, 2012/10/02
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
- Re: Elisp native profiler, Stefan Monnier, 2012/10/02
- Re: Elisp native profiler, Paul Eggert, 2012/10/02
- Re: Elisp native profiler, Stefan Monnier, 2012/10/02
- Re: Elisp native profiler, Paul Eggert, 2012/10/02
- Re: Elisp native profiler, Jason Rumney, 2012/10/02
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
- Re: Elisp native profiler,
Jason Rumney <=
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/03
- Re: Elisp native profiler, Paul Eggert, 2012/10/01