[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elisp native profiler
From: |
Stefan Monnier |
Subject: |
Re: Elisp native profiler |
Date: |
Tue, 02 Oct 2012 08:58:47 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
>> > In a nutshell, that thread sleeps until the timer expiration, then
>> > suspends the main thread, calls the SIGPROF handler, resumes the main
>> > thread, and goes back to sleep. The deviation from the Posix
>> > semantics is that the handler runs in the context of a thread other
>> > than the main thread.
>> Isn't there another difference in that your code samples at a rate
>> determined by the wall-clock time rather than the cpu-time of the process?
> The timer thread is part of the process, so whenever it runs, the
> process runs.
> Or maybe I don't understand what you mean, exactly.
If your profiler is set to sample every 10ms and your Emacs process uses
50% of the CPU, how many samples will you get after 1s: 100 or 50?
And if Emacs is idle waiting for user input, after 1s will you get 100
samples or 0?
Under GNU/Linux (at least with the "old" setitimer code) you'd have
gotten 50 and 0 respectively.
Stefan
- Re: Elisp native profiler, (continued)
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/01
- Re: Elisp native profiler, Paul Eggert, 2012/10/01
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/01
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/01
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/01
- Re: Elisp native profiler, Paul Eggert, 2012/10/01
- Re: Elisp native profiler, Stefan Monnier, 2012/10/01
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
- Re: Elisp native profiler,
Stefan Monnier <=
- 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, 2012/10/03
- Re: Elisp native profiler, Eli Zaretskii, 2012/10/03
Re: Elisp native profiler, Paul Eggert, 2012/10/01